set vehicle pos
#1

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)