Advertisement
JaanKukin

Bum Filterscript by !Pumpkin

May 7th, 2014
481
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.46 KB | None | 0 0
  1. //BUM Filterscript by !Pumpkin
  2.  
  3. #include <a_samp>
  4.  
  5. new Temp[MAX_PLAYERS] = 0;
  6.  
  7. forward freeze(playerid);
  8. forward dildo(playerid);
  9. new pickup_Trash;
  10.  
  11. #define COLOR_GREEN 0x008000FF
  12.  
  13. #define MAX_TRASH_CANS 51
  14.  
  15. #define DIALOG_DILDO 1
  16. #define DIALOG_WEAPON 2
  17. #define DIALOG_FLOWERS 3
  18. #define DIALOG_MONEY 4
  19. #define DIALOG_BURGER 5
  20.  
  21. new Float:gTrashBins_Locations[MAX_TRASH_CANS][3] = {
  22. {2568.3000000,-1035.5000000,68.8000000}, //object{2},
  23. {2546.6001000,-1033.2000000,71.4000000}, //object{frame_thick_5},{1},
  24. {2546.6001000,-1033.2000000,71.4000000}, //object{low_dinning_5},{1},
  25. {2546.8999000,-1034.7000000,68.6000000}, //object{tree_hipoly07},{1},
  26. {2538.8999000,-1057.9000000,68.6000000}, //object{tree_hipoly07},{2},
  27. {2527.6001000,-1057.3000000,68.6000000}, //object{tree_hipoly07},{3},
  28. {2528.7000000,-1035.7000000,68.6000000}, //object{tree_hipoly07},{5},
  29. {2510.0000000,-1030.5000000,69.0000000}, //object{tree_hipoly07},{6},
  30. {2504.8999000,-1059.9000000,69.0000000}, //object{tree_hipoly07},{7},
  31. {2484.3000000,-1052.3000000,66.6000000}, //object{tree_hipoly07},{8},
  32. {2457.3999000,-1024.2000000,58.7000000}, //object{tree_hipoly07},{9},
  33. {2458.2000000,-1051.6000000,58.7000000}, //object{tree_hipoly07},{10},
  34. {2427.0000000,-1017.3000000,53.3000000}, //object{tree_hipoly07},{11},
  35. {2435.8000000,-1052.2000000,53.3000000}, //object{tree_hipoly07},{12},
  36. {2380.2000000,-1039.5000000,52.7000000}, //object{tree_hipoly07},{13},
  37. {2379.3999000,-1038.3000000,52.7000000}, //object{tree_hipoly07},{14},
  38. {1785.8000000,-1146.9000000,22.9000000}, //object{tree_hipoly07},{15},
  39. {1800.3000000,-1146.9000000,22.9000000}, //object{tree_hipoly07},{16},
  40. {1829.0000000,-1147.3000000,22.9000000}, //object{tree_hipoly07},{17},
  41. {1829.2000000,-1144.1000000,22.9000000}, //object{tree_hipoly07},{18},
  42. {1828.9000000,-1114.7000000,22.9000000}, //object{tree_hipoly07},{19},
  43. {1829.4000000,-1097.5000000,22.9000000}, //object{tree_hipoly07},{20},
  44. {1829.7000000,-1084.2000000,22.9000000}, //object{tree_hipoly07},{21},
  45. {1516.7000000,-1849.3000000,12.5000000}, //object{tree_hipoly07},{22},
  46. {1486.0000000,-1847.5000000,12.5000000}, //object{tree_hipoly07},{23},
  47. {1468.9000000,-1847.7000000,12.5000000}, //object{tree_hipoly07},{24},
  48. {1466.1000000,-1847.6000000,12.5000000}, //object{tree_hipoly07},{25},
  49. {1420.7000000,-1846.5000000,12.5000000}, //object{tree_hipoly07},{26},
  50. {1420.7000000,-1844.4000000,12.5000000}, //object{tree_hipoly07},{27},
  51. {2382.1001000,-1939.8000000,12.5000000}, //object{tree_hipoly07},{28},
  52. {2441.5000000,-1973.8000000,12.6000000}, //object{tree_hipoly07},{29},
  53. {2441.2000000,-1979.8000000,12.5000000}, //object{tree_hipoly07},{30},
  54. {1093.1000000,-1881.3000000,12.5000000}, //object{tree_hipoly07},{31},
  55. {1093.2000000,-1876.7000000,12.5000000}, //object{tree_hipoly07},{32},
  56. {1101.9000000,-1876.1000000,12.5000000}, //object{tree_hipoly07},{33},
  57. {1117.5000000,-1876.2000000,12.5000000}, //object{tree_hipoly07},{34},
  58. {1175.2000000,-1878.8000000,12.6000000}, //object{tree_hipoly07},{35},
  59. {433.7000100,-1747.8000000,8.2000000}, //object{tree_hipoly07},{37},
  60. {793.0000000,-840.0000000,59.6000000}, //object{tree_hipoly07},{38},
  61. {789.0999800,-841.2999900,59.6000000}, //object{tree_hipoly07},{39},
  62. {788.5999800,-862.0999800,59.6000000}, //object{tree_hipoly07},{40},
  63. {789.0000000,-863.2000100,59.6000000}, //object{tree_hipoly07},{41},
  64. {912.2000100,-836.7999900,91.3000000}, //object{tree_hipoly07},{42},
  65. {911.2000100,-837.5999800,91.3000000}, //object{tree_hipoly07},{43},
  66. {959.9000200,-822.2000100,95.4000000}, //object{tree_hipoly07},{44},
  67. {974.4000200,-815.7999900,96.6000000}, //object{tree_hipoly07},{45},
  68. {975.9000200,-814.0000000,96.6000000}, //object{tree_hipoly07},{46},
  69. {1072.1000000,-777.5999800,106.3000000}, //object{tree_hipoly07},{47},
  70. {1071.1000000,-777.7999900,106.3000000}, //object{tree_hipoly07},{48},
  71. {831.9000200,-755.5000000,84.3000000}, //object{tree_hipoly07},{49},
  72. {915.2999900,-670.4000200,116.2000000} //object(tree_hipoly07)(50) // - 0
  73. };
  74.  
  75. public OnFilterScriptInit()
  76. {
  77. return 1;
  78. }
  79.  
  80. public OnFilterScriptExit()
  81. {
  82. return 1;
  83. }
  84.  
  85. public OnPlayerConnect(playerid)
  86. {
  87. Temp[playerid] = 0;
  88. return 1;
  89. }
  90.  
  91. public OnPlayerSpawn(playerid)
  92. {
  93. for(new i=0; i<MAX_TRASH_CANS; i++)
  94. {
  95. pickup_Trash = CreatePickup(1317, 1, gTrashBins_Locations[i][0],gTrashBins_Locations[i][1] ,gTrashBins_Locations[i][2]);
  96. }
  97. PreloadAnimLib(playerid,"BOMBER");
  98. PreloadAnimLib(playerid,"RAPPING");
  99. PreloadAnimLib(playerid,"SHOP");
  100. PreloadAnimLib(playerid,"BEACH");
  101. PreloadAnimLib(playerid,"SMOKING");
  102. PreloadAnimLib(playerid,"FOOD");
  103. PreloadAnimLib(playerid,"ON_LOOKERS");
  104. PreloadAnimLib(playerid,"DEALER");
  105. PreloadAnimLib(playerid,"CRACK");
  106. PreloadAnimLib(playerid,"CARRY");
  107. PreloadAnimLib(playerid,"COP_AMBIENT");
  108. PreloadAnimLib(playerid,"PARK");
  109. PreloadAnimLib(playerid,"INT_HOUSE");
  110. PreloadAnimLib(playerid,"GYMNASIUM");
  111. PreloadAnimLib(playerid,"MISC");
  112. PreloadAnimLib(playerid,"FOOD" );
  113. PreloadAnimLib(playerid,"PED" );
  114. return 1;
  115. }
  116.  
  117. public OnPlayerPickUpPickup(playerid, pickupid)
  118. {
  119. if(pickupid == pickup_Trash)
  120. {
  121. SendClientMessage(playerid,0xDABB3EAA, "type /searchtrash here.");
  122. }
  123. return 1;
  124. }
  125.  
  126. public OnPlayerCommandText(playerid, cmdtext[])
  127. {
  128. new index, cmd[20];
  129. cmd = strtok(cmdtext, index);
  130.  
  131. if (strcmp(cmd, "/searchtrash", true) == 0)
  132. {
  133. if(gettime() - Temp[playerid] < 120) return SendClientMessage(playerid, 0xFF0000FF, "Please wait few minutes before searching again");
  134. Temp[playerid] = gettime();
  135. for(new i=0; i<MAX_TRASH_CANS; i++)
  136. {
  137. if(IsPlayerInRangeOfPoint(playerid,3.0,gTrashBins_Locations[i][0],gTrashBins_Locations[i][1] ,gTrashBins_Locations[i][2]))
  138. {
  139. ApplyAnimation(playerid, "GANGS", "shake_cara", 4.1, 0, 1, 1, 1, 1, 1);
  140. }
  141. }
  142. switch (random(9))
  143. {
  144. case 0:
  145. {
  146. //SetTimer("freeze", 2000, false); // Set a timer of 1000 miliseconds (1 second)
  147. //GivePlayerWeapon(playerid, 24, 1);
  148. //TogglePlayerControllable(playerid,0);
  149. ApplyAnimation(playerid, "GANGS", "shake_cara", 4.1, 0, 1, 1, 1, 1, 1);
  150. ShowPlayerDialog(playerid, DIALOG_WEAPON, DIALOG_STYLE_MSGBOX, "!", "You found a rusty desert eagle ,do you want to take it?", "Yes", "No");
  151. }
  152. case 1:
  153. {
  154. //SetTimer("freeze", 2000, false); // Set a timer of 1000 miliseconds (1 second)
  155. //GivePlayerWeapon(playerid, 12, 1);
  156. //TogglePlayerControllable(playerid,0);
  157. ApplyAnimation(playerid, "GANGS", "shake_cara", 4.1, 0, 1, 1, 1, 1, 1);
  158. ShowPlayerDialog(playerid, DIALOG_DILDO, DIALOG_STYLE_MSGBOX, "!", "You found a dildo ,do you want to take it?", "Yes", "No");
  159. }
  160. case 2:
  161. {
  162. ApplyAnimation(playerid, "GANGS", "shake_cara", 4.1, 0, 1, 1, 1, 1, 1);
  163. //SetTimer("freeze", 2000, false); // Set a timer of 1000 miliseconds (1 second)
  164. //GivePlayerWeapon(playerid, 14, 1);
  165. //TogglePlayerControllable(playerid,0);
  166. ShowPlayerDialog(playerid, DIALOG_FLOWERS, DIALOG_STYLE_MSGBOX, "!", "You found some flowers ,do you want to take them?", "Yes", "No");
  167. }
  168. case 3:
  169. {
  170. ApplyAnimation(playerid, "GANGS", "shake_cara", 4.1, 0, 1, 1, 1, 1, 1);
  171. //SetTimer("freeze", 2000, false); // Set a timer of 1000 miliseconds (1 second)
  172. //GivePlayerMoney(playerid, 10);
  173. //TogglePlayerControllable(playerid,0);
  174. ShowPlayerDialog(playerid, DIALOG_MONEY, DIALOG_STYLE_MSGBOX, "!", "You found 10$ bucks,do you wish to take it?", "Yes", "No");
  175. }
  176. case 4:
  177. {
  178. ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff", 4.1, 0, 1, 1, 1, 1, 1);
  179. SetPlayerAttachedObject( playerid, 0, 1264, 2, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
  180. SendClientMessage(playerid, COLOR_GREEN, "A trashbag got accidentaly stuck in your head.");
  181. SendClientMessage(playerid, COLOR_GREEN, "type /removetrashbag to remove trashbag.");
  182. //TogglePlayerControllable(playerid,0);
  183. //ShowPlayerDialog(playerid, DIALOG_FLOWERS, DIALOG_STYLE_MSGBOX, "!", "You found some flowers ,do you want to take them?", "Yes", "No");
  184. }
  185. case 5:
  186. {
  187. ApplyAnimation(playerid, "GANGS", "shake_cara", 4.1, 0, 1, 1, 1, 1, 1);
  188. SendClientMessage(playerid, COLOR_GREEN, "You didn't find anything.");
  189. //GivePlayerWeapon(playerid, 14, 1);
  190. //TogglePlayerControllable(playerid,0);
  191. //ShowPlayerDialog(playerid, DIALOG_FLOWERS, DIALOG_STYLE_MSGBOX, "!", "You found some flowers ,do you want to take them?", "Yes", "No");
  192. }
  193. case 6:
  194. {
  195. //TogglePlayerControllable(playerid,0);
  196. ShowPlayerDialog(playerid, DIALOG_BURGER, DIALOG_STYLE_MSGBOX, "!", "You found a burger ,do you wish to take it?", "Yes", "No");
  197. }
  198. case 7:
  199. {
  200. new Float:health;
  201. GetPlayerHealth(playerid, health);
  202. SetPlayerHealth(playerid, health - 10.0);
  203. ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff", 4.1, 0, 1, 1, 1, 1, 1);
  204. SendClientMessage(playerid, COLOR_GREEN, "A stray cat bit you.");
  205. }
  206. case 8:
  207. {
  208. if(IsFemaleSkin(playerid))
  209. {
  210. SendClientMessage(playerid, COLOR_GREEN, "You're clothes got dirty.");
  211. SetPlayerSkin(playerid, 77);
  212. }
  213. if(IsMaleSkin(playerid))
  214. {
  215. switch (random(3))
  216. {
  217. case 0:
  218. {
  219. SendClientMessage(playerid, COLOR_GREEN, "You're clothes got dirty.");
  220. SetPlayerSkin(playerid, 78);
  221. }
  222. case 1:
  223. {
  224. SendClientMessage(playerid, COLOR_GREEN, "You're clothes got dirty.");
  225. SetPlayerSkin(playerid, 79);
  226. }
  227. case 2:
  228. {
  229. SendClientMessage(playerid, COLOR_GREEN, "You're clothes got dirty.");
  230. SetPlayerSkin(playerid, 134);
  231. }
  232. }
  233. }
  234. }
  235. }
  236. return 1;
  237. }
  238.  
  239. if(strcmp(cmdtext, "/usedildo", true) == 0)
  240. {
  241. if(GetPlayerWeapon(playerid) == 12)
  242. {
  243. SetTimer("dildo", 10000, false); // Set a timer of 1000 miliseconds (1 second)
  244. ApplyAnimation(playerid,"MISC","Scratchballs_01",4.1,1,1,1,1,15000);
  245. SendClientMessage(playerid, COLOR_GREEN, "You're now puting it into your ass/vagina.");
  246. }
  247. else if(GetPlayerWeapon(playerid) >= 0)
  248. {
  249. SendClientMessage(playerid, 0xAA3333AA, "You need a dildo for this!");
  250. }
  251. return 1;
  252. }
  253.  
  254.  
  255. /*if(!strcmp(cmd,"/trash"))
  256. {
  257. SetPlayerPos(playerid, 1466.1000000,-1847.6000000,12.5000000);
  258. return 1;
  259. }*/
  260.  
  261. if(!strcmp(cmdtext, "/removetrashbag", true)) // Remove Attached Objects
  262. {
  263. switch (random(1))
  264. {
  265. case 0:
  266. {
  267. SendClientMessage(playerid, COLOR_GREEN, "You removed the trashbag.");
  268. if(IsPlayerAttachedObjectSlotUsed(playerid,0))RemovePlayerAttachedObject(playerid,0);
  269. }
  270. case 1:
  271. {
  272. ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff", 4.1, 0, 1, 1, 1, 1, 1);
  273. SendClientMessage(playerid, COLOR_GREEN, "You failed to remove trashbag.");
  274. }
  275. }
  276. return 1;
  277. }
  278. return 0;
  279. }
  280.  
  281. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  282. {
  283. //new r = random(sizeof(RandomWeapons));
  284. if(dialogid == DIALOG_WEAPON)
  285. {
  286. if(response) // If they clicked 'Yes' or pressed enter
  287. {
  288. //GivePlayerWeapon(playerid, RandomWeapons);
  289. TogglePlayerControllable(playerid,1);
  290. GivePlayerWeapon(playerid, 24, 1);
  291. SendClientMessage(playerid, COLOR_GREEN, "You took the gun.");
  292. }
  293. else // Pressed ESC or clicked cancel
  294. {
  295. //GivePlayerWeapon(playerid, 12, 1);
  296. TogglePlayerControllable(playerid,1);
  297. SendClientMessage(playerid, COLOR_GREEN, "You left the gun into dumpser.");
  298. //For info & code of this function please refer to the bottom of this article.
  299. }
  300. return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
  301. }
  302. if(dialogid == DIALOG_BURGER)
  303. {
  304. if(response) // If they clicked 'Yes' or pressed enter
  305. {
  306. TogglePlayerControllable(playerid,1);
  307. new Float:health;
  308. GetPlayerHealth(playerid, health);
  309. SetPlayerHealth(playerid, health + 10.0);
  310. ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.1, 0, 1, 1, 1, 1, 1);
  311. SendClientMessage(playerid, COLOR_GREEN, "You ate the burger.");
  312. }
  313. else // Pressed ESC or clicked cancel
  314. {
  315. TogglePlayerControllable(playerid,1);
  316. SendClientMessage(playerid, COLOR_GREEN, "You left burger into dumpser.");
  317. //For info & code of this function please refer to the bottom of this article.
  318. }
  319. return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
  320. }
  321. if(dialogid == DIALOG_DILDO)
  322. {
  323. if(response) // If they clicked 'Yes' or pressed enter
  324. {
  325. TogglePlayerControllable(playerid,1);
  326. GivePlayerWeapon(playerid, 12, 1);
  327. SendClientMessage(playerid, COLOR_GREEN, "You took the Dildo ,type /usedildo to use it.");
  328. }
  329. else // Pressed ESC or clicked cancel
  330. {
  331. TogglePlayerControllable(playerid,1);
  332. SendClientMessage(playerid, COLOR_GREEN, "You left dildo into dumpser.");
  333. //For info & code of this function please refer to the bottom of this article.
  334. }
  335. return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
  336. }
  337. if(dialogid == DIALOG_MONEY)
  338. {
  339. if(response) // If they clicked 'Yes' or pressed enter
  340. {
  341. GivePlayerMoney(playerid, 10);
  342. TogglePlayerControllable(playerid,1);
  343. SendClientMessage(playerid, COLOR_GREEN, "You took the 10 bucks.");
  344. }
  345. else // Pressed ESC or clicked cancel
  346. {
  347. //GivePlayerMoney(playerid, -10);
  348. TogglePlayerControllable(playerid,1);
  349. SendClientMessage(playerid, COLOR_GREEN, "You left the dollars into dumpster.");
  350. //For info & code of this function please refer to the bottom of this article.
  351. }
  352. return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
  353. }
  354.  
  355. if(dialogid == DIALOG_FLOWERS)
  356. {
  357. if(response) // If they clicked 'Yes' or pressed enter
  358. {
  359. GivePlayerWeapon(playerid, 14, 1);
  360. TogglePlayerControllable(playerid,1);
  361. SendClientMessage(playerid, COLOR_GREEN, "You took the flowers.");
  362. }
  363. else // Pressed ESC or clicked cancel
  364. {
  365. TogglePlayerControllable(playerid,1);
  366. SendClientMessage(playerid, COLOR_GREEN, "You left the flowers into dumpser.");
  367. //For info & code of this function please refer to the bottom of this article.
  368. }
  369. return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
  370. }
  371. return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
  372. }
  373.  
  374. stock IsPlayerNearObject(playerid, objectid, Float:range)
  375. {
  376. new Float:X, Float:Y, Float:Z;
  377. GetObjectPos(objectid, X, Y, Z);
  378. if(IsPlayerInRangeOfPoint(playerid, range, X, Y, Z))return true;
  379. return false;
  380. }
  381.  
  382. public freeze(playerid)
  383. {
  384. TogglePlayerControllable(playerid,0);
  385. }
  386.  
  387. public dildo(playerid)
  388. {
  389. SendClientMessage(playerid, COLOR_GREEN, "Finished.");
  390. ClearAnimations(playerid);
  391. }
  392.  
  393. strtok(const string[], &index)
  394. {
  395. new length = strlen(string);
  396. while ((index < length) && (string[index] <= ' '))
  397. {
  398. index++;
  399. }
  400.  
  401. new offset = index;
  402. new result[20];
  403. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  404. {
  405. result[index - offset] = string[index];
  406. index++;
  407. }
  408. result[index - offset] = EOS;
  409. return result;
  410. }
  411.  
  412. stock IsFemaleSkin(skinid)
  413. {
  414. switch (skinid)
  415. {
  416. case
  417. 9, 11, 12, 13, 31, 38, 39, 40, 41, 53, 54,
  418. 55, 56, 65, 76, 77, 89, 91, 93, 129, 130,
  419. 131, 141, 148, 150, 151, 157, 169, 172, 190,
  420. 191, 192, 193, 194, 195, 196, 197, 198, 199,
  421. 211, 214, 215, 216, 218, 219, 224, 225, 226,
  422. 231, 232, 233, 263, 298: return 1;
  423. }
  424.  
  425. return 0;
  426. }
  427.  
  428. stock IsMaleSkin(skinid)
  429. {
  430. switch (skinid)
  431. {
  432. case
  433. 0,1,4,5,6,7,8,14,15,16,17,18,19,20,
  434. 21,22,23,24,25,26,27,28,29,30,36,37,42,43,44,45,46,49,32,33,34,35,2,
  435. 47,48,50,51,52,57,59,58,60,67,70,71,78,79,84,86,94,96,97,98,99,
  436. 62,68,72,73,80,81,82,83,95,100,
  437. 101,102,103,104,105,106,107,108,109,110,111,112,113,114,
  438. 115,116,117,118,119,120,121,122,123,124,125,126,127,128,132,133,134,
  439. 135,136,137,142,143,144,146,147,149,153,
  440. 154,155,156,158,159,160,161,162,163,164,165,166,167,168,
  441. 170,171,172,173,174,175,176,177,178,179,
  442. 181,182,183,184,185,186,187,188,200,265,180,189,202,203,204,206,208,
  443. 258,209,210,212,213,217,220,221,222,223,227,228,229,230,234,235,236,240,
  444. 241,242,247,248,249,250,252,254,261,262,264,266,267,268,269,270,271,272,
  445. 273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,
  446. 291,292,294,299,259,260,293,295,296,297,61,255,253: return 1;
  447. }
  448.  
  449. return 0;
  450. }
  451.  
  452. PreloadAnimLib(playerid, animlib[])
  453. {
  454. ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
  455. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement