OnPlayerSpawn
#3

Get the co-ordinates of where you want to spawn the player using /save in game. Then, we need to set a player variable under OnPlayerDeath, this can be done by:

pawn Код:
SetPVarInt(playerid, "Dead", 1);
Now, under OnPlayerSpawn, we need to check if the player was dead before he spawned. We can do this by:

pawn Код:
if(GetPVarInt(playerid, "Dead")) {
    SetPlayerPos(playerid, fX, fY, fZ); // Position of the hospital.
    DeletePVar(playerid, "Dead");
}
Reply


Messages In This Thread
OnPlayerSpawn - by Gooday - 11.01.2012, 11:42
Re : OnPlayerSpawn - by [HiC]TheKiller - 11.01.2012, 12:03
Re: OnPlayerSpawn - by JamesC - 11.01.2012, 12:05
Re: OnPlayerSpawn - by Gooday - 11.01.2012, 13:06

Forum Jump:


Users browsing this thread: 2 Guest(s)