16.08.2012, 20:13
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:
and there is counting:
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; }
Код:
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; }