How do i make a player spawn at hospital after death
#3

Quote:
Originally Posted by LarzI
Посмотреть сообщение
Make a global variable
pawn Код:
new playerDied[MAX_PLAYERS]
Then in under
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
put this:
pawn Код:
playerDied[playerid] = 1;
Then lastly under
pawn Код:
public OnPlayerSpawn(playerid)
put this:
pawn Код:
if(playerDied[playerid])
{
    SetPlayerPos(playerid, hospitalX, hospitalY, hospitalZ); //replace with actual coordinates
}
ive had this problem in the past, my pawno always crashes when i try to compile with these lines
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)