SA-MP Forums Archive
help Car Spawn 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: help Car Spawn help (/showthread.php?tid=469927)



help Car Spawn help - MBilal - 15.10.2013

here its code it work fine but i want player can spawn only one car at time ,meaning is when he spawn new car the old car which he spawn before destroyed I hope you Guyz Help Me Thanks
Код:
CMD:acar(playerid, params[])
			{
  			if(Player[playerid][pAdmin] >= 2)
			{
            if(IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid,0x00FF00AA,"You're in a vehicle.");
			else
			{
   			new Float:pX,Float:pY,Float:pZ,Float:pw;
      		GetPlayerPos(playerid, pX,pY,pZ);
      		GetPlayerFacingAngle(playerid, pw);
   			new Vehicleid = CreateVehicle(541, pX, pY, pZ, pw, 0, 0, 0);
            PutPlayerInVehicle(playerid, Vehicleid, 0);
            GameTextForPlayer(playerid,"~w~Bullet",3000,1);
			}
			}
			}