OnPlayerDeath on /stats
#1

Can someone help me with the on player death section? I have a /stats command that is meant to show the deaths but it doesn't! Please can you help?

OnPlayerDeath line:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	SendDeathMessage(killerid, playerid, reason);
 	if(killerid != INVALID_PLAYER_ID)
    {
        PlayerInfo[killerid][pKills]++;
    }
    PlayerInfo[playerid][pDeaths]++;
    return 1;
}
command(stats-... line:
Код:
command(stats, playerid, params[])
{
	new string[128];
	SendClientMessage(playerid, COLOR_ORANGE, ". : : Statistics : : .");
	format(string, sizeof(string), "| Cash: $%d | Kills: %dK | Deaths: %dD |", PlayerInfo[playerid][pCash], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]);
	SendClientMessage(playerid, SERVERCOLOR, string);
	if(PlayerInfo[playerid][pAdmin] >= 1)
	{
		format(string, sizeof(string), "| Admin Level: %d | Helper Level: %d |", PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pHelper]);
		SendClientMessage(playerid, SERVERCOLOR, string);
	}
	return 1;
}
Reply


Messages In This Thread
OnPlayerDeath on /stats - by OMonger - 11.05.2015, 18:32
Re : OnPlayerDeath on /stats - by StreetRP - 11.05.2015, 18:52
Re: Re : OnPlayerDeath on /stats - by OMonger - 11.05.2015, 18:54
Re : OnPlayerDeath on /stats - by StreetRP - 11.05.2015, 18:57
Re: OnPlayerDeath on /stats - by Luis- - 11.05.2015, 20:15

Forum Jump:


Users browsing this thread: 1 Guest(s)