13.02.2011, 17:14
This happened to me too,their SA is getting buggy and theyll need to restart it.It happened because the objects needed to get loaded too fast
Put there a timer like
Put there a timer like
pawn Code:
public OnPlayerDeath(...)
{
Dead[playerid] = 1;
return 1;
}
if(strcmp(cmd, "/acceptdeath", true) == 0)
{
if (IsDead[playerid] == 1)
{
SetTimerEx("ReloadPos",4000,false,"i",playerid);
new RandomWeth;
RandomWeth = random(2);
switch(RandomWeth)
{
case 0:
{
SetPlayerVirtualWorld(playerid,1);
}
case 1:
{
SetPlayerVirtualWorld(playerid,2);
}
return 1;
}
}
public ReloadPos(...)
{ new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
DropWeapons(GetPlayerWeapon(playerid),GetPlayerAmmo(playerid),X,Y,Z,GetPlayerVirtualWorld(playerid),playerid);
ResetPlayerWeaponsEx(playerid);
SetPlayerToTeamColor(playerid);
TogglePlayerControllable(playerid,false);
SetPlayerHealthEx(playerid,1.0);
SetPlayerPos(playerid, -3451.3801,475.9214,58.0620);
SetTimerEx("AfterSpawnHos", 10000, false, "i", playerid);
ApplyAnimationEx(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
return 1;
}