Stats help
#1

I have problems with counting kills and deaths. When I put number of kills in my scriptfiles it load it IG, but dont count when i kill somebody or get killed.

here is the cmd:
Код:
CMD:stats(playerid, params[])
{
	new stats[300];
	format(stats, sizeof(stats), " Level: %d \n Ubistva: %d \n Smrti: %d \n Novac: %d \n Banka: %d \n Admin level: %d", PlayerInfo[playerid][Rank], PlayerInfo[playerid][Ubistva], PlayerInfo[playerid][Smrti], PlayerInfo[playerid][Novac], PlayerInfo[playerid][Banka], PlayerInfo[playerid][Admin]);
	ShowPlayerDialog(playerid, 520, DIALOG_STYLE_MSGBOX, "Statistika", stats, "OK", "");
	return 1;
}
and there is counting:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	new skor;
	SendDeathMessage(killerid, playerid, reason);
	skor = GetPlayerScore(killerid);
	SetPlayerScore(killerid, skor + 1);
	GivePlayerMoney(playerid, -300);
	GivePlayerMoney(killerid, 500);
	PlayerInfo[killerid][Ubistva] ++;
	PlayerInfo[playerid][Smrti] ++;
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)