SA-MP Forums Archive
Car Destory Help - 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)
+--- Thread: Car Destory Help (/showthread.php?tid=450099)



Car Destory Help - RandomDude - 11.07.2013

pawn Код:
if(listitem == 0)
            {
                PutPlayerInVehicle(playerid,CreateVehicle(592,X,Y,Z,0,-1,-1,-1),0);
            }
I want it to destroy the vehicle the player is sitting in then make the player sit in this vehicle...
thanks!


Re: Car Destory Help - Dragonsaurus - 11.07.2013

pawn Код:
if(listitem == 0)
{
      if(IsPlayerInAnyVehicle(playerid)) DestroyVehicle(GetPlayerVehicleID(playerid));
      PutPlayerInVehicle(playerid,CreateVehicle(592,X,Y,Z,0,-1,-1,-1),0);
}



Re: Car Destory Help - RandomDude - 11.07.2013

Thanks!