08.08.2012, 12:30
I want help for spawning player in hospital after death, but it seems that i have a problem with that.
Here are my codes:
If i die, then the skin changes and it freezes the player, showing those "spawn buttons"
and as you can see, the player isn't in hospital, he's at spawn what's after registering:
Here are my codes:
pawn Код:
new Dead[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
Dead[playerid] = 1;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(Dead[playerid] == 1)
{
Dead[playerid] = 0;
SetPlayerPos(playerid, 1230.9292,293.1611,-67.4531);
}
return 1;
}
and as you can see, the player isn't in hospital, he's at spawn what's after registering: