SA-MP Forums Archive
How to ??? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to ??? (/showthread.php?tid=173058)



How to ??? - martynas - 01.09.2010

Hi,

How to make that when player sit on quadbike system would -500 dollars from his money ?


Re: How to ??? - Voldemort - 01.09.2010

onplayerstatechange

if(newstate == PLAYER_STATE_DRIVER)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == Quadbikemodelid)
{
GivePlayerMoney(playerid,-500);
}
}


Re: How to ??? - MartinDee - 01.09.2010

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
      new vehmodel = GetVehicleModel(GetPlayerVehicleID(playerid));
      if(newstate == PLAYER_STATE_DRIVER && (vehmodel == 471))
      {
          GivePlayerMoney(playerid, -500);
      }
      return 1;
}



Re: How to ??? - LarzI - 01.09.2010

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if( newstate == PLAYER_STATE_DRIVER && GetVehicleModel( GetPlayerVehicleID( playerid )) == QUAD_BIKE_ID_HERE )
        GivePlayerMoney( playerid, -500 );
    return true;
}



Re: How to ??? - Voldemort - 01.09.2010

Quad bike ID 471


Re: How to ??? - martynas - 01.09.2010

thanks for all