Guest User

Untitled

a guest
Dec 2nd, 2011
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.03 KB | None | 0 0
  1. //////////////////////////I===========//////////////////////////////////
  2. //////////////////////////I/////////////////////////////////////////////
  3. //////////////////////////I/////////////////////////////////////////////
  4. //////////////////////////I===========ILTERSCRIPT///////////////////////
  5. //////////////////////////I///////////By Rudy_ aka Leon/////////////////
  6. //////////////////////////I///////////Enjoy It//////////////////////////
  7. //////////////////////////I/////////////////////////////////////////////
  8. //////////////////////////I/////////////////////////////////////////////
  9.  
  10. /* Features
  11. *Advanced kill command
  12. *Join/Leave/Kicked/Banned Messages
  13. *Afk - Back Command with 3d Labels
  14. *Will be adding More*/
  15.  
  16. #include <a_samp>
  17. #include <core>
  18. #include <float>
  19. #include <streamer>
  20.  
  21. new bool:isafk[MAX_PLAYERS];
  22. new Float:pHealth;
  23. new Text3D:label[MAX_PLAYERS];
  24.  
  25. #define FILTERSCRIPT
  26.  
  27. #if defined FILTERSCRIPT
  28. #define COLOR_GREY 0xAFAFAFAA
  29. #define COLOR_ORANGE 0xF
  30.  
  31. public OnFilterScriptInit()
  32. {
  33. print("\n--------------------------------------");
  34. print(" FilterScript By Rudy_ Aka Leon");
  35. print("--------------------------------------\n");
  36. return 1;
  37. }
  38.  
  39. public OnFilterScriptExit()
  40. {
  41. return 1;
  42. }
  43.  
  44. #else
  45.  
  46. main()
  47. {
  48. print("\n----------------------------------");
  49. print(" Blank Gamemode by your name here");
  50. print("----------------------------------\n");
  51. }
  52.  
  53. #endif
  54.  
  55. public OnGameModeInit()
  56. {
  57. return 1;
  58. }
  59.  
  60. public OnGameModeExit()
  61. {
  62. return 1;
  63. }
  64.  
  65. public OnPlayerRequestClass(playerid, classid)
  66. {
  67. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  68. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  69. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  70. return 1;
  71. }
  72.  
  73. public OnPlayerConnect(playerid)
  74. {
  75. SendClientMessage(playerid,COLOR_GREY, "FilterScript By Rudy_ aka Leon Loaded");
  76. new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
  77. GetPlayerName(playerid, pname, sizeof(pname));
  78. format(string, sizeof(string), "%s has joined the server", pname);
  79. SendClientMessageToAll(COLOR_ORANGE, string);
  80. return 1;
  81. }
  82.  
  83. public OnPlayerDisconnect(playerid, reason)
  84. {
  85. new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
  86. GetPlayerName(playerid, pname, sizeof(pname));
  87. switch(reason)
  88. {
  89. case 0: format(string, sizeof(string), "%s has (Crashed)", pname);
  90. case 1: format(string, sizeof(string), "%s has Left the server", pname);
  91. case 2: format(string, sizeof(string), "%s has (Kicked/Banned)", pname);
  92. }
  93. SendClientMessageToAll(COLOR_ORANGE, string);
  94. return 1;
  95. }
  96.  
  97. public OnPlayerSpawn(playerid)
  98. {
  99. return 1;
  100. }
  101.  
  102. public OnPlayerDeath(playerid, killerid, reason)
  103. {
  104. return 1;
  105. }
  106.  
  107. public OnVehicleSpawn(vehicleid)
  108. {
  109. return 1;
  110. }
  111.  
  112. public OnVehicleDeath(vehicleid, killerid)
  113. {
  114. return 1;
  115. }
  116.  
  117. public OnPlayerText(playerid, text[])
  118. {
  119. return 1;
  120. }
  121.  
  122. public OnPlayerCommandText(playerid, cmdtext[])
  123. {
  124. if (strcmp("/kill", cmdtext, true, 6) == 0)
  125. {
  126. SetPlayerHealth(playerid, 0.00);
  127. new PlayerName[MAX_PLAYER_NAME];
  128. new string[256];
  129. GetPlayerName(playerid,PlayerName,MAX_PLAYER_NAME);
  130. format(string,sizeof(string), "%s has Sucided", PlayerName);
  131. SendClientMessageToAll(0xFFBB00, string);
  132. return 1;
  133. }
  134.  
  135. if(strcmp("/Afk", cmdtext, true, 4) == 0)
  136. {
  137. new name[MAX_PLAYER_NAME];
  138. if(isafk[playerid] == false)
  139. {
  140. isafk[playerid] = true;
  141. new string[256];
  142. GetPlayerHealth(playerid, pHealth);
  143. SetPlayerInterior(playerid, 10);
  144. SetPlayerHealth(playerid, 99999);
  145. label[playerid] = Create3DTextLabel("AFK",COLOR_GREY,30.0,40.0,50.0,40.0,0);
  146. Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
  147. GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  148. format(string, sizeof(string), "%s Is Now AFK",name);
  149. printf(string);
  150. SendClientMessage(playerid, COLOR_ORANGE, "You Are now AFK, /Back to get back");
  151. SendClientMessageToAll(COLOR_ORANGE, string);
  152. TogglePlayerControllable(playerid,0);
  153. }
  154. else
  155. {
  156. SendClientMessage(playerid, COLOR_GREY, "Your Already AFK!");
  157. }
  158. return 1;
  159. }
  160. if(strcmp("/Back", cmdtext, true, 4) == 0)
  161. {
  162. new name[MAX_PLAYER_NAME];
  163. if(isafk[playerid] == true)
  164. {
  165. new string[256];
  166. isafk[playerid] = false;
  167. GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  168. SetPlayerInterior(playerid, 0);
  169. format(string, sizeof(string), "%s Is No Longer AFK.",name);
  170. SendClientMessage(playerid, COLOR_ORANGE, "Your Back");
  171. SendClientMessageToAll(COLOR_ORANGE, string);
  172. SetPlayerHealth(playerid, pHealth);
  173. printf(string);
  174. Delete3DTextLabel(Text3D:label[playerid]);
  175. TogglePlayerControllable(playerid,1);
  176. }
  177. else
  178. {
  179. SendClientMessage(playerid, COLOR_GREY, "You are Not AFK");
  180. }
  181. return 1;
  182. }
  183.  
  184. return 0;
  185. }
  186.  
  187. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  188. {
  189. return 1;
  190. }
  191.  
  192. public OnPlayerExitVehicle(playerid, vehicleid)
  193. {
  194. return 1;
  195. }
  196.  
  197. public OnPlayerStateChange(playerid, newstate, oldstate)
  198. {
  199. return 1;
  200. }
  201.  
  202. public OnPlayerEnterCheckpoint(playerid)
  203. {
  204. return 1;
  205. }
  206.  
  207. public OnPlayerLeaveCheckpoint(playerid)
  208. {
  209. return 1;
  210. }
  211.  
  212. public OnPlayerEnterRaceCheckpoint(playerid)
  213. {
  214. return 1;
  215. }
  216.  
  217. public OnPlayerLeaveRaceCheckpoint(playerid)
  218. {
  219. return 1;
  220. }
  221.  
  222. public OnRconCommand(cmd[])
  223. {
  224. return 1;
  225. }
  226.  
  227. public OnPlayerRequestSpawn(playerid)
  228. {
  229. return 1;
  230. }
  231.  
  232. public OnObjectMoved(objectid)
  233. {
  234. return 1;
  235. }
  236.  
  237. public OnPlayerObjectMoved(playerid, objectid)
  238. {
  239. return 1;
  240. }
  241.  
  242. public OnPlayerPickUpPickup(playerid, pickupid)
  243. {
  244. return 1;
  245. }
  246.  
  247. public OnVehicleMod(playerid, vehicleid, componentid)
  248. {
  249. return 1;
  250. }
  251.  
  252. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  253. {
  254. return 1;
  255. }
  256.  
  257. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  258. {
  259. return 1;
  260. }
  261.  
  262. public OnPlayerSelectedMenuRow(playerid, row)
  263. {
  264. return 1;
  265. }
  266.  
  267. public OnPlayerExitedMenu(playerid)
  268. {
  269. return 1;
  270. }
  271.  
  272. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  273. {
  274. return 1;
  275. }
  276.  
  277. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  278. {
  279. return 1;
  280. }
  281.  
  282. public OnRconLoginAttempt(ip[], password[], success)
  283. {
  284. return 1;
  285. }
  286.  
  287. public OnPlayerUpdate(playerid)
  288. {
  289. return 1;
  290. }
  291.  
  292. public OnPlayerStreamIn(playerid, forplayerid)
  293. {
  294. return 1;
  295. }
  296.  
  297. public OnPlayerStreamOut(playerid, forplayerid)
  298. {
  299. return 1;
  300. }
  301.  
  302. public OnVehicleStreamIn(vehicleid, forplayerid)
  303. {
  304. return 1;
  305. }
  306.  
  307. public OnVehicleStreamOut(vehicleid, forplayerid)
  308. {
  309. return 1;
  310. }
  311.  
  312. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  313. {
  314. return 1;
  315. }
  316.  
  317. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  318. {
  319. return 1;
  320. }
  321.  
  322.  
Advertisement
Add Comment
Please, Sign In to add comment