public OnPlayerDeath(playerid, killerid, reason)
{
Died[playerid] = 1;
return (true);
}
public OnPlayerSpawn(playerid)
{
if(Died[playerid] == 1)
{
DetermineSpawn(playerid);
Died[playerid] = 0;
}
return 1;
}
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);
}
}
stock DetermineSpawn(playerid)
{
SetPlayerPos(playerid, 1728.7363,-1911.9559,13.5632);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 90);
SetPlayerVirtualWorld(playerid, 0);
}
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);
PlayerInfo[playerid][pSpawnPos] = 0)
}
}
Died[otherid] = 1;
|
When I first time die, it's all ok, but second, third etc. something is wrong
Video says it all. https://*********/AgcrPLQJWGg PHP код:
PHP код:
PHP код:
|
|
Hmm , try adding this in the kill(and /akill) cmd
Код:
Died[otherid] = 1; ![]() |
But when died normally thing is the same...Problem is something in OnPlayerDeath., but what?
I delete "Died" from script, and use only DetermineSpawn in OnPlayerSpawn callback, now all work perfectly.