View Single Post
  #2  
Old 08-04-2008, 02:08 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
I always do something like this whenever I know I'll use a class for both NPC's and players:

PHP Code:
function myFunction()
{
  if (
objecttype() == "TServerPlayer"temp.obj "player";
  else if (
objecttype() == "TServerNPC"temp.obj "this";

  (@
obj).variable 666;
  (@
obj).triggerAnotherCoolFunction();

Etcetera etcetera.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote