26.02.2018, 20:15
player can walk after death any idea how to fix this?
This it's because you do something wrong on OnPlayerDeath(), most of cases, peope don't check if the killerid != INVALID_PLAYER_ID, and the OnPlayerDeath will stuck, so the player who dies will can walk....
Another reason, it's your server. Your server may be lagging some times, and makes this problem. Show us your OnPlayerDeath() so we can figure out. |
most of cases, peope don't check if the killerid != INVALID_PLAYER_ID, |
PlayerInfo[playerid][pAFKTime] = -3;
ClearAnimations(playerid);
KillTimer(HalfSecTimer[playerid]);
DestroyPlayerObject(playerid,CheatText[playerid]);
if(killerid != INVALID_PLAYER_ID)
{
if(DamageTaken[playerid] == 0)
{
Cheater(playerid, "Fake Kill",1);
}
}
if(killerid == playerid)
{
Cheater(playerid, "Fake Kill",1);
}
if(DamageTaken[playerid] == 1)
{
SetTimerEx("DamageTimer", 10, false, "i", playerid);
}
new str[512],gname[64];
if(shesulia[playerid] && dawyebulia)
{
if(killerid != INVALID_PLAYER_ID)
{
PlayerInfo[killerid][pKills]++;
TempKill[killerid] ++;
SendDeathMessage(killerid, playerid, reason);
KilledManID[killerid] = playerid;
GetWeaponName(reason, gname, sizeof(gname));
StatusCheck[playerid] = false;
if(reason >= 22 && reason < 39)
{
format(str,sizeof(str),"~n~~n~~n~~n~~n~~w~YOU have killed %s with %s~n~~r~%d kill",GetName(playerid),gname,TempKill[killerid]);
}
else format(str,sizeof(str),"~n~~n~~n~~n~~n~~w~YOU have killed %s~n~~r~%d kill",GetName(playerid),TempKill[killerid]);
TD_MSG(killerid, 3000, str);
}
else
{
SendDeathMessage(playerid, playerid, reason);
}
// Iaragis Dagdeba Sikvdilis Shemdeg //
new weaponid = GetPlayerWeapon(playerid);
new wammo = GetPlayerAmmo(playerid);
if(weaponid > 0 && weaponid < 39)
{
DropWeaponsDeath(playerid,weaponid,wammo);
}
//
PlayerInfo[playerid][pDeaths]++, lmsCount--;
shesulia[playerid] = 0;
//GangZoneHideForPlayer(playerid,deathzone);
GZ_ShapeHideForPlayer(playerid, deathzone);
hppack[playerid] = 0;
StatusCheck[playerid] = false;
PlayerTextDrawHide(playerid, PlayerText:IGStatus[0][playerid]);
PlayerTextDrawHide(playerid, PlayerText:IGStatus[1][playerid]);
PlayerTextDrawHide(playerid, PlayerText:IGStatus[2][playerid]);
PlayerTextDrawHide(playerid, PlayerText:IGStatus[3][playerid]);
}
else
{
if(killerid == INVALID_PLAYER_ID) return 1;
new formattxt[512];
format(formattxt,512,"~w~YOU have killed ~r~%s",GetName(playerid));
TD_MSG(killerid, 3000, formattxt);
format(formattxt,512,"~w~YOU were killed by ~r~%s",GetName(killerid));
TD_MSG(playerid, 3000, formattxt);
}
return 1;
}
ClearAnimations(playerid);
Wait
What? Hows that going to affect anything rather make the player walk?? Id say this guy used ClearAnimations once death occurs |
if(killderid == INVALID_PLAYER_ID) return 1;