Guest User

AFK System by Templar 37

a guest
Jan 8th, 2013
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.63 KB | None | 0 0
  1. // #################### ####
  2. // #################### #### ##### ########
  3. // #### #### ## ## ## ##
  4. // #### #### ## ## ## ##
  5. // #### ####
  6. // #### ####
  7. // #### ####
  8. // #### ###############
  9. // #### ###############
  10.  
  11. // This is a comment
  12. // uncomment the line below if you want to write a filterscript
  13. //#define FILTERSCRIPT
  14.  
  15. #include <a_samp>
  16.  
  17. #if defined FILTERSCRIPT
  18.  
  19. public OnFilterScriptInit()
  20. {
  21. print("\n--------------------------------------");
  22. print(" AFK Filterscript - by Templar");
  23. print("--------------------------------------\n");
  24. return 1;
  25. }
  26.  
  27. public OnFilterScriptExit()
  28. {
  29. return 1;
  30. }
  31.  
  32. #else
  33.  
  34. main()
  35. {
  36. print("\n----------------------------------");
  37. print(" Blank Gamemode by your name here");
  38. print("----------------------------------\n");
  39. }
  40.  
  41. #endif
  42.  
  43. public OnGameModeInit()
  44. {
  45. // Don't use these lines if it's a filterscript
  46. SetGameModeText("Blank Script");
  47. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  48. return 1;
  49. }
  50.  
  51. public OnGameModeExit()
  52. {
  53. return 1;
  54. }
  55.  
  56. public OnPlayerRequestClass(playerid, classid)
  57. {
  58. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  59. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  60. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  61. return 1;
  62. }
  63.  
  64. public OnPlayerConnect(playerid)
  65. {
  66. return 1;
  67. }
  68.  
  69. public OnPlayerDisconnect(playerid, reason)
  70. {
  71. return 1;
  72. }
  73.  
  74. public OnPlayerSpawn(playerid)
  75. {
  76. return 1;
  77. }
  78.  
  79. public OnPlayerDeath(playerid, killerid, reason)
  80. {
  81. return 1;
  82. }
  83.  
  84. public OnVehicleSpawn(vehicleid)
  85. {
  86. return 1;
  87. }
  88.  
  89. public OnVehicleDeath(vehicleid, killerid)
  90. {
  91. return 1;
  92. }
  93.  
  94. public OnPlayerText(playerid, text[])
  95. {
  96. return 1;
  97. }
  98.  
  99. public OnPlayerCommandText(playerid, cmdtext[])
  100. {
  101. if (strcmp("/afk", cmdtext, true, 4) == 0)
  102. {
  103. new name[MAX_PLAYER_NAME];
  104. new string[128];
  105. GetPlayerName(playerid, name, 24);
  106. format(string, sizeof(string), " %s is now Away From Keyboard ", name);
  107. SendClientMessageToAll(0xFF0000AA, string);
  108. ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
  109. SendClientMessage(playerid, 0xFF0000AA, "You are now Away From Keyboard and in virtual world 10. If you are back type /back.");
  110. SetPlayerVirtualWorld(playerid, 10);
  111. TogglePlayerControllable(playerid, 0);
  112. SetPlayerChatBubble(playerid, "Away From Keyboard", 0xFFFFFFAA, 100, 100000000000);
  113. return 1;
  114. }
  115. if (strcmp("/back", cmdtext, true, 5) == 0)
  116. {
  117. new name[MAX_PLAYER_NAME];
  118. new string[128];
  119. GetPlayerName(playerid, name, 24);
  120. format(string, sizeof(string), "%s is now Back from being Away From Keyboard (AFK)", name);
  121. SendClientMessageToAll(0xFF0000AA, string);
  122. ClearAnimations(playerid, 0);
  123. SendClientMessage(playerid, 0xFF0000AA, "You are now Back in virtual world 0 and you are not AFK anymore.");
  124. SetPlayerVirtualWorld(playerid, 0);
  125. TogglePlayerControllable(playerid, 1);
  126. SetPlayerChatBubble(playerid, " ", 0xFFFFFFAA, 100, 10);
  127. return 1;
  128. }
  129. return 0;
  130. }
  131.  
  132. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  133. {
  134. return 1;
  135. }
  136.  
  137. public OnPlayerExitVehicle(playerid, vehicleid)
  138. {
  139. return 1;
  140. }
  141.  
  142. public OnPlayerStateChange(playerid, newstate, oldstate)
  143. {
  144. return 1;
  145. }
  146.  
  147. public OnPlayerEnterCheckpoint(playerid)
  148. {
  149. return 1;
  150. }
  151.  
  152. public OnPlayerLeaveCheckpoint(playerid)
  153. {
  154. return 1;
  155. }
  156.  
  157. public OnPlayerEnterRaceCheckpoint(playerid)
  158. {
  159. return 1;
  160. }
  161.  
  162. public OnPlayerLeaveRaceCheckpoint(playerid)
  163. {
  164. return 1;
  165. }
  166.  
  167. public OnRconCommand(cmd[])
  168. {
  169. return 1;
  170. }
  171.  
  172. public OnPlayerRequestSpawn(playerid)
  173. {
  174. return 1;
  175. }
  176.  
  177. public OnObjectMoved(objectid)
  178. {
  179. return 1;
  180. }
  181.  
  182. public OnPlayerObjectMoved(playerid, objectid)
  183. {
  184. return 1;
  185. }
  186.  
  187. public OnPlayerPickUpPickup(playerid, pickupid)
  188. {
  189. return 1;
  190. }
  191.  
  192. public OnVehicleMod(playerid, vehicleid, componentid)
  193. {
  194. return 1;
  195. }
  196.  
  197. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  198. {
  199. return 1;
  200. }
  201.  
  202. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  203. {
  204. return 1;
  205. }
  206.  
  207. public OnPlayerSelectedMenuRow(playerid, row)
  208. {
  209. return 1;
  210. }
  211.  
  212. public OnPlayerExitedMenu(playerid)
  213. {
  214. return 1;
  215. }
  216.  
  217. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  218. {
  219. return 1;
  220. }
  221.  
  222. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  223. {
  224. return 1;
  225. }
  226.  
  227. public OnRconLoginAttempt(ip[], password[], success)
  228. {
  229. return 1;
  230. }
  231.  
  232. public OnPlayerUpdate(playerid)
  233. {
  234. return 1;
  235. }
  236.  
  237. public OnPlayerStreamIn(playerid, forplayerid)
  238. {
  239. return 1;
  240. }
  241.  
  242. public OnPlayerStreamOut(playerid, forplayerid)
  243. {
  244. return 1;
  245. }
  246.  
  247. public OnVehicleStreamIn(vehicleid, forplayerid)
  248. {
  249. return 1;
  250. }
  251.  
  252. public OnVehicleStreamOut(vehicleid, forplayerid)
  253. {
  254. return 1;
  255. }
  256.  
  257. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  258. {
  259. return 1;
  260. }
  261.  
  262. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  263. {
  264. return 1;
  265. }
Advertisement
Add Comment
Please, Sign In to add comment