Guest User

STATS U DIALOGU [ZCMD]

a guest
Jul 24th, 2012
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3. #define Dialogonclick 700
  4.  
  5. new c_score,c_money,Float:c_health,Float:c_armour,c_deaths,c_kills, c_skin;
  6. enum k_m{ Kills, Deaths,}
  7. new c_stat[MAX_PLAYERS][k_m];
  8. new PlayerName[MAX_PLAYER_NAME];
  9. new string[150];
  10. new msgbox[150];
  11. public OnFilterScriptInit()
  12. {
  13. print(" ----------------------------------- ");
  14. print(" -----------Stats u Dialogu-----------\n");
  15. print(" -------------7/23/2012-------------\n");
  16. print(" -------------Loaded--------------\n");
  17. print(" -------------------------------");
  18. return 1;
  19. }
  20.  
  21. public OnPlayerDeath(playerid, killerid, reason)
  22. {
  23. c_stat[playerid][Deaths]++;
  24. c_stat[killerid][Kills]++;
  25. return 1;
  26. }
  27.  
  28. //------------|KOMANDA|------------//
  29.  
  30. CMD:stats(playerid, params[])
  31. {
  32. c_score=GetPlayerScore(playerid);
  33. c_skin=GetPlayerSkin(playerid);
  34. GetPlayerHealth(playerid,c_health);
  35. GetPlayerArmour(playerid,c_armour);
  36. c_money=GetPlayerMoney(playerid);
  37. c_deaths=c_stat[playerid][Deaths];
  38. c_kills=c_stat[playerid][Kills];
  39. GetPlayerName(playerid,PlayerName,MAX_PLAYER_NAME);
  40. format(PlayerName,sizeof PlayerName,"Ime: %s",PlayerName);
  41. msgbox="Level: %d\nNovac: %d\nHealth: %.1f\nPancir: %.1f\nSmrti: %d\nUbistava: %d\nSkin ID: %d";
  42. format(string,sizeof string,msgbox,c_score,c_money,c_health,c_armour,c_deaths,c_kills,c_skin);
  43. ShowPlayerDialog(playerid,Dialogonclick,0,PlayerName,string,"Ok","");
  44. return 1;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment