Kills and Death not registering
#1

Kills and deaths register at 0 even when a player dies or I kill a player.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    PlayerInfo[killerid][pKills]++;
    PlayerInfo[playerid][pDeaths]++;
    return 1;
}
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    new AccType[128],
        AdmRank[128];
    if(PlayerInfo[playerid][pVip] == 0) { AccType = "Regular Account"; }
    else if(PlayerInfo[clickedplayerid][pVip] == 1) { AccType = "Silver Account"; }
    else if(PlayerInfo[clickedplayerid][pVip] == 2) { AccType = "Premium Account"; }
    else if(PlayerInfo[playerid][pVip] == 3) { AccType = "Gold Account"; }
    if(PlayerInfo[clickedplayerid][pAdmin] == 0) { AdmRank = "Regular Member"; }
    else if(PlayerInfo[clickedplayerid][pAdmin] == 1) { AdmRank = "Moderator"; }
    else if(PlayerInfo[clickedplayerid][pAdmin] == 2) { AdmRank = "Professional Moderator"; }
    else if(PlayerInfo[clickedplayerid][pAdmin] == 3) { AdmRank = "Administrator"; }
    else if(PlayerInfo[clickedplayerid][pAdmin] == 4) { AdmRank = "Professional Administrator"; }
    else if(PlayerInfo[clickedplayerid][pAdmin] > 5) { AdmRank = "Owner"; }
    new kills = PlayerInfo[clickedplayerid][pKills],
        deaths = PlayerInfo[clickedplayerid][pDeaths],
        score = PlayerInfo[clickedplayerid][pScore],
        cash = PlayerInfo[clickedplayerid][pCash],
        string[256],
        string1[40];
    format(string1,sizeof(string1),"%s stats",GetName(clickedplayerid));
    format(string,sizeof(string),"%s currently has %i Kills and %i Deaths\n%s is currently a %s with a %s\n%s currently has $%d in his pocket\nHe also has a total of %d points\nHis internet connection is currently registered at %d ms",GetName(clickedplayerid),kills,deaths, GetName(clickedplayerid),AdmRank,AccType,GetName(clickedplayerid), cash, score, GetPlayerPing(clickedplayerid));
    ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, string1, string, "Close", ""); //Shows dialog with admins, one button "Close"
    return 1;
}
Reply


Messages In This Thread
Kills and Death not registering - by HydraX - 17.08.2012, 19:29
Re: Kills and Death not registering - by leonardo1434 - 17.08.2012, 19:34
Respuesta: Re: Kills and Death not registering - by HydraX - 17.08.2012, 19:38
Re: Kills and Death not registering - by Dan. - 17.08.2012, 19:47
Re: Kills and Death not registering - by leonardo1434 - 17.08.2012, 19:51
Respuesta: Kills and Death not registering - by HydraX - 17.08.2012, 20:09
Respuesta: Kills and Death not registering - by HydraX - 17.08.2012, 20:22

Forum Jump:


Users browsing this thread: 1 Guest(s)