Advertisement
Guest User

merge

a guest
Jun 9th, 2010
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.70 KB | None | 0 0
  1. //Automatic Messages by iLcke
  2. //This is just a simple script for beginners using automatic messages on there server
  3.  
  4. #define FILTERSCRIPT
  5. #define COLOR_LIGHTBLUE 0x33CCFFAA
  6.  
  7. #include <a_samp>
  8.  
  9. forward Messages();
  10.  
  11. new Message[][] =
  12. {
  13. "Dont know Wat to do ? Type /help for more info",
  14. "Dont drink too much or you will vomit",
  15. "See a hacker or cheater and no admins online ? use /report",
  16. "Do you know you can drink ? type /drink",
  17. "Do you know you can have drugs ? type /drughelp!",
  18. "This server is scripted by James and Zacco!"
  19. };
  20.  
  21. public OnFilterScriptInit()
  22. {
  23. print("\n--------------------------------------");
  24. print(" This server is scripted by James and Zacco");
  25. print("--------------------------------------\n");
  26. return 1;
  27. }
  28.  
  29. public OnFilterScriptExit()
  30. {
  31. return 1;
  32. }
  33.  
  34. public OnGameModeInit()
  35. {
  36. SetTimer("Messages", 60000, true); // 60000 = 1 minutes
  37. return 1;
  38. }
  39.  
  40. public Messages()
  41. {
  42. SendClientMessageToAll(COLOR_LIGHTBLUE, Message[random(sizeof(Message))]);
  43. }
  44.  
  45.  
  46. //-------------------------------------------------
  47. //
  48. // Seifanimations - Perfect for role playing servers
  49. // Based on kyeman's vactions script
  50. //
  51. //-------------------------------------------------
  52.  
  53. #include <a_samp>
  54. #include <core>
  55. #include <float>
  56.  
  57. #define GREEN 0x21DD00FF
  58. #define RED 0xE60000FF
  59. #define ADMIN_RED 0xFB0000FF
  60. #define YELLOW 0xFFFF00FF
  61. #define ORANGE 0xF97804FF
  62. #define LIGHTRED 0xFF8080FF
  63. #define LIGHTBLUE 0x00C2ECFF
  64. #define PURPLE 0xB360FDFF
  65. #define PLAYER_COLOR 0xFFFFFFFF
  66. #define BLUE 0x1229FAFF
  67. #define LIGHTGREEN 0x38FF06FF
  68. #define DARKPINK 0xE100E1FF
  69. #define DARKGREEN 0x008040FF
  70. #define ANNOUNCEMENT 0x6AF7E1FF
  71. #define COLOR_SYSTEM 0xEFEFF7AA
  72. #define GREY 0xCECECEFF
  73. #define PINK 0xD52DFFFF
  74. #define DARKGREY 0x626262FF
  75. #define AQUAGREEN 0x03D687FF
  76. #define NICESKY 0x99FFFFAA
  77. #define WHITE 0xFFFFFFFF
  78.  
  79. #define SPECIAL_ACTION_PISSING 68
  80. //#define DISALLOW_ANIMS_INVEHICLES //Uncomment if you don't want animations inside vehicles
  81.  
  82. new gPlayerUsingLoopingAnim[MAX_PLAYERS];
  83. new gPlayerAnimLibsPreloaded[MAX_PLAYERS];
  84. new animation[200];
  85. new Text:txtAnimHelper;
  86.  
  87. //-------------------------------------------------
  88.  
  89. // ********** INTERNAL FUNCTIONS **********
  90.  
  91. strtok(const string[], &index)
  92. {
  93. new length = strlen(string);
  94. while ((index < length) && (string[index] <= ' '))
  95. {
  96. index++;
  97. }
  98.  
  99. new offset = index;
  100. new result[20];
  101. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  102. {
  103. result[index - offset] = string[index];
  104. index++;
  105. }
  106. result[index - offset] = EOS;
  107. return result;
  108. }
  109.  
  110. //------------------------------------------------
  111.  
  112. IsKeyJustDown(key, newkeys, oldkeys)
  113. {
  114. if((newkeys & key) && !(oldkeys & key)) return 1;
  115. return 0;
  116. }
  117.  
  118. //-------------------------------------------------
  119.  
  120. OnePlayAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
  121. {
  122. if (gPlayerUsingLoopingAnim[playerid] == 1) TextDrawHideForPlayer(playerid,txtAnimHelper);
  123. ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
  124. animation[playerid]++;
  125. }
  126.  
  127. //-------------------------------------------------
  128.  
  129. LoopingAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
  130. {
  131. if (gPlayerUsingLoopingAnim[playerid] == 1) TextDrawHideForPlayer(playerid,txtAnimHelper);
  132. gPlayerUsingLoopingAnim[playerid] = 1;
  133. ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
  134. TextDrawShowForPlayer(playerid,txtAnimHelper);
  135. animation[playerid]++;
  136. }
  137.  
  138. //-------------------------------------------------
  139.  
  140. StopLoopingAnim(playerid)
  141. {
  142. gPlayerUsingLoopingAnim[playerid] = 0;
  143. ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
  144. }
  145.  
  146. //-------------------------------------------------
  147.  
  148. PreloadAnimLib(playerid, animlib[])
  149. {
  150. ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
  151. }
  152.  
  153. //-------------------------------------------------
  154.  
  155. // ********** CALLBACKS **********
  156.  
  157. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  158. {
  159. if(!gPlayerUsingLoopingAnim[playerid]) return;
  160.  
  161. //SendClientInt(playerid, RED, "ID: %d", newkeys);
  162.  
  163. if(IsKeyJustDown(KEY_HANDBRAKE,newkeys,oldkeys)) {
  164. StopLoopingAnim(playerid);
  165. TextDrawHideForPlayer(playerid,txtAnimHelper);
  166. animation[playerid] = 0;
  167. }
  168. }
  169.  
  170. //------------------------------------------------
  171. public OnPlayerDeath(playerid, killerid, reason)
  172. {
  173. // if they die whilst performing a looping anim, we should reset the state
  174. if(gPlayerUsingLoopingAnim[playerid]) {
  175. gPlayerUsingLoopingAnim[playerid] = 0;
  176. TextDrawHideForPlayer(playerid,txtAnimHelper);
  177. }
  178. return 1;
  179. }
  180. //-------------------------------------------------
  181.  
  182. public OnPlayerSpawn(playerid)
  183. {
  184. if(!gPlayerAnimLibsPreloaded[playerid]) {
  185. PreloadAnimLib(playerid,"BOMBER");
  186. PreloadAnimLib(playerid,"RAPPING");
  187. PreloadAnimLib(playerid,"SHOP");
  188. PreloadAnimLib(playerid,"BEACH");
  189. PreloadAnimLib(playerid,"SMOKING");
  190. PreloadAnimLib(playerid,"FOOD");
  191. PreloadAnimLib(playerid,"ON_LOOKERS");
  192. PreloadAnimLib(playerid,"DEALER");
  193. PreloadAnimLib(playerid,"CRACK");
  194. PreloadAnimLib(playerid,"CARRY");
  195. PreloadAnimLib(playerid,"COP_AMBIENT");
  196. PreloadAnimLib(playerid,"PARK");
  197. PreloadAnimLib(playerid,"INT_HOUSE");
  198. PreloadAnimLib(playerid,"FOOD");
  199. PreloadAnimLib(playerid,"PED");
  200. gPlayerAnimLibsPreloaded[playerid] = 1;
  201. }
  202. return 1;
  203. }
  204.  
  205. //-------------------------------------------------
  206.  
  207. public OnPlayerConnect(playerid)
  208. {
  209. gPlayerUsingLoopingAnim[playerid] = 0;
  210. gPlayerAnimLibsPreloaded[playerid] = 0;
  211. return 1;
  212. }
  213.  
  214. //-------------------------------------------------
  215.  
  216. public OnFilterScriptInit()
  217. {
  218. // Init our text display
  219. txtAnimHelper = TextDrawCreate(610.0, 400.0,
  220. "~b~~k~~PED_LOCK_TARGET~ ~w~to stop the animation");
  221. TextDrawUseBox(txtAnimHelper, 0);
  222. TextDrawFont(txtAnimHelper, 2);
  223. TextDrawSetShadow(txtAnimHelper,0); // no shadow
  224. TextDrawSetOutline(txtAnimHelper,1); // thickness 1
  225. TextDrawBackgroundColor(txtAnimHelper,0x000000FF);
  226. TextDrawColor(txtAnimHelper,0xFFFFFFFF);
  227. TextDrawAlignment(txtAnimHelper,3); // align right
  228. }
  229.  
  230. public OnFilterScriptExit()
  231. {
  232. TextDrawDestroy(txtAnimHelper);
  233. }
  234.  
  235. //-------------------------------------------------
  236.  
  237. public OnPlayerCommandText(playerid, cmdtext[])
  238. {
  239. new cmd[256];
  240. new tmp[256];
  241. new idx;
  242. new dancestyle;
  243. cmd = strtok(cmdtext, idx);
  244.  
  245. if(strcmp(cmd,"/animlist",true)==0)
  246. {
  247. SendClientMessage(playerid, YELLOW, "________________________________________________________________________________________________________________________");
  248. SendClientMessage(playerid,RED,"-Available Animations:");
  249. SendClientMessage(playerid,WHITE,"/fall - /fallback - /injured - /akick - /push - /lowbodypush - /handsup - /bomb - /drunk - /getarrested - /laugh - /sup");
  250. SendClientMessage(playerid,WHITE," /basket - /headbutt - /medic - /spray - /robman - /taichi - /lookout - /kiss - /cellin - /cellout - /crossarms - /lay");
  251. SendClientMessage(playerid,WHITE,"/deal - /crack - /smoke - /groundsit - /chat - /dance - /fucku - /strip - /hide - /vomit - /eat - /chairsit - /reload");
  252. SendClientMessage(playerid,WHITE,"/koface - /kostomach - /rollfall - /carjacked1 - /carjacked2 - /rcarjack1 - /rcarjack2 - /lcarjack1 - /lcarjack2 - /bat");
  253. SendClientMessage(playerid,WHITE,"/lifejump - /exhaust - /leftslap - /carlock - /hoodfrisked - /lightcig - /tapcig - /box - /lay2 - /chant - finger");
  254. SendClientMessage(playerid,WHITE,"/shouting - /knife - /cop - /elbow - /kneekick - /airkick - /gkick - /gpunch - /fstance - /lowthrow - /highthrow - /aim");
  255. SendClientMessage(playerid,WHITE,"/pee - /lean - /run");
  256. SendClientMessage(playerid, YELLOW, "¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯");
  257. return true;
  258. }
  259.  
  260. // carjacked
  261. if(strcmp(cmd, "/carjacked1", true) == 0) {
  262. LoopingAnim(playerid,"PED","CAR_jackedLHS",4.0,0,1,1,1,0);
  263. return 1;
  264. }
  265.  
  266. // carjacked
  267. if(strcmp(cmd, "/carjacked2", true) == 0) {
  268. LoopingAnim(playerid,"PED","CAR_jackedRHS",4.0,0,1,1,1,0);
  269. return 1;
  270. }
  271.  
  272. #if defined DISALLOW_ANIMS_INVEHICLES
  273. if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) return SendClientMessage(playerid, RED, "You are not allowed to use animations inside a vehicle");
  274. #endif
  275.  
  276. // HANDSUP
  277. if(strcmp(cmd, "/handsup", true) == 0) {
  278. //SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
  279. LoopingAnim(playerid, "ROB_BANK","SHP_HandsUp_Scr", 4.0, 0, 1, 1, 1, 0);
  280. return 1;
  281. }
  282.  
  283. // CELLPHONE IN
  284. if(strcmp(cmd, "/cellin", true) == 0) {
  285. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
  286. return 1;
  287. }
  288.  
  289. // CELLPHONE OUT
  290. if(strcmp(cmd, "/cellout", true) == 0) {
  291. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
  292. return 1;
  293. }
  294.  
  295. // Drunk
  296. if(strcmp(cmd, "/drunk", true) == 0) {
  297. LoopingAnim(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
  298. return 1;
  299. }
  300.  
  301. // Place a Bomb
  302. if (strcmp("/bomb", cmdtext, true) == 0) {
  303. ClearAnimations(playerid);
  304. LoopingAnim(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0); // Place Bomb
  305. return 1;
  306. }
  307. // Police Arrest
  308. if (strcmp("/getarrested", cmdtext, true) == 0) {
  309. LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1); // Gun Arrest
  310. return 1;
  311. }
  312. // Laugh
  313. if (strcmp("/laugh", cmdtext, true) == 0) {
  314. OnePlayAnim(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0); // Laugh
  315. return 1;
  316. }
  317. // Rob Lookout
  318. if (strcmp("/lookout", cmdtext, true) == 0) {
  319. OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0); // Rob Lookout
  320. return 1;
  321. }
  322. // Rob Threat
  323. if (strcmp("/robman", cmdtext, true) == 0) {
  324. LoopingAnim(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0); // Rob
  325. return 1;
  326. }
  327. // Arms crossed
  328. if (strcmp("/crossarms", cmdtext, true) == 0) {
  329. LoopingAnim(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1); // Arms crossed
  330. return 1;
  331. }
  332. // Lay Down
  333. if (strcmp("/lay", cmdtext, true) == 0) {
  334. LoopingAnim(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0); // Lay down
  335. return 1;
  336. }
  337. // Take Cover
  338. if (strcmp("/hide", cmdtext, true) == 0) {
  339. LoopingAnim(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0); // Taking Cover
  340. return 1;
  341. }
  342. // Vomit
  343. if (strcmp("/vomit", cmdtext, true) == 0) {
  344. OnePlayAnim(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0); // Vomit BAH!
  345. return 1;
  346. }
  347. // Eat Burger
  348. if (strcmp("/eat", cmdtext, true) == 0) {
  349. OnePlayAnim(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
  350. return 1;
  351. }
  352. // Wave
  353. if (strcmp("/wave", cmdtext, true) == 0) {
  354. LoopingAnim(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0); // Wave
  355. return 1;
  356. }
  357. // Slap Ass
  358. if (strcmp("/slapass", cmdtext, true) == 0) {
  359. OnePlayAnim(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0); // Ass Slapping
  360. return 1;
  361. }
  362. // Dealer
  363. if (strcmp("/deal", cmdtext, true) == 0) {
  364. OnePlayAnim(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0); // Deal Drugs
  365. return 1;
  366. }
  367. // Crack Dieing
  368. if (strcmp("/crack", cmdtext, true) == 0) {
  369. LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack
  370. return 1;
  371. }
  372. // Smoking animations
  373. if(strcmp(cmd, "/smoke", true) == 0)
  374. {
  375. if (!strlen(cmdtext[7])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /smoke [1-4]");
  376. switch (cmdtext[7])
  377. {
  378. case '1': LoopingAnim(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0); // male
  379. case '2': LoopingAnim(playerid,"SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0); //female
  380. case '3': LoopingAnim(playerid,"SMOKING","M_smkstnd_loop", 4.0, 1, 0, 0, 0, 0); // standing-fucked
  381. case '4': LoopingAnim(playerid,"SMOKING","M_smk_out", 4.0, 1, 0, 0, 0, 0); // standing
  382. default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /smoke [1-4]");
  383. }
  384. return 1;
  385. }
  386. // Sit
  387. if (strcmp("/groundsit", cmdtext, true) == 0 || strcmp("/gro", cmdtext, true) == 0) {
  388. LoopingAnim(playerid,"BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0); // Sit
  389. return 1;
  390. }
  391. // Idle Chat
  392. if(strcmp(cmd, "/chat", true) == 0) {
  393. LoopingAnim(playerid,"PED","IDLE_CHAT",4.0,1,0,0,1,1);
  394. return 1;
  395. }
  396. // Fucku
  397. if(strcmp(cmd, "/fucku", true) == 0) {
  398. OnePlayAnim(playerid,"PED","fucku",4.0,0,0,0,0,0);
  399. return 1;
  400. }
  401. // TaiChi
  402. if(strcmp(cmd, "/taichi", true) == 0) {
  403. LoopingAnim(playerid,"PARK","Tai_Chi_Loop",4.0,1,0,0,0,0);
  404. return 1;
  405. }
  406.  
  407. // ChairSit
  408. if(strcmp(cmd, "/chairsit", true) == 0) {
  409. LoopingAnim(playerid,"PED","SEAT_down",4.1,0,1,1,1,0);
  410. return 1;
  411. }
  412.  
  413. // Fall on the ground
  414. if(strcmp(cmd, "/fall", true) == 0) {
  415. LoopingAnim(playerid,"PED","KO_skid_front",4.1,0,1,1,1,0);
  416. return 1;
  417. }
  418.  
  419. // Fall
  420. if(strcmp(cmd, "/fallback", true) == 0) {
  421. LoopingAnim(playerid, "PED","FLOOR_hit_f", 4.0, 1, 0, 0, 0, 0);
  422. return 1;
  423. }
  424.  
  425. // kiss
  426. if(strcmp(cmd, "/kiss", true) == 0) {
  427. LoopingAnim(playerid, "KISSING", "Playa_Kiss_02", 3.0, 1, 1, 1, 1, 0);
  428. return 1;
  429. }
  430.  
  431. // Injujred
  432. if(strcmp(cmd, "/injured", true) == 0) {
  433. LoopingAnim(playerid, "SWEET", "Sweet_injuredloop", 4.0, 1, 0, 0, 0, 0);
  434. return 1;
  435. }
  436.  
  437. // Homie animations
  438. if(strcmp(cmd, "/sup", true) == 0)
  439. {
  440. if (!strlen(cmdtext[5])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /sup [1-3]");
  441. switch (cmdtext[5])
  442. {
  443. case '1': OnePlayAnim(playerid,"GANGS","hndshkba",4.0,0,0,0,0,0);
  444. case '2': OnePlayAnim(playerid,"GANGS","hndshkda",4.0,0,0,0,0,0);
  445. case '3': OnePlayAnim(playerid,"GANGS","hndshkfa_swt",4.0,0,0,0,0,0);
  446. default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /sup [1-3]");
  447. }
  448. return 1;
  449. }
  450.  
  451. // Rap animations
  452. if(strcmp(cmd, "/rap", true) == 0)
  453. {
  454. if (!strlen(cmdtext[5])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /rap [1-4]");
  455. switch (cmdtext[5])
  456. {
  457. case '1': LoopingAnim(playerid,"RAPPING","RAP_A_Loop",4.0,1,0,0,0,0);
  458. case '2': LoopingAnim(playerid,"RAPPING","RAP_C_Loop",4.0,1,0,0,0,0);
  459. case '3': LoopingAnim(playerid,"GANGS","prtial_gngtlkD",4.0,1,0,0,0,0);
  460. case '4': LoopingAnim(playerid,"GANGS","prtial_gngtlkH",4.0,1,0,0,1,1);
  461. default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /rap [1-4]");
  462. }
  463. return 1;
  464. }
  465.  
  466. // Violence animations
  467. if(strcmp(cmd, "/push", true) == 0) {
  468. OnePlayAnim(playerid,"GANGS","shake_cara",4.0,0,0,0,0,0);
  469. return 1;
  470. }
  471.  
  472. if(strcmp(cmd, "/akick", true) == 0) {
  473. OnePlayAnim(playerid,"POLICE","Door_Kick",4.0,0,0,0,0,0);
  474. return 1;
  475. }
  476.  
  477. if(strcmp(cmd, "/lowbodypush", true) == 0) {
  478. OnePlayAnim(playerid,"GANGS","shake_carSH",4.0,0,0,0,0,0);
  479. return 1;
  480. }
  481.  
  482. // Spray
  483. if(strcmp(cmd, "/spray", true) == 0) {
  484. OnePlayAnim(playerid,"SPRAYCAN","spraycan_full",4.0,0,0,0,0,0);
  485. return 1;
  486. }
  487.  
  488. // Headbutt
  489. if(strcmp(cmd, "/headbutt", true) == 0) {
  490. OnePlayAnim(playerid,"WAYFARER","WF_Fwd",4.0,0,0,0,0,0);
  491. return 1;
  492. }
  493.  
  494. // Medic
  495. if(strcmp(cmd, "/medic", true) == 0) {
  496. OnePlayAnim(playerid,"MEDIC","CPR",4.0,0,0,0,0,0);
  497. return 1;
  498. }
  499.  
  500. // KO Face
  501. if(strcmp(cmd, "/koface", true) == 0) {
  502. LoopingAnim(playerid,"PED","KO_shot_face",4.0,0,1,1,1,0);
  503. return 1;
  504. }
  505.  
  506. // KO Stomach
  507. if(strcmp(cmd, "/kostomach", true) == 0) {
  508. LoopingAnim(playerid,"PED","KO_shot_stom",4.0,0,1,1,1,0);
  509. return 1;
  510. }
  511.  
  512. // Jump for your life!
  513. if(strcmp(cmd, "/lifejump", true) == 0) {
  514. LoopingAnim(playerid,"PED","EV_dive",4.0,0,1,1,1,0);
  515. return 1;
  516. }
  517.  
  518. // Exhausted
  519. if(strcmp(cmd, "/exhaust", true) == 0) {
  520. LoopingAnim(playerid,"PED","IDLE_tired",3.0,1,0,0,0,0);
  521. return 1;
  522. }
  523.  
  524. // Left big slap
  525. if(strcmp(cmd, "/leftslap", true) == 0) {
  526. OnePlayAnim(playerid,"PED","BIKE_elbowL",4.0,0,0,0,0,0);
  527. return 1;
  528. }
  529.  
  530. // Big fall
  531. if(strcmp(cmd, "/rollfall", true) == 0) {
  532. LoopingAnim(playerid,"PED","BIKE_fallR",4.0,0,1,1,1,0);
  533. return 1;
  534. }
  535.  
  536. // Locked
  537. if(strcmp(cmd, "/carlock", true) == 0) {
  538. OnePlayAnim(playerid,"PED","CAR_doorlocked_LHS",4.0,0,0,0,0,0);
  539. return 1;
  540. }
  541.  
  542. // carjack
  543. if(strcmp(cmd, "/rcarjack1", true) == 0) {
  544. OnePlayAnim(playerid,"PED","CAR_pulloutL_LHS",4.0,0,0,0,0,0);
  545. return 1;
  546. }
  547.  
  548. // carjack
  549. if(strcmp(cmd, "/lcarjack1", true) == 0) {
  550. OnePlayAnim(playerid,"PED","CAR_pulloutL_RHS",4.0,0,0,0,0,0);
  551. return 1;
  552. }
  553.  
  554. // carjack
  555. if(strcmp(cmd, "/rcarjack2", true) == 0) {
  556. OnePlayAnim(playerid,"PED","CAR_pullout_LHS",4.0,0,0,0,0,0);
  557. return 1;
  558. }
  559.  
  560. // carjack
  561. if(strcmp(cmd, "/lcarjack2", true) == 0) {
  562. OnePlayAnim(playerid,"PED","CAR_pullout_RHS",4.0,0,0,0,0,0);
  563. return 1;
  564. }
  565.  
  566. // Hood frisked
  567. if(strcmp(cmd, "/hoodfrisked", true) == 0) {
  568. LoopingAnim(playerid,"POLICE","crm_drgbst_01",4.0,0,1,1,1,0);
  569. return 1;
  570. }
  571.  
  572. // Lighting cigarette
  573. if(strcmp(cmd, "/lightcig", true) == 0) {
  574. OnePlayAnim(playerid,"SMOKING","M_smk_in",3.0,0,0,0,0,0);
  575. return 1;
  576. }
  577.  
  578. // Tap cigarette
  579. if(strcmp(cmd, "/tapcig", true) == 0) {
  580. OnePlayAnim(playerid,"SMOKING","M_smk_tap",3.0,0,0,0,0,0);
  581. return 1;
  582. }
  583.  
  584. // Bat stance
  585. if(strcmp(cmd, "/bat", true) == 0) {
  586. LoopingAnim(playerid,"BASEBALL","Bat_IDLE",4.0,1,1,1,1,0);
  587. return 1;
  588. }
  589.  
  590. // Boxing
  591. if(strcmp(cmd, "/box", true) == 0) {
  592. LoopingAnim(playerid,"GYMNASIUM","GYMshadowbox",4.0,1,1,1,1,0);
  593. return 1;
  594. }
  595.  
  596. // Lay 2
  597. if(strcmp(cmd, "/lay2", true) == 0) {
  598. LoopingAnim(playerid,"SUNBATHE","Lay_Bac_in",3.0,0,1,1,1,0);
  599. return 1;
  600. }
  601.  
  602. // Gogogo
  603. if(strcmp(cmd, "/chant", true) == 0) {
  604. LoopingAnim(playerid,"RIOT","RIOT_CHANT",4.0,1,1,1,1,0);
  605. return 1;
  606. }
  607.  
  608. // Finger
  609. if(strcmp(cmd, "/finger", true) == 0) {
  610. OnePlayAnim(playerid,"RIOT","RIOT_FUKU",2.0,0,0,0,0,0);
  611. return 1;
  612. }
  613.  
  614. // Shouting
  615. if(strcmp(cmd, "/shouting", true) == 0) {
  616. LoopingAnim(playerid,"RIOT","RIOT_shout",4.0,1,0,0,0,0);
  617. return 1;
  618. }
  619.  
  620. // Cop stance
  621. if(strcmp(cmd, "/cop", true) == 0) {
  622. OnePlayAnim(playerid,"SWORD","sword_block",50.0,0,1,1,1,1);
  623. return 1;
  624. }
  625.  
  626. // Elbow
  627. if(strcmp(cmd, "/elbow", true) == 0) {
  628. OnePlayAnim(playerid,"FIGHT_D","FightD_3",4.0,0,1,1,0,0);
  629. return 1;
  630. }
  631.  
  632. // Knee kick
  633. if(strcmp(cmd, "/kneekick", true) == 0) {
  634. OnePlayAnim(playerid,"FIGHT_D","FightD_2",4.0,0,1,1,0,0);
  635. return 1;
  636. }
  637.  
  638. // Fight stance
  639. if(strcmp(cmd, "/fstance", true) == 0) {
  640. LoopingAnim(playerid,"FIGHT_D","FightD_IDLE",4.0,1,1,1,1,0);
  641. return 1;
  642. }
  643.  
  644. // Ground punch
  645. if(strcmp(cmd, "/gpunch", true) == 0) {
  646. OnePlayAnim(playerid,"FIGHT_B","FightB_G",4.0,0,0,0,0,0);
  647. return 1;
  648. }
  649.  
  650. // Air kick
  651. if(strcmp(cmd, "/airkick", true) == 0) {
  652. OnePlayAnim(playerid,"FIGHT_C","FightC_M",4.0,0,1,1,0,0);
  653. return 1;
  654. }
  655.  
  656. // Ground kick
  657. if(strcmp(cmd, "/gkick", true) == 0) {
  658. OnePlayAnim(playerid,"FIGHT_D","FightD_G",4.0,0,0,0,0,0);
  659. return 1;
  660. }
  661.  
  662. // Low throw
  663. if(strcmp(cmd, "/lowthrow", true) == 0) {
  664. OnePlayAnim(playerid,"GRENADE","WEAPON_throwu",3.0,0,0,0,0,0);
  665. return 1;
  666. }
  667.  
  668. // Ground kick
  669. if(strcmp(cmd, "/highthrow", true) == 0) {
  670. OnePlayAnim(playerid,"GRENADE","WEAPON_throw",4.0,0,0,0,0,0);
  671. return 1;
  672. }
  673.  
  674. // Deal stance
  675. if(strcmp(cmd, "/dealstance", true) == 0) {
  676. LoopingAnim(playerid,"DEALER","DEALER_IDLE",4.0,1,0,0,0,0);
  677. return 1;
  678. }
  679.  
  680. // Deal stance
  681. if(strcmp(cmd, "/pee", true) == 0) {
  682. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_PISSING);
  683. return 1;
  684. }
  685.  
  686. // Knife animations
  687. if(strcmp(cmd, "/knife", true) == 0)
  688. {
  689. if (!strlen(cmdtext[7])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /knife [1-4]");
  690. switch (cmdtext[7])
  691. {
  692. case '1': LoopingAnim(playerid,"KNIFE","KILL_Knife_Ped_Damage",4.0,0,1,1,1,0);
  693. case '2': LoopingAnim(playerid,"KNIFE","KILL_Knife_Ped_Die",4.0,0,1,1,1,0);
  694. case '3': OnePlayAnim(playerid,"KNIFE","KILL_Knife_Player",4.0,0,0,0,0,0);
  695. case '4': LoopingAnim(playerid,"KNIFE","KILL_Partial",4.0,0,1,1,1,1);
  696. default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /knife [1-4]");
  697. }
  698. return 1;
  699. }
  700.  
  701. // Basket-ball
  702. if(strcmp(cmd, "/basket", true) == 0)
  703. {
  704. if (!strlen(cmdtext[8])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /basket [1-6]");
  705. switch (cmdtext[8])
  706. {
  707. case '1': LoopingAnim(playerid,"BSKTBALL","BBALL_idleloop",4.0,1,0,0,0,0);
  708. case '2': OnePlayAnim(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);
  709. case '3': OnePlayAnim(playerid,"BSKTBALL","BBALL_pickup",4.0,0,0,0,0,0);
  710. case '4': LoopingAnim(playerid,"BSKTBALL","BBALL_run",4.1,1,1,1,1,1);
  711. case '5': LoopingAnim(playerid,"BSKTBALL","BBALL_def_loop",4.0,1,0,0,0,0);
  712. case '6': LoopingAnim(playerid,"BSKTBALL","BBALL_Dnk",4.0,1,0,0,0,0);
  713. default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /basket [1-6]");
  714. }
  715. return 1;
  716. }
  717.  
  718. // Reloading guns
  719. if(strcmp(cmd, "/reload", true) == 0)
  720. {
  721. if (!strlen(cmdtext[8])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /reload [deagle/smg/ak/m4]");
  722. if (strcmp("deagle",cmdtext[8],true) == 0)
  723. {
  724. OnePlayAnim(playerid,"COLT45","colt45_reload",4.0,0,0,0,0,1);
  725. }
  726. else if (strcmp("smg",cmdtext[8],true) == 0 || strcmp("ak",cmdtext[8],true) == 0 || strcmp("m4",cmdtext[8],true) == 0)
  727. {
  728. OnePlayAnim(playerid,"UZI","UZI_reload",4.0,0,0,0,0,0);
  729. }
  730. else SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /reload [deagle/smg/ak/m4]");
  731. return 1;
  732. }
  733.  
  734. if(strcmp(cmd, "/gwalk", true) == 0)
  735. {
  736. if (!strlen(cmdtext[6])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /gwalk [1/2]");
  737. new style = strval(cmdtext[6]);
  738. if (style == 1)
  739. {
  740. LoopingAnim(playerid,"PED","WALK_gang1",4.1,1,1,1,1,1);
  741. }
  742. else if (style == 2)
  743. {
  744. LoopingAnim(playerid,"PED","WALK_gang2",4.1,1,1,1,1,1);
  745. }
  746. else SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /gwalk [1/2]");
  747. return 1;
  748. }
  749.  
  750. //Aiming animation
  751. if(strcmp(cmd, "/aim", true) == 0)
  752. {
  753. if (!strlen(cmdtext[5])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /aim [1-.]");
  754. switch (cmdtext[5])
  755. {
  756. case '1': LoopingAnim(playerid,"PED","gang_gunstand",4.0,1,1,1,1,1);
  757. case '2': LoopingAnim(playerid,"PED","Driveby_L",4.0,0,1,1,1,1);
  758. case '3': LoopingAnim(playerid,"PED","Driveby_R",4.0,0,1,1,1,1);
  759. default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /aim [1-3]");
  760. }
  761. return 1;
  762. }
  763.  
  764. // Leaning animation
  765. if(strcmp(cmd, "/lean", true) == 0)
  766. {
  767. if (!strlen(cmdtext[6])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /lean [1-2]");
  768. switch (cmdtext[6])
  769. {
  770. case '1': LoopingAnim(playerid,"GANGS","leanIDLE",4.0,0,1,1,1,0);
  771. case '2': LoopingAnim(playerid,"MISC","Plyrlean_loop",4.0,0,1,1,1,0);
  772. default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /lean [1-2]");
  773. }
  774. return 1;
  775. }
  776.  
  777. if(strcmp(cmd, "/run", true) == 0)
  778. {
  779. LoopingAnim(playerid,"PED","sprint_civi",floatstr(cmdtext[5]),1,1,1,1,1);
  780. printf("%f",floatstr(cmdtext[5]));
  781. return 1;
  782. }
  783.  
  784. // Clear
  785. if(strcmp(cmd, "/clear", true) == 0) {
  786. //ClearAnimations(playerid);
  787. ApplyAnimation(playerid, "CARRY", "crry_prtial", 1.0, 0, 0, 0, 0, 0);
  788. return 1;
  789. }
  790.  
  791. // Strip
  792. if(strcmp(cmd, "/strip", true) == 0)
  793. {
  794. if (!strlen(cmdtext[7])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /strip [A-G]");
  795. switch (cmdtext[7])
  796. {
  797. case 'a', 'A': LoopingAnim(playerid,"STRIP", "strip_A", 4.1, 1, 1, 1, 1, 1 );
  798. case 'b', 'B': LoopingAnim(playerid,"STRIP", "strip_B", 4.1, 1, 1, 1, 1, 1 );
  799. case 'c', 'C': LoopingAnim(playerid,"STRIP", "strip_C", 4.1, 1, 1, 1, 1, 1 );
  800. case 'd', 'D': LoopingAnim(playerid,"STRIP", "strip_D", 4.1, 1, 1, 1, 1, 1 );
  801. case 'e', 'E': LoopingAnim(playerid,"STRIP", "strip_E", 4.1, 1, 1, 1, 1, 1 );
  802. case 'f', 'F': LoopingAnim(playerid,"STRIP", "strip_F", 4.1, 1, 1, 1, 1, 1 );
  803. case 'g', 'G': LoopingAnim(playerid,"STRIP", "strip_G", 4.1, 1, 1, 1, 1, 1 );
  804. default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /strip [A-G]");
  805. }
  806. return 1;
  807. }
  808.  
  809. /* Would allow people to troll... but would be cool as a script
  810. controlled function
  811. // Bed Sleep R
  812. if(strcmp(cmd, "/inbedright", true) == 0) {
  813. LoopingAnim(playerid,"INT_HOUSE","BED_Loop_R",4.0,1,0,0,0,0);
  814. return 1;
  815. }
  816. // Bed Sleep L
  817. if(strcmp(cmd, "/inbedleft", true) == 0) {
  818. LoopingAnim(playerid,"INT_HOUSE","BED_Loop_L",4.0,1,0,0,0,0);
  819. return 1;
  820. }*/
  821.  
  822.  
  823. // START DANCING
  824. if(strcmp(cmd, "/dance", true) == 0) {
  825.  
  826. // Get the dance style param
  827. tmp = strtok(cmdtext, idx);
  828. if(!strlen(tmp)) {
  829. SendClientMessage(playerid,0xFF0000FF,"USAGE: /dance [style 1-4]");
  830. return 1;
  831. }
  832.  
  833. dancestyle = strval(tmp);
  834. if(dancestyle < 1 || dancestyle > 4) {
  835. SendClientMessage(playerid,0xFF0000FF,"USAGE: /dance [style 1-4]");
  836. return 1;
  837. }
  838.  
  839. if(dancestyle == 1) {
  840. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
  841. } else if(dancestyle == 2) {
  842. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);
  843. } else if(dancestyle == 3) {
  844. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);
  845. } else if(dancestyle == 4) {
  846. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4);
  847. }
  848. return 1;
  849. }
  850.  
  851. return 0;
  852. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement