SA-MP Forums Archive
Death Timer Lag - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Death Timer Lag (/showthread.php?tid=253516)



Death Timer Lag - Audiophr3ak - 06.05.2011

I have a problem with my death timer, it wont work after the first death. Looks as the same crap with animations when they wont apply from the first command.
Here is the part of code:

forward Death(playerid);

public Death(playerid)
{
aInfo[playerid][Status] = 0;
TogglePlayerControllable(playerid, 1);
ClearAnimations(playerid);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
new Float, Float:y, Float:z, Float:a; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a);
SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), x, y, z, a, GetPlayerWeapon(playerid), GetPlayerAmmo(playerid), 0, 0, 0, 0);
aInfo[playerid][Status] = 1;
return 1;
}

public OnPlayerSpawn(playerid)
{
if(aInfo[playerid][Status] == 1)
{
ApplyAnimation(playerid, "PED", "KO_skid_back", 4, 0, 1, 1, 1, 0, 1);
TogglePlayerControllable(playerid, 0);
DeathTimer[playerid] = SetTimerEx("Death", 60000, 0, "i", playerid);
}
return 1;
}


Re: Death Timer Lag - Audiophr3ak - 07.05.2011

Erm. Any suggestions?