Death Message Bug
#1

Please first see the photo
https://imgur.com/a/NoAKuLX

Player 'XcW' has killed me with vehicle hunter but death message show the parachute reason
How to fix??

Public OnPlayerDeath:
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
duelinfo[playerid][induel] = 0;
User[playerid][CountCZEx] = 0;
InDM[playerid] = 0;
if(killerid != INVALID_PLAYER_ID)
{
SendDeathMessage(killerid, playerid, reason);

            if(duelinfo[killerid][induel] == 1)
            {
            duelinfo[killerid][induel] = 0;
            InDM[killerid] = 0;
            User[playerid][emtiaz] -= 1;
            User[killerid][emtiaz] += 1;
            SendFormatedMessage(playerid, 0x04B4AEFF,"[Duel]{8A084B} To Duel Ra Ba %s Bakhti! -1 Emtiaz Az Dast Dadi!",GetName(killerid));
            SendFormatedMessage(killerid, 0x04B4AEFF,"[Duel]"green" Ziba Koshtish %s Ra! +1 Emtiaz Be Dast Avardi!",GetName(playerid));
            SetSpawnInfo(killerid, 0, PlayerSkinEx[killerid], 1109.3820,1911.1990,10.8203,87.9922,0,0,0,0,0,0);
            SpawnPlayer(killerid);
            }
           
if(InDM[playerid] == 0 || InDM[playerid] == 1 || InDM[killerid] == 0 || InDM[killerid] == 1)
{
        Skills[killerid] ++;
        CheckKills(killerid);
        if(GetPlayerClass(killerid) == ClassJasoos)
        {
        GameTextForPlayer(playerid, "~h~~y~Shoma Tavsote ~h~~b~Jasoos ~h~~y~Koshte Shodid!", 5000, 3);
        }
        new ammount = 500+random(12000);
        new aammount = random(8500);
       
        User[killerid][emtiaz] += 2;
        SendFormatedMessage(killerid, 0x00FF00FF,"Ghashng Koshtish, %s Ra! Shoma $%d Rial Pool Va +2 Emtiaz Be Dast Avordid!", GetName(playerid),ammount);

        if(GetPlayerScore(playerid) == 1)
        {
        SendClientMessage(playerid, 0xB18904FF,"{FA5858}Bedalile Inke Shoma Sarbaz Hastid Pooli Az Shoma Kasr Nagardid.");
        }
        else
        {
        SendFormatedMessage(playerid, 0xB18904FF,"{FA5858}Shoma $%d Rial Bekhatere Mordan Az Dast Dadid!", aammount);
        GivePlayerCash(killerid, -aammount);
        }
        AntiDeathSpawn[playerid] = 0;
        User[killerid][kills] ++;
        User[playerid][deaths] ++;
        User[playerid][wanteds] = 0;
        User[playerid][wanteds] ++;
        User[killerid][CountKills] ++;
       
        User[playerid][CountCZ] = 0;
        duelinfo[playerid][induel] = 0;
        duelinfo[killerid][induel] = 0;
       
        if(GetVipLevel(killerid) >= 2)
        {
        User[killerid][emtiaz] += 2;
        GivePlayerCash(killerid, ammount+1000);
        SendClientMessage(killerid, COLOR_GREY, "[VIP] +2 Emtiaz Va $1000 Rial Pool Bishtar Baraye Koshtan!");
        }
        else
        {
        GivePlayerCash(killerid, ammount);
        }

        CBugPackage[playerid] = 0;
        InDM[playerid] = 0;
        InGG[playerid] = 0;
        Skills[playerid] = 0;
        pInfo[playerid][pKills] = 0;
        Helmet[playerid] = 0;
        RemovePlayerAttachedObject( playerid, 1);
        Skills[playerid] = 0;
       
        if(InDM[playerid] == 1 || InDM[killerid] == 1)
        {
        SetPlayerVirtualWorld(playerid,0);
        pInfo[playerid][pKills] = 0;
        HideAllTextDraws(playerid);

        pInfo[killerid][pKills] ++;
        }

        }
        }
       
        if(cBankCP[playerid] == true || cCarBankCP[playerid] == true)
        {
        cCarBankCP[playerid] = false;
        cBankCP[playerid] = false;
        RobBank[playerid] = false;
        RemovePlayerAttachedObject(playerid, 2);
        DisablePlayerCheckpoint(playerid);
        }
        if(Joined[playerid] == true)
        {
        JoinCount--;
        Joined[playerid] = false;
        DestroyVehicle(CreatedRaceVeh[playerid]);
        DisablePlayerRaceCheckpoint(playerid);
        TextDrawHideForPlayer(playerid, RaceInfo[playerid]);
        CPProgess[playerid] = 0;
        KillTimer(InfoTimer[playerid]);
        #if defined RACE_IN_OTHER_WORLD
        SetPlayerVirtualWorld(playerid, 0);
        #endif
        }
        if(BuildRace == playerid+1) BuildRace = 0;

    if(IsBeingSpeced[playerid] == 1)//If the player being spectated, dies, then turn off the spec mode for the spectator.
    {
        for(SelectAllPlayers(i))
        {
          if(IsPlayerConnected(i))
          {
            if(spectatorid[i] == playerid)
            {
                TogglePlayerSpectating(i,false);// This justifies what's above, if it's not off then you'll be either spectating your connect screen, or somewhere in blueberry (I don't know why)
            }
        }
        }
    }
   
        SetSpawnInfo(playerid, 0, PlayerSkinEx[playerid],1109.3820,1911.1990,10.8203,87.9922,0,0,0,0,0,0)
    return 1;
}
Reply
#2

anyone?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)