Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #define Dialogonclick 700
- new c_score,c_money,Float:c_health,Float:c_armour,c_deaths,c_kills, c_skin;
- enum k_m{ Kills, Deaths,}
- new c_stat[MAX_PLAYERS][k_m];
- new PlayerName[MAX_PLAYER_NAME];
- new string[150];
- new msgbox[150];
- public OnFilterScriptInit()
- {
- print(" ----------------------------------- ");
- print(" -----------Stats u Dialogu-----------\n");
- print(" -------------7/23/2012-------------\n");
- print(" -------------Loaded--------------\n");
- print(" -------------------------------");
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- c_stat[playerid][Deaths]++;
- c_stat[killerid][Kills]++;
- return 1;
- }
- //------------|KOMANDA|------------//
- CMD:stats(playerid, params[])
- {
- c_score=GetPlayerScore(playerid);
- c_skin=GetPlayerSkin(playerid);
- GetPlayerHealth(playerid,c_health);
- GetPlayerArmour(playerid,c_armour);
- c_money=GetPlayerMoney(playerid);
- c_deaths=c_stat[playerid][Deaths];
- c_kills=c_stat[playerid][Kills];
- GetPlayerName(playerid,PlayerName,MAX_PLAYER_NAME);
- format(PlayerName,sizeof PlayerName,"Ime: %s",PlayerName);
- msgbox="Level: %d\nNovac: %d\nHealth: %.1f\nPancir: %.1f\nSmrti: %d\nUbistava: %d\nSkin ID: %d";
- format(string,sizeof string,msgbox,c_score,c_money,c_health,c_armour,c_deaths,c_kills,c_skin);
- ShowPlayerDialog(playerid,Dialogonclick,0,PlayerName,string,"Ok","");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment