SHARE
TWEET

NRank

a guest Nov 13th, 2012 287 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //================================Include=====================================//
  2. #include <a_samp>
  3. #include <zcmd>
  4. //============================================================================//
  5.  
  6. #if defined FILTERSCRIPT
  7.  
  8. public OnFilterScriptInit()
  9. {
  10.         print("\n--------------------------------------");
  11.         print("         Nirzor's Rank System V1.0      ");
  12.         print("--------------------------------------\n");
  13.         return 1;
  14. }
  15.  
  16. public OnFilterScriptExit()
  17. {
  18.         return 1;
  19. }
  20.  
  21. #else
  22.  
  23. //===============================Colors=======================================//
  24. #define COLOR_GREEN 0x008000FF
  25. #define COLOR_BLUE 0x0000FFFF
  26. #define COLOR_BRIGHTRED 0xFF000AAA
  27. #define COLOR_AUA 0x00FFFFAA
  28. #define COLOR_GREY 0xAFAFAFAA
  29. #define COLOR_BEIGE 0xFFF8DCAA
  30. #define COLOR_BLACK 0x000000AA
  31. #define COLOR_LIGHTERBLUE 0x00BFFFAA
  32. #define COLOR_BLUELIGHT 0x1E90FFAA
  33. #define COLOR_BLUEMEDIUM 0x0000CDAA
  34. #define COLOR_BLUEDARK 0x00008BAA
  35. #define COLOR_PINK 0xFF1493AA
  36. #define COLOR_PINKDARK 0xFF00FFAA
  37. #define COLOR_GREENLIGHT 0x00FF00AA
  38. #define COLOR_GREENDARK 0x006400AA
  39. #define COLOR_MAROON 0x800000AA
  40. #define COLOR_OKER 0x808000AA
  41. #define COLOR_ORANGE 0xFF4500AA
  42. #define COLOR_ORANGELIGHT 0xFF8C00AA
  43. #define COLOR_PURPLE 0x800080AA
  44. #define COLOR_VIOLETDARK 0x9400D3AA
  45. #define COLOR_INDIGO 0xAB0082AA
  46. #define COLOR_RED 0xFF0000AA
  47. #define COLOR_SAND 0xFFDEADAA
  48. #define COLOR_SILVER 0xC0C0C0AA
  49. #define COLOR_TEAL 0x008080AA
  50. #define COLOR_WHITE 0xFFFFFFAA
  51. #define COLOR_YELLOW 0xFFFF00AA
  52. #define COLOR_GOLD 0xFFD700AA
  53. #define COLOR_BROWN 0x8B4513AA
  54. #define COLOR_BROWNLIGHT 0xA0522DAA
  55. #define COLOR_GRAY 0xA9A9A9AA
  56. #define COLOR_GRAYDARK 0x696969AA
  57. #define COLOR_INVISIBLE 0xFFFFFF00
  58. #define COLOR_INDIA  0x80000096
  59. #define COLOR_PAKISTAN 0x40808096
  60. #define COLOR_NEPAL 0x8000FF96
  61. #define COLOR_BRAZIL 0xB7B70096
  62. #define COLOR_CHINA 0x80808096
  63. #define COLOR_GREECE 0x00000096
  64. #define COLOR_SINGAPORE 0x00FFFF96
  65. #define COLOR_IRAQ 0x8080C096
  66. #define C_GREY 0xAFAFAFAA
  67. #define C_VIOLET 0x9955DEEE
  68. #define COLOR_SU 0x6E00FFFF
  69. #define COLOR_RF 0xE10000FF
  70. #define COLOR_SI 0xFFE600FF
  71. #define COLOR_USA  0x00808096
  72. //============================================================================//
  73.  
  74. #endif
  75.  
  76. public OnPlayerConnect(playerid)
  77. {
  78.         return 1;
  79. }
  80.  
  81. public OnPlayerDisconnect(playerid, reason)
  82. {
  83.         return 1;
  84. }
  85.  
  86. public OnPlayerSpawn(playerid)
  87. {
  88.         return 1;
  89. }
  90.  
  91. public OnPlayerDeath(playerid, killerid, reason)
  92. {
  93.         return 1;
  94. }
  95.  
  96. public OnVehicleSpawn(vehicleid)
  97. {
  98.         return 1;
  99. }
  100.  
  101. public OnVehicleDeath(vehicleid, killerid)
  102. {
  103.         return 1;
  104. }
  105.  
  106. public OnPlayerText(playerid, text[])
  107. {
  108.         return 1;
  109. }
  110.  
  111. public OnPlayerCommandText(playerid, cmdtext[])
  112. {
  113.         return 0;
  114. }
  115. CMD:rank(playerid, params[])
  116. {
  117.     Rank(playerid);
  118.     return 1;
  119. }
  120. CMD:ranks(playerid, params[])
  121. {
  122.     Rank(playerid);
  123.     ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "{6EF83C}**** Ranks ****:", "{00FF00}Rank - 0 Rookie (0)\n{00FF00}Rank - 1 Private Shooter (200)\n{00FF00}Rank - 2 Commander (400)\n{00FF00}Rank - 3 Brigadiar (600)\n{00FF00}Rank - 4 Commander (800)\n{00FF00}Rank - 5 Commander (1000)", "Play","");
  124.     return 1;
  125. }
  126. CMD:callbackup(playerid, params[])
  127. {
  128.     if(GetPlayerScore(playerid) >= 600)
  129.     {
  130.      new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid, Name, sizeof(Name));
  131.      new string[128];
  132.      format(string, sizeof(string), "[REQUESTING BACKUP]: %s is requesting for backup!", Name);
  133.      printf("%s", string);
  134.     }
  135.     else
  136.     {
  137.     SendClientMessage(playerid, COLOR_RED,"You need to be Rank - 2 to use this command!");
  138.         }
  139.     return 1;
  140. }
  141. CMD:rjet(playerid, params[])
  142. {
  143.     if(GetPlayerScore(playerid) >= 600)
  144.     {
  145.      SetPlayerSpecialAction(playerid, 2);
  146.      SendClientMessage(playerid, -1,"You have got a jetpack.");
  147.     }
  148.     else
  149.     {
  150.     SendClientMessage(playerid, COLOR_RED,"You need to be Rank - 2 to use this command!");
  151.         }
  152.     return 1;
  153. }
  154. CMD:rankcmds(playerid, params[])
  155. {
  156.     SendClientMessage(playerid, -1,"/rjet,/callbackup");
  157.     return 1;
  158. }
  159. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  160. {
  161.         return 1;
  162. }
  163.  
  164. public OnPlayerExitVehicle(playerid, vehicleid)
  165. {
  166.         return 1;
  167. }
  168.  
  169. public OnPlayerStateChange(playerid, newstate, oldstate)
  170. {
  171.         return 1;
  172. }
  173.  
  174. public OnPlayerEnterCheckpoint(playerid)
  175. {
  176.         return 1;
  177. }
  178.  
  179. public OnPlayerLeaveCheckpoint(playerid)
  180. {
  181.         return 1;
  182. }
  183.  
  184. public OnPlayerEnterRaceCheckpoint(playerid)
  185. {
  186.         return 1;
  187. }
  188.  
  189. public OnPlayerLeaveRaceCheckpoint(playerid)
  190. {
  191.         return 1;
  192. }
  193.  
  194. public OnRconCommand(cmd[])
  195. {
  196.         return 1;
  197. }
  198.  
  199. public OnPlayerRequestSpawn(playerid)
  200. {
  201.         return 1;
  202. }
  203.  
  204. public OnObjectMoved(objectid)
  205. {
  206.         return 1;
  207. }
  208.  
  209. public OnPlayerObjectMoved(playerid, objectid)
  210. {
  211.         return 1;
  212. }
  213.  
  214. public OnPlayerPickUpPickup(playerid, pickupid)
  215. {
  216.         return 1;
  217. }
  218.  
  219. public OnVehicleMod(playerid, vehicleid, componentid)
  220. {
  221.         return 1;
  222. }
  223.  
  224. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  225. {
  226.         return 1;
  227. }
  228.  
  229. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  230. {
  231.         return 1;
  232. }
  233.  
  234. public OnPlayerSelectedMenuRow(playerid, row)
  235. {
  236.         return 1;
  237. }
  238.  
  239. public OnPlayerExitedMenu(playerid)
  240. {
  241.         return 1;
  242. }
  243.  
  244. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  245. {
  246.         return 1;
  247. }
  248.  
  249. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  250. {
  251.         return 1;
  252. }
  253.  
  254. public OnRconLoginAttempt(ip[], password[], success)
  255. {
  256.         return 1;
  257. }
  258.  
  259. public OnPlayerUpdate(playerid)
  260. {
  261.         return 1;
  262. }
  263.  
  264. public OnPlayerStreamIn(playerid, forplayerid)
  265. {
  266.         return 1;
  267. }
  268.  
  269. public OnPlayerStreamOut(playerid, forplayerid)
  270. {
  271.         return 1;
  272. }
  273.  
  274. public OnVehicleStreamIn(vehicleid, forplayerid)
  275. {
  276.         return 1;
  277. }
  278.  
  279. public OnVehicleStreamOut(vehicleid, forplayerid)
  280. {
  281.         return 1;
  282. }
  283.  
  284. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  285. {
  286.         return 1;
  287. }
  288.  
  289. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  290. {
  291.         return 1;
  292. }
  293. forward Rank(playerid);
  294. public Rank(playerid)
  295. {
  296. if (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 200)
  297. {
  298.         SendClientMessage(playerid, -1,"You are rank 0 Rookie!");
  299. }
  300. if (GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) <= 400)
  301. {
  302.         SendClientMessage(playerid, -1,"You are rank 1 Private Shooter!");
  303. }
  304. if (GetPlayerScore(playerid) >= 400 && GetPlayerScore(playerid) <= 600)
  305. {
  306.         SendClientMessage(playerid, -1,"You are rank 2 Commander!");
  307. }
  308. if (GetPlayerScore(playerid) >= 600 && GetPlayerScore(playerid) <= 800)
  309. {
  310.         SendClientMessage(playerid, -1,"You are rank 3 Brigadier!");
  311. }
  312. if (GetPlayerScore(playerid) >= 800 && GetPlayerScore(playerid) <= 1000)
  313. {
  314.         SendClientMessage(playerid, -1,"You are rank 4 Master Shooter!");
  315. }
  316. if (GetPlayerScore(playerid) >= 1000)
  317. {
  318.         SendClientMessage(playerid, -1,"You are rank 5 General!");
  319. }
  320. return 1;
  321. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top