[Help] Death Bug
#1

Does anyone have the solution to my problem? It happens that sometimes when some player dies, it just does not die, it gets bugged with CJ there in bluebarry, I do not use RequestClass and RequestSpawn because I have a custom kill screen with TXD, but it worked perfectly when I ran the server on the PC, it was only up in HOST and started to give this problem with some players

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    
WeaponDemageValue randomEx(1565);
    
sangramentoporcent randomEx(1090);
    if(
GetTickCountDifference(GetTickCount(), death_LastDeath[playerid]) < 1000)
        return -
1;
    
death_LastDeath[playerid] = GetTickCount();
    if(
killerid == INVALID_PLAYER_ID)
    {
        
killerid GetLastHitById(playerid);
        
        if(!
IsPlayerConnected(killerid))
            
killerid INVALID_PLAYER_ID;
    }
    
_OnDeath(playeridkillerid);
    
PlayerTextDrawDestroy(playerid,txtDateDisp22);
    return 
1;
}
_OnDeath(playeridkillerid)
{
    if(
IsPlayerVIP(killerid))
       {
           new 
STR[250];
        
SetPlayerScore(killeridGetPlayerScore(killerid) +2);
        
format(STR50"%d"GetPlayerScore(killerid));
        
PlayerTextDrawShow(killeridTextHUD[killerid][2]);
        
PlayerTextDrawSetString(killeridTextHUD[killerid][2], STR);
       }
       else
       {
           new 
STR[250];
        
SetPlayerScore(killeridGetPlayerScore(killerid) +1);
          
format(STR50"%d"GetPlayerScore(killerid));
        
PlayerTextDrawShow(killeridTextHUD[killerid][2]);
        
PlayerTextDrawSetString(killeridTextHUD[killerid][2], STR);
    }
    
    if(
IsPlayerOnAdminDuty(playerid))
    {
        return 
0;
    }
    new
        
deathreason GetLastHitByWeapon(playerid),
        
deathreasonstring[256];
    
SetPlayerBitFlag(playeridDyingtrue);
    
SetPlayerBitFlag(playeridSpawnedfalse);
    
SetPlayerBitFlag(playeridAlivefalse);
    
GetPlayerPos(playeriddeath_PosX[playerid], death_PosY[playerid], death_PosZ[playerid]);
    
GetPlayerFacingAngle(playeriddeath_RotZ[playerid]);
    if(
IsPlayerInAnyVehicle(playerid))
    {
        
RemovePlayerFromVehicle(playerid);
        
TogglePlayerSpectating(playeridtrue);
        
TogglePlayerSpectating(playeridfalse);
        
death_PosZ[playerid] += 0.5;
    }
    
HideWatch(playerid);
    
DropItems(playeriddeath_PosX[playerid], death_PosY[playerid], death_PosZ[playerid], death_RotZ[playerid], true);
    
RemovePlayerWeapon(playerid);
    
SpawnPlayer(playerid);
    
ToggleArmour(playeridfalse);
    
KillPlayer(playeridkilleriddeathreason);

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)