hostpital
#1

Hello, under OnPlayerDeath i set his postition to a hospital interior but once you die and tele there u then die again and respawn how to fix this?
Reply
#2

hmm, maybe set his hp?
Reply
#3

If you set his position in OnPlayerDeath he will just be teleported when he is on the ground dying, you should set a variable in OnPlayerDeath, and in OnPlayerSpawn set their position to a hospital interior if the variable is true.

example:

pawn Код:
//Top of script:
new bool:JustDied[MAX_PLAYERS] = false;

//OnPlayerDeath:

JustDied[playerid] = true;

//OnPlayerSpawn:

if(JustDied[playerid])
{
JustDied[playerid] = false;
//Set position to hospital interior
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)