set vehicle pos - 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: set vehicle pos (
/showthread.php?tid=541570)
set vehicle pos -
Saidmrn - 12.10.2014
hello, i want when the player entered the checkpoint, respawn the car, but I want to do this for multiple simultaneous vehicles because the car would be so respawn after 5 minutes
I tried to do so:
enter checkpoint:
pawn Код:
if(PlayerToPoint(6.0,playerid,2731.3162,-2002.1512,13.7051))//Prefeitura
* * {
* * new carro = GetPlayerVehicleID(playerid);
* * * * DisablePlayerCheckpoint(playerid);
* * * * GameTextForPlayer(playerid, " carro vendido,recompensa : R$ 15000", 5000, 3);
* * * * carroroubado[carro] = carro;
* * * * RemovePlayerFromVehicle(playerid);
* * * * SetTimer("levarcarroroubado",3000,false);
* * * * SetTimer("voltarcarro",60000,false);
* * }
pawn Код:
public levarcarroroubado()
{
SetVehiclePos(carroroubado[carro],593.8740,-3160.0510,-23.7042);
return 1;
}
public voltarcarro()
{
SetVehicleToRespawn(carroroubado[carro]);
return 1;
}
I can not use SetVehicleToRespawn (carro);, because if another player deliver, will replace the old car, then only the new car will respawn = s