Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. #pragma ctrlchar '\'
  2.  
  3. #include <amxmodx>
  4. #include <pokemod>
  5.  
  6. new rankpokes[][] = {
  7. "Moltres",
  8. "Zapdos",
  9. "Articuno",
  10. "Mewtwo",
  11. "Mew"
  12. }
  13. new rankpoints[] = {
  14. 25000,
  15. 50000,
  16. 75000,
  17. 100000,
  18. 200000
  19. }
  20.  
  21. #define MAX_PLAYERS 32
  22. new oldrank[MAX_PLAYERS+1];
  23.  
  24. public plugin_init()
  25. {
  26. register_plugin("PokeMod Rank Pokes","0.1","Emp`")
  27. }
  28. public poke_player_event(id, event)
  29. {
  30. if( event & SI_SPAWN ){
  31. static i, newrank; newrank = Poke_PlayerRank(id);
  32. for( i=0; i<sizeof rankpoints; i++ ){
  33. if( oldrank[id] < rankpoints[i] && newrank >= rankpoints[i] ){
  34. if( Poke_Give_Poke(id, Poke_NameToPoke( rankpokes[i] ) ) ){
  35. new name[32]
  36. get_user_name(id, name, 31)
  37. client_print(0, print_chat, "[PokeMod] Congratulations %s! You have received a free %s for attaining a PokeRank of %d!", name, rankpokes[i], rankpoints[i] );
  38. oldrank[id] = newrank;
  39. }
  40. else {
  41. client_print(id, print_chat, "[PokeMod] Please make room in your party for your free %s!", rankpokes[i] );
  42. }
  43. }
  44. else
  45. oldrank[id] = newrank;
  46. }
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement