Quote:
Originally Posted by Novo
It would be nice to know what doesn't work.
I'm personally not a fan about double-with's... Nor am I a fan of 'temp.n' mysteriously becoming 'n'.
It could be on a gmap, and showing at the top-left corner... As for the npcs array trick, that was before putnpc2 returned an object.
How I usually do it is:
PHP Code:
public function dropItem( id ) { temp.n = "object_item";
temp.obj = putnpc2( 30, 30, "" ); temp.obj.join( temp.n ); // ... }
|
Oh yeah, the error was it would just return an error in rc..
And, with your example I could do
PHP Code:
public function dropItem(id)
{
temp.obj = putnpc2(30, 30, "");
temp.obj.join("class name");
temp.obj.id = id;
}
and then I would be able to do this.id in the class and return the id gived to the function dropItem?
Edit: Doesn't work in a WNPC
