AwayTitan098

Scripting Tutorials

Apr 14th, 2023 (edited)
606
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.14 KB | None | 0 0
  1. #include <a_samp>
  2. #include <a_mysql>
  3. #include <Pawn.CMD>
  4. #include <sscanf2>
  5.  
  6. #define SCM SendClientMessage
  7. //-------------COLORS-----------------
  8. #define COLOR_DISPATCH 0xff4419ff
  9. #define COLOR_WHITE 0xFFFFFFFF
  10. #define COLOR_SYNTAX 0xAFAFAFFF
  11. #define COLOR_YELLOW 0xFFFF00FF
  12. #define COLOR_LIGHTBLUE1 0x33CCFFAA
  13. #define COLOR_YELLOW2 0xF5DEB3FF
  14. #define COLOR_LIGHTORANGE 0xF7A763FF
  15. #define COLOR_AQUA 0xCCFFFFFF
  16. #define COLOR_NEWS 0xFFA500AA
  17. #define COLOR_GREEN 0x32CD32FF
  18. #define COLOR_GREY 0xAFAFAFFF
  19. #define COLOR_GREY1 0xE6E6E6FF
  20. #define COLOR_GREY2 0xC8C8C8FF
  21. #define COLOR_GREY3 0xAAAAAAFF
  22. #define COLOR_GREY4 0x8C8C8CFF
  23. #define COLOR_GREY5 0x6E6E6EFF
  24. #define COLOR_LIGHTRED 0xFF6347FF
  25. #define COLOR_ORANGE 0xFF9900FF
  26. #define COLOR_RED 0xAA3333FF
  27. #define COLOR_HUNT 0xFF42CFFF
  28. #define COLOR_PURPLE 0xC2A2DAFF
  29. #define COLOR_NEWBIE 0x7DAEFFFF
  30. #define COLOR_PINK 0xFF66FFAA
  31. #define COLOR_BLUE 0x233EFAFF
  32. #define COLOR_ROYALBLUE 0x9999FFFF
  33. #define COLOR_DOCTOR 0xFF8282FF
  34. #define COLOR_DARKGREEN 0x00AA00FF
  35. #define COLOR_VIP 0x6a86b5FF
  36. #define COLOR_WALKIETALKIE 0xB2EBE0FF
  37. #define COLOR_NAVYBLUE 0x089DCEFF
  38. #define COLOR_GLOBAL 0xB8FFBCFF
  39. #define COLOR_STATS 0xFFFF91AA
  40. #define COLOR_LIGHTGREEN 0x74AF7AFF
  41. #define COLOR_ADMINCHAT 0xED6464FF
  42. #define COLOR_FACTIONCHAT 0xBDF38BFF
  43. #define SERVER_COLOR 0xFF66FFAA
  44. #define COLOR_GENERAL3 0x00D900C8
  45. #define COLOR_TEAL 0x00AAAAAA
  46. #define COLOR_OFFWHITE 0xF5DEB3AA
  47. #define COLOR_DARKAQUA 0x83BFBFAA
  48. #define COLOR_REALRED 0xFF0000FF
  49. #define COLOR_CYAN 0x00C8FFFF
  50. //--------------------------------------
  51.  
  52. main()
  53. {
  54. print("\n----------------------------------");
  55. print(" Samp Scripting Tutorials Gamemode by your name here");
  56. print("----------------------------------\n");
  57. }
  58.  
  59. public OnGameModeInit()
  60. {
  61. SetGameModeText("Scripting Tutorials");
  62. return 1;
  63. }
  64.  
  65. public OnGameModeExit()
  66. {
  67. return 1;
  68. }
  69.  
  70. public OnPlayerRequestClass(playerid, classid)
  71. {
  72. TogglePlayerSpectating(playerid, true);
  73. SetPlayerColor(playerid, 0xFFFFFF00);
  74. SetPlayerCamera(playerid);
  75. return 1;
  76. }
  77.  
  78. public OnPlayerConnect(playerid)
  79. {
  80. return 1;
  81. }
  82.  
  83. public OnPlayerDisconnect(playerid, reason)
  84. {
  85. return 1;
  86. }
  87.  
  88. public OnPlayerSpawn(playerid)
  89. {
  90. return 1;
  91. }
  92.  
  93. public OnPlayerDeath(playerid, killerid, reason)
  94. {
  95. return 1;
  96. }
  97.  
  98. public OnVehicleSpawn(vehicleid)
  99. {
  100. return 1;
  101. }
  102.  
  103. public OnVehicleDeath(vehicleid, killerid)
  104. {
  105. return 1;
  106. }
  107.  
  108. public OnPlayerText(playerid, text[])
  109. {
  110. return 1;
  111. }
  112.  
  113. public OnPlayerCommandText(playerid, cmdtext[])
  114. {
  115. return 0;
  116. }
  117.  
  118. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  119. {
  120. return 1;
  121. }
  122.  
  123. public OnPlayerExitVehicle(playerid, vehicleid)
  124. {
  125. return 1;
  126. }
  127.  
  128. public OnPlayerStateChange(playerid, newstate, oldstate)
  129. {
  130. return 1;
  131. }
  132.  
  133. public OnPlayerEnterCheckpoint(playerid)
  134. {
  135. return 1;
  136. }
  137.  
  138. public OnPlayerLeaveCheckpoint(playerid)
  139. {
  140. return 1;
  141. }
  142.  
  143. public OnPlayerEnterRaceCheckpoint(playerid)
  144. {
  145. return 1;
  146. }
  147.  
  148. public OnPlayerLeaveRaceCheckpoint(playerid)
  149. {
  150. return 1;
  151. }
  152.  
  153. public OnRconCommand(cmd[])
  154. {
  155. return 1;
  156. }
  157.  
  158. public OnPlayerRequestSpawn(playerid)
  159. {
  160. return 1;
  161. }
  162.  
  163. public OnObjectMoved(objectid)
  164. {
  165. return 1;
  166. }
  167.  
  168. public OnPlayerObjectMoved(playerid, objectid)
  169. {
  170. return 1;
  171. }
  172.  
  173. public OnPlayerPickUpPickup(playerid, pickupid)
  174. {
  175. return 1;
  176. }
  177.  
  178. public OnVehicleMod(playerid, vehicleid, componentid)
  179. {
  180. return 1;
  181. }
  182.  
  183. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  184. {
  185. return 1;
  186. }
  187.  
  188. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  189. {
  190. return 1;
  191. }
  192.  
  193. public OnPlayerSelectedMenuRow(playerid, row)
  194. {
  195. return 1;
  196. }
  197.  
  198. public OnPlayerExitedMenu(playerid)
  199. {
  200. return 1;
  201. }
  202.  
  203. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  204. {
  205. return 1;
  206. }
  207.  
  208. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  209. {
  210. return 1;
  211. }
  212.  
  213. public OnRconLoginAttempt(ip[], password[], success)
  214. {
  215. return 1;
  216. }
  217.  
  218. public OnPlayerUpdate(playerid)
  219. {
  220. return 1;
  221. }
  222.  
  223. public OnPlayerStreamIn(playerid, forplayerid)
  224. {
  225. return 1;
  226. }
  227.  
  228. public OnPlayerStreamOut(playerid, forplayerid)
  229. {
  230. return 1;
  231. }
  232.  
  233. public OnVehicleStreamIn(vehicleid, forplayerid)
  234. {
  235. return 1;
  236. }
  237.  
  238. public OnVehicleStreamOut(vehicleid, forplayerid)
  239. {
  240. return 1;
  241. }
  242.  
  243. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  244. {
  245. return 1;
  246. }
  247.  
  248. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  249. {
  250. return 1;
  251. }
  252. CMD:sethp(playerid, params[])
  253. {
  254. new targetid, Float:amount;
  255. if(sscanf(params, "ud", targetid, amount))
  256. {
  257. return SCM(playerid, COLOR_SYNTAX, "Usage: /sethp [playerid] [amount]");
  258. }
  259. if(!IsPlayerConnected(targetid))
  260. {
  261. return SCM(playerid, COLOR_SYNTAX, "Selected player is not connected to the server");
  262. }
  263. if(amount > 255)
  264. {
  265. return SCM(playerid, COLOR_SYNTAX, "Amount can't be more than 255");
  266. }
  267. SetPlayerHealth(targetid, amount);
  268. return 1;
  269. }
  270. forward SetPlayerCamera(playerid);
  271. public SetPlayerCamera(playerid)
  272. {
  273. SetPlayerCameraPos(playerid, 0, 0, 0);
  274. }
Advertisement
Add Comment
Please, Sign In to add comment