Control-NPC:
PHP Code:
function onPlayerLogOut(pl)
{
if(pl.client.RideStatus == 1)
{
pl.client.CurrentRide.destroy();
triggerserver("weapon","-System/Main","boardstay",pl);
}
}
-System/Main Weapon:
PHP Code:
function onActionServerSide(id)
{
switch(id)
{
case "boardstay":
temp.pl = params[1];
temp.r = putnpc2(temp.pl.x,temp.pl.y,"join(\"object_rideitem\");");
temp.r.owner = temp.pl.account;
temp.r.ani = "silence_woodenboardidle2";
temp.pl.client.CurrentRide = temp.r;
break;
}
}
It gave me a error trying to use the "putnpc2" command in the Control-NPC, so I tried to get around it by making the Control-NPC send a triggerserver to another Weapon, in this case (-System/Main). However, it is never received. (Checked with echo multiple times). How would I get around this?
I need this because I don't want the skateboard to disappear after the player logs out while is on the skateboard.
triggerserver gives an error too.