Respawn a vehicle when enter checkpoint
#1

Hi, what is the pawno code to respawn a vehicle when someone drives into a checkpoint.

SetVehicleToRespawn(--The playerID's vehicle); <<< How can i make that players car respawn?

Thanks
Reply
#2

pawn Код:
new CheckRespawn;
pawn Код:
public OnGameModeInit()
{
     CheckRespawn = SetPlayerCheckpoint(playerid, X, Y, Z, 3.0);
     return 1;
}
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(CheckRespawn[playerid] == 1)
    {
         new vehicleid = GetPlayerVehicleID(playerid);
         SetVehicleToRespawn(vehicleid);
         SendClientMessage(playerid, -1, "[!] Your vehicle was respawn!");
         return 1;
    }
    return 1;
}
Reply
#3

It worked. Thank you very much!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)