View Single Post
  #1  
Old 05-19-2008, 08:23 PM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
Questions about a Skateboard Class NPC

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.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.

Last edited by Stryke; 05-20-2008 at 01:22 AM..
Reply With Quote