After Death
#1

player can walk after death any idea how to fix this?
Reply
#2

Show OnPlayerDeath
Reply
#3

You should provide some code... how are we supposed to know that?
Reply
#4

Quote:
Originally Posted by DeMoo
Посмотреть сообщение
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.
Reply
#5

Quote:
Originally Posted by kingmk
Посмотреть сообщение
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.
Wait
Quote:

most of cases, peope don't check if the killerid != INVALID_PLAYER_ID,

What? Hows that going to affect anything rather make the player walk??

Id say this guy used ClearAnimations once death occurs
Reply
#6

PHP код:
    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"10false"i"playerid);
    }
    new 
str[512],gname[64];
    if(
shesulia[playerid] && dawyebulia)
    {
        if(
killerid != INVALID_PLAYER_ID)
        {
            
PlayerInfo[killerid][pKills]++;
            
TempKill[killerid] ++;
            
SendDeathMessage(killeridplayeridreason);
            
KilledManID[killerid] = playerid;
            
GetWeaponName(reasongnamesizeof(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(killerid3000str);
        }
        else
        {
            
SendDeathMessage(playeridplayeridreason);
        }
        
// Iaragis Dagdeba Sikvdilis Shemdeg //
        
new weaponid GetPlayerWeapon(playerid);
        new 
wammo GetPlayerAmmo(playerid);
        if(
weaponid && weaponid 39)
        {
            
DropWeaponsDeath(playerid,weaponid,wammo);
        }
        
//
         
PlayerInfo[playerid][pDeaths]++, lmsCount--;
        
shesulia[playerid] = 0;
        
//GangZoneHideForPlayer(playerid,deathzone);
        
GZ_ShapeHideForPlayer(playeriddeathzone);
        
hppack[playerid] = 0;
        
StatusCheck[playerid] = false;
        
PlayerTextDrawHide(playeridPlayerText:IGStatus[0][playerid]);
        
PlayerTextDrawHide(playeridPlayerText:IGStatus[1][playerid]);
        
PlayerTextDrawHide(playeridPlayerText:IGStatus[2][playerid]);
        
PlayerTextDrawHide(playeridPlayerText: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(killerid3000formattxt);
        
format(formattxt,512,"~w~YOU were killed by ~r~%s",GetName(killerid));
        
TD_MSG(playerid3000formattxt);
    }
    return 
1;

Reply
#7

remove
PHP код:
    ClearAnimations(playerid); 
from OnPlayerDeath
Reply
#8

I called it! lol!
Reply
#9

Quote:
Originally Posted by PepsiCola23
Посмотреть сообщение
remove
PHP код:
    ClearAnimations(playerid); 
from OnPlayerDeath
I tried it already
Reply
#10

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
Wait

What? Hows that going to affect anything rather make the player walk??

Id say this guy used ClearAnimations once death occurs
Yes, OnPlayerDeath will stuck if don't check the killerid it's equals with INVALID_PLAYER_ID, and u use killerid in a array...

put this on your OnPlayerDeath()

Код:
if(killderid == INVALID_PLAYER_ID) return 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)