19.03.2016, 04:09
When I first time die, it's all ok, but second, third etc. something is wrong
Video says it all.
https://*********/AgcrPLQJWGg
Thanks in advance. Rep +
Video says it all.
https://*********/AgcrPLQJWGg
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
Died[playerid] = 1;
return (true);
}
PHP код:
public OnPlayerSpawn(playerid)
{
if(Died[playerid] == 1)
{
DetermineSpawn(playerid);
Died[playerid] = 0;
}
return 1;
}
PHP код:
stock DetermineSpawn(playerid)
{
if(PlayerInfo[playerid][pSpawnPos] == 1)
{
SetPlayerPos(playerid, 1728.7363,-1911.9559,13.5632);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 90);
SetPlayerVirtualWorld(playerid, 0);
}
}