Advertisement
Guest User

Untitled

a guest
Jan 8th, 2012
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.51 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.  
  7. #if defined FILTERSCRIPT
  8.  
  9. public OnFilterScriptInit()
  10. {
  11. print("\n--------------------------------------");
  12. print(" Blank Filterscript by your name here");
  13. print("--------------------------------------\n");
  14. return 1;
  15. }
  16.  
  17. public OnFilterScriptExit()
  18. {
  19. return 1;
  20. }
  21.  
  22. #else
  23.  
  24. main()
  25. {
  26. print("\n----------------------------------");
  27. print(" Tank Wars");
  28. print("----------------------------------\n");
  29. }
  30. new Cooldown[MAX_PLAYERS];
  31. #define PRESSED(%0) \
  32. (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  33.  
  34. //colors
  35. #define COLOR_GREY 0xAFAFAFAA
  36. #define COLOR_GREEN 0x33AA33AA
  37. #define COLOR_RED 0xAA3333AA
  38. #define COLOR_YELLOW 0xFFFF00AA
  39. #define COLOR_WHITE 0xFFFFFFAA
  40. #define COLOR_BLUE 0x0000BBAA
  41. #define COLOR_LIGHTBLUE 0x33CCFFAA
  42. #define COLOR_ORANGE 0xFF9900AA
  43. #define COLOR_RED 0xAA3333AA
  44. #define COLOR_LIME 0x10F441AA
  45. #define COLOR_MAGENTA 0xFF00FFFF
  46. #define COLOR_NAVY 0x000080AA
  47. #define COLOR_AQUA 0xF0F8FFAA
  48. #define COLOR_CRIMSON 0xDC143CAA
  49. #define COLOR_FLBLUE 0x6495EDAA
  50. #define COLOR_BISQUE 0xFFE4C4AA
  51. #define COLOR_BLACK 0x000000AA
  52. #define COLOR_CHARTREUSE 0x7FFF00AA
  53. #define COLOR_BROWN 0XA52A2AAA
  54. #define COLOR_CORAL 0xFF7F50AA
  55. #define COLOR_GOLD 0xB8860BAA
  56. #define COLOR_GREENYELLOW 0xADFF2FAA
  57. #define COLOR_INDIGO 0x4B00B0AA
  58. #define COLOR_IVORY 0xFFFF82AA
  59. #define COLOR_LAWNGREEN 0x7CFC00AA
  60. #define COLOR_LIMEGREEN 0x32CD32AA //<--- Dark lime
  61. #define COLOR_MIDNIGHTBLUE 0X191970AA
  62. #define COLOR_MAROON 0x800000AA
  63. #define COLOR_OLIVE 0x808000AA
  64. #define COLOR_ORANGERED 0xFF4500AA
  65. #define COLOR_PINK 0xFFC0CBAA // - Light light pink
  66. #define COLOR_SEAGREEN 0x2E8B57AA
  67. #define COLOR_SPRINGGREEN 0x00FF7FAA
  68. #define COLOR_TOMATO 0xFF6347AA // - Tomato >:/ sounds wrong lol... well... :P
  69. #define COLOR_YELLOWGREEN 0x9ACD32AA //- like military green
  70. #define COLOR_MEDIUMAQUA 0x83BFBFAA
  71. #define COLOR_MEDIUMMAGENTA 0x8B008BAA // dark magenta ^^
  72. #endif
  73.  
  74. public OnGameModeInit()
  75. {
  76. // Don't use these lines if it's a filterscript
  77. SetGameModeText("TW 1.0");
  78. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  79.  
  80. SetTimer("CooldownTimer",1000,true);
  81.  
  82. return 1;
  83. }
  84.  
  85. public OnGameModeExit()
  86. {
  87. return 1;
  88. }
  89.  
  90. public OnPlayerRequestClass(playerid, classid)
  91. {
  92. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  93. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  94. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  95. return 1;
  96. }
  97.  
  98. public OnPlayerConnect(playerid)
  99. {
  100. new name[MAX_PLAYER_NAME];
  101. GetPlayerName(playerid, name, sizeof(name));
  102. if(strfind(name, "fuck", true) != -1 || strfind(name, "bitch", true) != -1 || strfind(name, "whore", true) != -1)
  103. {
  104. Kick(playerid);
  105. }
  106. Cooldown[playerid] = 0;
  107. return 1;
  108. }
  109.  
  110. public OnPlayerDisconnect(playerid, reason)
  111. {
  112. return 1;
  113. }
  114.  
  115. public OnPlayerSpawn(playerid)
  116. {
  117. return 1;
  118. }
  119.  
  120. public OnPlayerDeath(playerid, killerid, reason)
  121. {
  122. return 1;
  123. }
  124.  
  125. public OnVehicleSpawn(vehicleid)
  126. {
  127. return 1;
  128. }
  129.  
  130. public OnVehicleDeath(vehicleid, killerid)
  131. {
  132. new sVehicle;
  133. DestroyVehicle(sVehicle);
  134. return 1;
  135. }
  136. /*
  137. stock replaceSwear(string[], badWord[], replace = '*')
  138. {
  139. new
  140. i
  141. ;
  142. while((i = strfind(string, badWord, true)) != -1)
  143. {
  144. for(new x = (i + strlen(badWord)); i != x; ++i)
  145. {
  146. string[i] = replace;
  147. }
  148. }
  149. return 1;
  150. }
  151. */
  152. public OnPlayerText(playerid, text[])
  153. {
  154. /*
  155. new
  156. badWords[][] =
  157. {
  158. "bitch",
  159. "ass",
  160. "fuck",
  161. "shit",
  162. "crap",
  163. "noob",
  164. "fucking",
  165. "cum",
  166. "jew",
  167. "nigga",
  168. "nigger",
  169. "negro",
  170. "chongo",
  171. "cunt",
  172. "pussy",
  173. "dick",
  174. "cock",
  175. "wanker",
  176. "whore",
  177. "gay",
  178. "asshole",
  179. "tit"
  180. }
  181. ;
  182. for(new i; i != sizeof(badWords); ++i)
  183. {
  184. replaceSwear(text, badWords[i]);
  185. }
  186. GivePlayerMoney(playerid, -1);
  187. SendClientMessage(playerid, COLOR_RED, "<!>Everytime you swear you will loose something!");
  188. return 0;
  189. */
  190. return 0;
  191. }
  192.  
  193. public OnPlayerCommandText(playerid, cmdtext[])
  194. {
  195. if (strcmp("/kill", cmdtext, true, 10) == 0)
  196. {
  197. if(Cooldown[playerid]) return SendClientMessage(playerid,COLOR_RED,"<!>Please Wait Before Using This Command Again!");
  198. {
  199. SetPlayerHealth(playerid, 0);
  200. SendClientMessage(playerid, COLOR_RED, "<!>You have just killed yourself, and lost 50$!");
  201. new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
  202. GetPlayerName(playerid, name, sizeof(name));
  203. format(string, sizeof(string), "<!>%s have just used command /kill!", name);
  204. SendClientMessageToAll(COLOR_WHITE, string);
  205. GivePlayerMoney(playerid, -50);
  206. ResetPlayerWeapons(playerid);
  207. return 1;
  208. }
  209. }
  210. if (strcmp("/signal", cmdtext, true) == 0 || strcmp("/s", cmdtext, true) == 0)
  211. {
  212. if(Cooldown[playerid]) return SendClientMessage(playerid,COLOR_RED,"<!>Please Wait Before Using This Command Again!");
  213. {
  214. new Float:x, Float:y, Float:z, SignalObj;
  215. GetPlayerPos(playerid, x, y, z);
  216. SetTimerEx( "Signal", 5000, false, "i", SignalObj );
  217. SignalObj = CreateObject(18714,x,y,z, 0.0, 0.0, 96.0);
  218. GameTextForPlayer(playerid, "Signal started", 1, 1);
  219. SendClientMessage(playerid, COLOR_BLUE, "<!>You can also press 'Crouch' button to activate this!");
  220. }
  221. return 1;
  222. }
  223. if (strcmp("/help", cmdtext, true) == 0 || strcmp("/h", cmdtext, true) == 0)
  224. {
  225. SendClientMessage(playerid, COLOR_WHITE, "|----------------------------------------------------------------|");
  226. SendClientMessage(playerid, COLOR_BLUE, "|<!> Commands: /(s)ignal, /kill, /(h)elp");
  227. SendClientMessage(playerid, COLOR_WHITE, "|----------------------------------------------------------------|");
  228. return 1;
  229. }
  230. return 0;
  231. }
  232.  
  233. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  234. {
  235. return 1;
  236. }
  237.  
  238. public OnPlayerExitVehicle(playerid, vehicleid)
  239. {
  240. return 1;
  241. }
  242.  
  243. public OnPlayerStateChange(playerid, newstate, oldstate)
  244. {
  245. return 1;
  246. }
  247.  
  248. public OnPlayerEnterCheckpoint(playerid)
  249. {
  250. return 1;
  251. }
  252.  
  253. public OnPlayerLeaveCheckpoint(playerid)
  254. {
  255. return 1;
  256. }
  257.  
  258. public OnPlayerEnterRaceCheckpoint(playerid)
  259. {
  260. return 1;
  261. }
  262.  
  263. public OnPlayerLeaveRaceCheckpoint(playerid)
  264. {
  265. return 1;
  266. }
  267.  
  268. public OnRconCommand(cmd[])
  269. {
  270. return 1;
  271. }
  272.  
  273. public OnPlayerRequestSpawn(playerid)
  274. {
  275. return 1;
  276. }
  277.  
  278. public OnObjectMoved(objectid)
  279. {
  280. return 1;
  281. }
  282.  
  283. public OnPlayerObjectMoved(playerid, objectid)
  284. {
  285. return 1;
  286. }
  287.  
  288. public OnPlayerPickUpPickup(playerid, pickupid)
  289. {
  290. return 1;
  291. }
  292.  
  293. public OnVehicleMod(playerid, vehicleid, componentid)
  294. {
  295. return 1;
  296. }
  297.  
  298. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  299. {
  300. return 1;
  301. }
  302.  
  303. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  304. {
  305. return 1;
  306. }
  307.  
  308. public OnPlayerSelectedMenuRow(playerid, row)
  309. {
  310. return 1;
  311. }
  312.  
  313. public OnPlayerExitedMenu(playerid)
  314. {
  315. return 1;
  316. }
  317.  
  318. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  319. {
  320. return 1;
  321. }
  322.  
  323. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  324. {
  325. if (PRESSED(KEY_CROUCH))
  326. {
  327. if(Cooldown[playerid]) return SendClientMessage(playerid,COLOR_RED,"<!>Please Wait Before Using This Command Again!");
  328. {
  329. new Float:x, Float:y, Float:z, SignalObj;
  330. GetPlayerPos(playerid, x, y, z);
  331. SetTimerEx( "Signal", 5000, false, "i", SignalObj );
  332. SignalObj = CreateObject(18714,x,y,z, 0.0, 0.0, 96.0);
  333. GameTextForPlayer(playerid, "Signal started", 1, 1);
  334. }
  335. return 1;
  336. }
  337. return 1;
  338. }
  339.  
  340. public OnRconLoginAttempt(ip[], password[], success)
  341. {
  342. return 1;
  343. }
  344.  
  345. public OnPlayerUpdate(playerid)
  346. {
  347. return 1;
  348. }
  349.  
  350. public OnPlayerStreamIn(playerid, forplayerid)
  351. {
  352. return 1;
  353. }
  354.  
  355. public OnPlayerStreamOut(playerid, forplayerid)
  356. {
  357. return 1;
  358. }
  359.  
  360. public OnVehicleStreamIn(vehicleid, forplayerid)
  361. {
  362. return 1;
  363. }
  364.  
  365. public OnVehicleStreamOut(vehicleid, forplayerid)
  366. {
  367. return 1;
  368. }
  369.  
  370. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  371. {
  372. return 1;
  373. }
  374.  
  375. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  376. {
  377. return 1;
  378. }
  379. forward CooldownTimer();
  380.  
  381. forward Signal( objectid );
  382. public Signal( objectid )
  383. {
  384. DestroyObject( objectid );
  385. return 1;
  386. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement