Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //topo:
- enum en_pstats
- {
- pkills,
- pmortes,
- pkillhim
- }
- new pstats[MAX_PLAYERS][en_pstats];
- //no comando "/kill":
- pstats[playerid][pkillhim]++;
- //no OnPlayerDeath:
- pstats[playerid][pmortes]++;
- pstats[killerid][pkills]++;
- //comando /stats:
- if(!strcmp(cmd, "/stats", true))
- {
- new tmp[256];
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))return SendClientMessage(playerid, 0xFFFFFFAA, "USE: /stats [id]");
- new plid = strval(tmp);
- if(IsPlayerConnected(plid))
- {
- new string2[0x100], pname[MAX_PLAYER_NAME], Float:health2, Float:armour;
- GetPlayerName(plid, pname, sizeof pname);
- format(string2, sizeof string2, "Stats de %s:", pname);
- SendClientMessage(playerid, 0xFF0000AA, string);
- format(string2, sizeof string2, "Matou: [%d] Morreu: [%d] Suicidou: [%d] Dinheiro: [%d] Score: [%d]",
- pstats[plid][pkills], pstats[plid][pmortes], pstats[plid][pkillhim], GetplayerMoney(plid), GetPlayerScore(plid));
- SendClientMessage(playerid, 0xFFFFFFAA, string2);
- GetPlayerHealth(plid, health2);
- GetPlayerArmour(plid, armour);
- format(string2, sizeof string2, "Vida: [%.1f] Colote: [%.1f]", health2, armour);
- SendClientMessage(playerid, 0xFFFFFFAA, string2);
- } else {
- SendClientMessage(playerid, 0xFF0000AA, "Jogador nοΏ½o conectado!");
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment