Advertisement
Guest User

Rank System

a guest
Jul 4th, 2012
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.10 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6. #include <zcmd>
  7.  
  8. #if defined FILTERSCRIPT
  9.  
  10. public OnFilterScriptInit()
  11. {
  12. print("\n--------------------------------------");
  13. print(" Blank Filterscript by your name here");
  14. print("--------------------------------------\n");
  15. return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20. return 1;
  21. }
  22.  
  23. #else
  24.  
  25. main()
  26. {
  27. print("\n----------------------------------");
  28. print(" Blank Gamemode by your name here");
  29. print("----------------------------------\n");
  30. }
  31. #define COLOR_GREEN 0x008000FF
  32. #define COLOR_BLUE 0x0000FFFF
  33. #define COLOR_BRIGHTRED 0xFF000AAA
  34. #define COLOR_AQUA 0x00FFFFAA
  35. #define COLOR_GREY 0xAFAFAFAA
  36. #define COLOR_BEIGE 0xFFF8DCAA
  37. #define COLOR_BLACK 0x000000AA
  38. #define COLOR_LIGHTERBLUE 0x00BFFFAA
  39. #define COLOR_BLUELIGHT 0x1E90FFAA
  40. #define COLOR_BLUEMEDIUM 0x0000CDAA
  41. #define COLOR_BLUEDARK 0x00008BAA
  42. #define COLOR_PINK 0xFF1493AA
  43. #define COLOR_PINKDARK 0xFF00FFAA
  44. #define COLOR_GREENLIGHT 0x00FF00AA
  45. #define COLOR_GREENDARK 0x006400AA
  46. #define COLOR_MAROON 0x800000AA
  47. #define COLOR_OKER 0x808000AA
  48. #define COLOR_ORANGE 0xFF4500AA
  49. #define COLOR_ORANGELIGHT 0xFF8C00AA
  50. #define COLOR_PURPLE 0x800080AA
  51. #define COLOR_VIOLETDARK 0x9400D3AA
  52. #define COLOR_INDIGO 0xAB0082AA
  53. #define COLOR_RED 0xFF0000AA
  54. #define COLOR_SAND 0xFFDEADAA
  55. #define COLOR_SILVER 0xC0C0C0AA
  56. #define COLOR_TEAL 0x008080AA
  57. #define COLOR_WHITE 0xFFFFFFAA
  58. #define COLOR_YELLOW 0xFFFF00AA
  59. #define COLOR_GOLD 0xFFD700AA
  60. #define COLOR_BROWN 0x8B4513AA
  61. #define COLOR_BROWNLIGHT 0xA0522DAA
  62. #define COLOR_GRAY 0xA9A9A9AA
  63. #define COLOR_GRAYDARK 0x696969AA
  64. #define COLOR_INVISIBLE 0xFFFFFF00
  65.  
  66. #endif
  67.  
  68. public OnGameModeInit()
  69. {
  70. // Don't use these lines if it's a filterscript
  71. SetGameModeText("Blank Script");
  72. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  73. return 1;
  74. }
  75.  
  76. public OnGameModeExit()
  77. {
  78. return 1;
  79. }
  80.  
  81. public OnPlayerRequestClass(playerid, classid)
  82. {
  83. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  84. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  85. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  86. return 1;
  87. }
  88.  
  89. public OnPlayerConnect(playerid)
  90. {
  91. return 1;
  92. }
  93.  
  94. public OnPlayerDisconnect(playerid, reason)
  95. {
  96. return 1;
  97. }
  98.  
  99. public OnPlayerSpawn(playerid)
  100. {
  101. if (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 100)
  102. {
  103. SetPlayerHealth(playerid, 100);
  104. SendClientMessage(playerid, COLOR_RED,"Your Rank Is Soldier Therefore You Spawn With 100 Health");
  105. }
  106. if (GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) <= 200)
  107. {
  108. SetPlayerHealth(playerid, 100);
  109. SetPlayerArmour(playerid, 50);
  110. SendClientMessage(playerid, COLOR_RED,"Your Rank Is Colonel Therefore You Spawn With 100 Health And 50 Armour");
  111. }
  112. if (GetPlayerScore(playerid) >= 200)
  113. {
  114. SetPlayerHealth(playerid, 100);
  115. SetPlayerArmour(playerid, 100);
  116. SendClientMessage(playerid, COLOR_RED,"Your Rank Is Commander Therefore You Spawn With 100 Health And 100 Armour");
  117. }
  118. return 1;
  119. }
  120.  
  121. public OnPlayerDeath(playerid, killerid, reason)
  122. {
  123. return 1;
  124. }
  125.  
  126. public OnVehicleSpawn(vehicleid)
  127. {
  128. return 1;
  129. }
  130.  
  131. public OnVehicleDeath(vehicleid, killerid)
  132. {
  133. return 1;
  134. }
  135.  
  136. public OnPlayerText(playerid, text[])
  137. {
  138. return 1;
  139. }
  140.  
  141. public OnPlayerCommandText(playerid, cmdtext[])
  142. {
  143. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  144. {
  145. // Do something here
  146. return 1;
  147. }
  148. return 0;
  149. }
  150. CMD:myrank(playerid, params[])
  151. {
  152. if (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 100)
  153. {
  154. SendClientMessage(playerid, COLOR_RED,"Your Are A Soldier");
  155. }
  156. if (GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) <= 200)
  157. {
  158. SendClientMessage(playerid, COLOR_RED,"Your Are A Colonel");
  159. }
  160. if (GetPlayerScore(playerid) >= 200)
  161. {
  162. SendClientMessage(playerid, COLOR_RED,"Your Are A Commander");
  163. }
  164. return 1;
  165. }
  166. CMD:ranks(playerid, params[])
  167. {
  168. ShowPlayerDialog(playerid, 12516, DIALOG_STYLE_MSGBOX,"{FFFF00}Ranks","{FFF000}Rank 1 Soldier (0 Scores)\n{F235FF}Rank 2 Colonel (100 Scores)\n{00FF32}Rank 3 Colonel (200 Scoores))","Okay","");
  169. return 1;
  170. }
  171.  
  172.  
  173. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  174. {
  175. return 1;
  176. }
  177.  
  178. public OnPlayerExitVehicle(playerid, vehicleid)
  179. {
  180. return 1;
  181. }
  182.  
  183. public OnPlayerStateChange(playerid, newstate, oldstate)
  184. {
  185. return 1;
  186. }
  187.  
  188. public OnPlayerEnterCheckpoint(playerid)
  189. {
  190. return 1;
  191. }
  192.  
  193. public OnPlayerLeaveCheckpoint(playerid)
  194. {
  195. return 1;
  196. }
  197.  
  198. public OnPlayerEnterRaceCheckpoint(playerid)
  199. {
  200. return 1;
  201. }
  202.  
  203. public OnPlayerLeaveRaceCheckpoint(playerid)
  204. {
  205. return 1;
  206. }
  207.  
  208. public OnRconCommand(cmd[])
  209. {
  210. return 1;
  211. }
  212.  
  213. public OnPlayerRequestSpawn(playerid)
  214. {
  215. return 1;
  216. }
  217.  
  218. public OnObjectMoved(objectid)
  219. {
  220. return 1;
  221. }
  222.  
  223. public OnPlayerObjectMoved(playerid, objectid)
  224. {
  225. return 1;
  226. }
  227.  
  228. public OnPlayerPickUpPickup(playerid, pickupid)
  229. {
  230. return 1;
  231. }
  232.  
  233. public OnVehicleMod(playerid, vehicleid, componentid)
  234. {
  235. return 1;
  236. }
  237.  
  238. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  239. {
  240. return 1;
  241. }
  242.  
  243. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  244. {
  245. return 1;
  246. }
  247.  
  248. public OnPlayerSelectedMenuRow(playerid, row)
  249. {
  250. return 1;
  251. }
  252.  
  253. public OnPlayerExitedMenu(playerid)
  254. {
  255. return 1;
  256. }
  257.  
  258. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  259. {
  260. return 1;
  261. }
  262.  
  263. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  264. {
  265. return 1;
  266. }
  267.  
  268. public OnRconLoginAttempt(ip[], password[], success)
  269. {
  270. return 1;
  271. }
  272.  
  273. public OnPlayerUpdate(playerid)
  274. {
  275. return 1;
  276. }
  277.  
  278. public OnPlayerStreamIn(playerid, forplayerid)
  279. {
  280. return 1;
  281. }
  282.  
  283. public OnPlayerStreamOut(playerid, forplayerid)
  284. {
  285. return 1;
  286. }
  287.  
  288. public OnVehicleStreamIn(vehicleid, forplayerid)
  289. {
  290. return 1;
  291. }
  292.  
  293. public OnVehicleStreamOut(vehicleid, forplayerid)
  294. {
  295. return 1;
  296. }
  297.  
  298. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  299. {
  300. return 1;
  301. }
  302.  
  303. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  304. {
  305. return 1;
  306. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement