Players doesn't die "properly"
#1

I don't know what's the problem, but sometimes players doesn't die "properly". Someone kills them, and it is visible that they are death on the "death list", but they can still move with 0hp and others see them lying without health.

I've already set instagib variable to 1, but it doesn't helps.
Reply
#2

Could you please upload your OnPlayerDeath line using the Pawn tags.
Or please do so with the line the death thing is coming from.

Pawn tags:

pawn Код:
Shit here
which is [ pawn] [/pawn] (Without the space.)
Reply
#3

It is unique script.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(IsPlayerInGroup(killerid))
    {
        new buffer[32];
        GetPVarString(killerid, "Group Name", buffer, sizeof(buffer));
       
        if(buffer[0] != '\0' && buffer[1] != '\0')
        {
            SetGroupScore(buffer, GetGroupScore(buffer) + 1);
        }
    }
   
    SendDeathMessage(killerid, playerid, reason);
    GivePlayerMoneyEx(killerid, GetPlayerMoneyEx(playerid));
   
    SetPVarInt(killerid, "Kills", GetPVarInt(killerid, "Kills") + 1);
    SetPVarInt(playerid, "Deaths", GetPVarInt(playerid, "Deaths") + 1);
   
    SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
   
    SavePlayerData(playerid);
    SavePlayerData(killerid);
   
    if(IsPlayerConnected(killerid) && killerid != playerid && killerid != -1)
    {
        for(new i=0; i < MAX_PLAYERS; i++)
        {
            if(GetPVarType(i, "Bounty On") == PLAYER_VARTYPE_INT && GetPVarInt(i, "Bounty On") == playerid)
            {
                GivePlayerMoneyEx(killerid, GetPVarInt(i, "Bounty Value"));

                new string[128], playerName[MAX_PLAYER_NAME], killerName[MAX_PLAYER_NAME];

                GetPlayerName(playerid, playerName, sizeof(playerName));
                GetPlayerName(killerid, killerName, sizeof(killerName));

                format(string, sizeof(string), "SERVER: Player %s has killed wanted player %s and got a reward of $%i.", killerName, playerName, GetPVarInt(i, "Bounty Value"));
                SendClientMessageToAll(COLOR_RED, string);

                DeletePVar(i, "Bounty On");
                DeletePVar(i, "Bounty Value");
            }
        }
    }
   
    TextDrawHideForPlayer(playerid, txtTimeDisp);
    TextDrawHideForPlayer(playerid, LocationTextdraw[playerid]);
    TextDrawHideForPlayer(playerid, WebsiteTextdraw);
    TextDrawHideForPlayer(playerid, BoxTextdraw);
   
    if(gPlayerUsingLoopingAnim[playerid])
    {
        gPlayerUsingLoopingAnim[playerid] = 0;
    }
    return 1;
}
Reply
#4

Have you used the search bar at all?
Reply
#5

Yep

The message you have entered is too short. Please lengthen your message to at least 8 characters.
Reply
#6

Hmmm....this might be a SA-MP glitch because when I also kill someone or someone kills me, I am still alive for more than 5 seconds.
Reply
#7

It sometimes happens to me when I kill others.
Must be a 0.3b glitch?
Reply
#8

It will still take a while for them to die... but OnPlayerDeath, add


pawn Код:
ClearAnimations(playerid);
Reply
#9

Yeah, thanks! It helped.
Reply
#10

Put SetPlayerHealth(playerid, 100.0); at the end of OnPlayerDeath. Works every time!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)