How to get kills and deaths for /stats?
#1

sup guys i made this:

Код:
dcmd_stats(playerid, params[])
{
	new name[MAX_PLAYER_NAME], str[256], ip[16];
	GetPlayerName(playerid,(name),sizeof(name));
    GetPlayerIp(playerid, ip, sizeof(ip));
	format(str, sizeof(str), "| %s Stats: Id: %i | Kills: %d | Deaths: %d | Ip: %i", name, playerid, gPlayerInfo[playerid][PLAYER_KILLS], gPlayerInfo[playerid][PLAYER_DEATHS], ip);
	SendClientMessage(playerid, COLOR_GREEN, str);
	if(gPlayerInfo[playerid][PLAYER_VIP] == 1)
	{
	SendClientMessage(playerid, COLOR_GREEN, "<|VIP|>: Yes");
	}
	else
    {
    SendClientMessage(playerid, COLOR_GREEN, "<|VIP|>: No");
	}
	return 1;
}
but kills and deaths are not showing (both 0).
Reply
#2

It means it's place holder is 0. I see no problem in it. Show us the load part.
Reply
#3

I see a very big problem. When using SendClientMessage you cannot ever exceed 128 cells per string, so why on earth do you have 256 do you know how much CPU that will use?
Reply
#4

nvm i forgot to add the kills and deaths ++ in onplayerdeath
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)