Advertisement
B-Matt

Movie Making Gamemode by B-Matt v2

Jan 5th, 2013
1,286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.71 KB | None | 0 0
  1. /***************************************************************
  2. * *
  3. * Movie Making Gamemode v2.0 *
  4. * (c) 2013. B-Matt *
  5. * *
  6. ****************************************************************/
  7. //Includes
  8. #include <a_samp>
  9. #include <ZCMD>
  10. #include <sscanf2>
  11.  
  12. //Colors
  13. #define COLOR_WHITE 0xFFFFFFFF
  14. #define COLOR_RED 0xFF0000CC
  15. #define COLOR_LIGHTBLUE 0x0096FFCC
  16. #define COLOR_YELLOW 0xFFD100FF
  17.  
  18. //Dialogs
  19. #define DIALOG_PORT 1
  20.  
  21. //Variables
  22. new Name[MAX_PLAYERS]; //var for /name CMD
  23. new Godmode[2]; //godmode var
  24. new CountDown = 0; //Countdown variable
  25. new CountT; //Count timer variables
  26. new Count; //security check for count
  27. new control[MAX_PLAYERS]; //var for freeze
  28. new DelObject; //var for deleting object
  29. new TArmed[MAX_PLAYERS];
  30. new BombO; //bomb object
  31.  
  32. //Forwards
  33. forward OnCountdown(playerid);
  34.  
  35. main()
  36. {
  37. print("\n ===========================");
  38. print(" Movie Making Gamemode");
  39. print(" (c) B-Matt, 2013.");
  40. print(" ===========================\n");
  41. }
  42. //SA-MP callbacks
  43. public OnGameModeInit()
  44. {
  45. SetGameModeText("Movie Making v2");
  46. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  47. return 1;
  48. }
  49.  
  50. public OnGameModeExit()
  51. {
  52. return 1;
  53. }
  54.  
  55. public OnPlayerRequestClass(playerid, classid)
  56. {
  57. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  58. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  59. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  60. return 1;
  61. }
  62.  
  63. public OnPlayerConnect(playerid)
  64. {
  65. Name[playerid] = 1;
  66. control[playerid] = 1;
  67. return 1;
  68. }
  69.  
  70. public OnVehicleDamageStatusUpdate(vehicleid, playerid)
  71. {
  72. #pragma unused playerid
  73. if(Godmode[0] == 1) {
  74. new panels, doors, lights, tires;
  75. GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
  76. tires = encode_tires(0, 0, 0, 0);
  77. panels = encode_panels(0, 0, 0, 0, 0, 0, 0);
  78. doors = encode_doors(0, 0, 0, 0, 0, 0);
  79. lights = encode_lights(0, 0, 0, 0);
  80. UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); }
  81. return 1;
  82. }
  83.  
  84. encode_tires(tire1, tire2, tire3, tire4) return tire1 | (tire2 << 1) | (tire3 << 2) | (tire4 << 3);
  85. encode_panels(flp, frp, rlp, rrp, windshield, front_bumper, rear_bumper)
  86. {
  87. return flp | (frp << 4) | (rlp << 8) | (rrp << 12) | (windshield << 16) | (front_bumper << 20) | (rear_bumper << 24);
  88. }
  89. encode_doors(bonnet, boot, driver_door, passenger_door, behind_driver_door, behind_passenger_door)
  90. {
  91. #pragma unused behind_driver_door
  92. #pragma unused behind_passenger_door
  93. return bonnet | (boot << 8) | (driver_door << 16) | (passenger_door << 24);
  94. }
  95. encode_lights(light1, light2, light3, light4)
  96. {
  97. return light1 | (light2 << 1) | (light3 << 2) | (light4 << 3);
  98. }
  99.  
  100. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  101. {
  102. if (newkeys & KEY_FIRE) //Triger Bomb
  103. {
  104. if(TArmed[playerid] == 1)
  105. {
  106. new Float:X, Float:Y, Float:Z;
  107. GetObjectPos(BombO, X, Y, Z);
  108. CreateExplosion(X, Y, Z, 2, 100.0);
  109. CreateExplosion(X, Y, Z, 12, 25.0);
  110. CreateExplosion(X, Y, Z, 10, 30.0);
  111. DestroyObject(BombO);
  112. TArmed[playerid] = 0;
  113. }
  114. }
  115. return 1;
  116. }
  117.  
  118. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  119. {
  120. if(dialogid == DIALOG_PORT)
  121. {
  122. switch(listitem)
  123. {
  124. case 0: //LS
  125. {
  126. if (GetPlayerState(playerid) == 2) {
  127. new tmpcar = GetPlayerVehicleID(playerid);
  128. SetVehiclePos(tmpcar, 1529.6,-1691.2,13.3); }
  129. else {
  130. SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
  131. SendClientMessage(playerid, COLOR_WHITE, "You are teleported in front of police station!");
  132. SetPlayerInterior(playerid,0); }
  133. }
  134. case 1: //Bay Side
  135. {
  136. if (GetPlayerState(playerid) == 2) {
  137. new tmpcar = GetPlayerVehicleID(playerid);
  138. SetVehiclePos(tmpcar, -2404.67, 2217.72, 4.98); }
  139. else {
  140. SetPlayerPos(playerid, -2404.67, 2217.72, 4.98);
  141. SendClientMessage(playerid, COLOR_WHITE, "You are teleported at Bay Side !");
  142. SetPlayerInterior(playerid,0); }
  143. }
  144. case 2: //burg
  145. {
  146. new tmpcar = GetPlayerVehicleID(playerid);
  147. if (GetPlayerState(playerid) == 2) {
  148. SetVehiclePos(tmpcar, 1194.6770,-923.1213,43.0762); }
  149. else {
  150. SetPlayerPos(playerid, 1194.6770,-923.1213,43.0762);
  151. SendClientMessage(playerid, COLOR_WHITE, "You are teleported in front of North Burg!");
  152. SetPlayerInterior(playerid,0); }
  153. }
  154. case 3: //banka
  155. {
  156. new tmpcar = GetPlayerVehicleID(playerid);
  157. if (GetPlayerState(playerid) == 2) {
  158. SetVehiclePos(tmpcar, 1459.9022,-1024.1600,23.8281); }
  159. else {
  160. SetPlayerPos(playerid, 1459.9022,-1024.1600,23.8281);
  161. SendClientMessage(playerid, COLOR_WHITE, "You are teleported in front of Bank!");
  162. SetPlayerInterior(playerid,0); }
  163. }
  164. case 4: //aero
  165. {
  166. new tmpcar = GetPlayerVehicleID(playerid);
  167. if (GetPlayerState(playerid) == 2) {
  168. SetVehiclePos(tmpcar, 1963.0913,-2199.6104,13.5469); }
  169. else {
  170. SetPlayerPos(playerid, 1963.0913,-2199.6104,13.5469);
  171. SendClientMessage(playerid, COLOR_WHITE, "You are teleported at Aero!");
  172. SetPlayerInterior(playerid,0); }
  173. }
  174. case 5: //aera
  175. {
  176. new tmpcar = GetPlayerVehicleID(playerid);
  177. if (GetPlayerState(playerid) == 2) {
  178. SetVehiclePos(tmpcar, 110.8750,1921.0206,18.6678); }
  179. else {
  180. SetPlayerPos(playerid, 110.8750,1921.0206,18.6678);
  181. SendClientMessage(playerid, COLOR_WHITE, "You are teleported in Area 51!");
  182. SetPlayerInterior(playerid,0); }
  183. }
  184. case 6: //LV
  185. {
  186. new tmpcar = GetPlayerVehicleID(playerid);
  187. if (GetPlayerState(playerid) == 2) {
  188. SetVehiclePos(tmpcar, 1699.2, 1435.1, 10.7); }
  189. else {
  190. SetPlayerPos(playerid, 1699.2,1435.1, 10.7);
  191. SendClientMessage(playerid, COLOR_WHITE, "You are teleported at Aero LV!");
  192. SetPlayerInterior(playerid,0); }
  193. }
  194. case 7: //desert
  195. {
  196. new tmpcar = GetPlayerVehicleID(playerid);
  197. if (GetPlayerState(playerid) == 2) {
  198. SetVehiclePos(tmpcar, 400.9437,2522.5730,16.4844); }
  199. else {
  200. SetPlayerPos(playerid, 400.9437,2522.5730,16.4844);
  201. SendClientMessage(playerid, COLOR_WHITE, "You are teleported in front of Aero in desert!");
  202. SetPlayerInterior(playerid,0); }
  203. }
  204. case 8: //SF
  205. {
  206. new tmpcar = GetPlayerVehicleID(playerid);
  207. if (GetPlayerState(playerid) == 2) {
  208. SetVehiclePos(tmpcar, -1417.0,-295.8,14.1); }
  209. else {
  210. SetPlayerPos(playerid, -1417.0,-295.8,14.1);
  211. SendClientMessage(playerid, COLOR_WHITE, "You are teleported in front of Aero SF!");
  212. SetPlayerInterior(playerid,0); }
  213. }
  214. case 9: //pizza
  215. {
  216. new tmpcar = GetPlayerVehicleID(playerid);
  217. if (GetPlayerState(playerid) == 2) {
  218. SetVehiclePos(tmpcar, 2112,-1784.1558,12.9844); }
  219. else {
  220. SetPlayerPos(playerid, 2112,-1784.1558,12.9844);
  221. SendClientMessage(playerid, COLOR_WHITE, "You are teleported in front of Pizza Stack!");
  222. SetPlayerInterior(playerid,0); }
  223. }
  224. case 10: //grotti
  225. {
  226. if (GetPlayerState(playerid) == 2) {
  227. new tmpcar = GetPlayerVehicleID(playerid);
  228. SetVehiclePos(tmpcar, 549.2282,-1280.4635,17.3313);
  229. }
  230. else {
  231. SetPlayerPos(playerid, 549.2282,-1280.4635,17.3313);
  232. SendClientMessage(playerid, COLOR_WHITE, "You are teleported in front of Grotti!");
  233. SetPlayerInterior(playerid,0); }
  234. }
  235. }
  236. }
  237. return 1;
  238. }
  239.  
  240. public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
  241. {
  242. new Float:oldX, Float:oldY, Float:oldZ,
  243. Float:oldRotX, Float:oldRotY, Float:oldRotZ,
  244. Float:newX, Float:newY, Float:newZ,
  245. Float:newRotX, Float:newRotY, Float:newRotZ;
  246.  
  247. GetObjectPos(objectid, oldX, oldY, oldZ);
  248. GetObjectRot(objectid, oldRotX, oldRotY, oldRotZ);
  249.  
  250. if(!playerobject)
  251. {
  252. if(!IsValidObject(objectid)) return;
  253. MoveObject(objectid, fX, fY, fZ, 10.0, fRotX, fRotY, fRotZ);
  254. }
  255.  
  256. if(response == EDIT_RESPONSE_FINAL)
  257. {
  258. SetObjectRot(objectid, newX, newY, newZ);
  259. SetObjectPos(objectid, newRotX, newRotY, newRotZ);
  260. CancelEdit(playerid);
  261. }
  262.  
  263. if(response == EDIT_RESPONSE_CANCEL)
  264. {
  265.  
  266. if(!playerobject)
  267. {
  268. SetObjectPos(objectid, oldX, oldY, oldZ);
  269. SetObjectRot(objectid, oldRotX, oldRotY, oldRotZ);
  270. CancelEdit(playerid);
  271. }
  272. }
  273. }
  274.  
  275. public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
  276. {
  277. if(type == SELECT_OBJECT_GLOBAL_OBJECT)
  278. {
  279. if(DelObject == 1)
  280. {
  281. DestroyObject(objectid);
  282. CancelEdit(playerid);
  283. SendClientMessage(playerid, COLOR_YELLOW, " You deleted that object!");
  284. }
  285. else
  286. {
  287. EditObject(playerid, objectid);
  288. SendClientMessage(playerid, 0xFFFFFFFF, " You are now editing your object!");
  289. }
  290. }
  291. return 1;
  292. }
  293. //Custom callbacks
  294. public OnCountdown(playerid)
  295. {
  296. CountDown--;
  297. new string[16];
  298. if(CountDown == 0)
  299. {
  300. format(string, sizeof(string), "~r~ Start!");
  301. GameTextForAll(string, 1000, 6);
  302. KillTimer(CountT);
  303. CountDown = 0;
  304. Count = 0;
  305. }
  306. else
  307. {
  308. format(string, sizeof(string), "%i", CountDown);
  309. GameTextForAll(string, 1000, 6);
  310. }
  311. return 1;
  312. }
  313. //CMDs
  314. CMD:help(playerid, params[])
  315. {
  316. SendClientMessage(playerid, COLOR_LIGHTBLUE, "_____________________________* {FFFFFF}HELP{0096FF} *_____________________________");
  317. SendClientMessage(playerid, -1, " /veh - /deleteveh - /gethere - /port - /cargod - /god - /name - /cchat - /disarm");
  318. SendClientMessage(playerid, -1, " /object - /mod - /gun - /goto - /set - /count - /anims - /fix - /plant - /time");
  319. SendClientMessage(playerid, COLOR_LIGHTBLUE, "________________________________________________________________");
  320. return 1;
  321. }
  322.  
  323. CMD:kick(playerid, params[])
  324. {
  325. new pID, pName[MAX_PLAYER_NAME], reason[32], string[128];
  326. if(IsPlayerAdmin(playerid)) {
  327. if(sscanf(params, "us[32]", pID, reason)) return SendClientMessage(playerid, -1, "USAGE: /kick [ID/Name]");
  328. GetPlayerName(pID, pName, sizeof(pName));
  329. format(string, sizeof(string), "%s has been kicked by Admin, reason: %s", pName, reason);
  330. SendClientMessageToAll(COLOR_YELLOW, string);
  331. Kick(pID); }
  332. return 1;
  333. }
  334.  
  335. CMD:veh(playerid, params[])
  336. {
  337. new Float:Pos[4], vehicleid, color1, color2;
  338. if(sscanf(params, "iii", vehicleid, color1, color2)) return SendClientMessage(playerid, -1, "USAGE: /veh [VehicleID][Color1][Color2]");
  339. if(vehicleid < 400 || vehicleid > 611) return SendClientMessage(playerid, COLOR_RED, "Wrong vehicle ID input! (400-611)");
  340. if(color1 > 255 || color1 < 0) return SendClientMessage(playerid, COLOR_RED, "Wrong color input! (0-255)");
  341. if(color2 < 0 || color2 > 255) return SendClientMessage(playerid, COLOR_RED, "Wrong color input! (0-255)");
  342. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  343. GetPlayerFacingAngle(playerid, Pos[3]);
  344. vehicleid = CreateVehicle(vehicleid, Pos[0], Pos[1], Pos[2], Pos[3], color1, color2, 60);
  345. PutPlayerInVehicle(playerid, vehicleid, 0);
  346. return 1;
  347. }
  348.  
  349. CMD:deleteveh(playerid, params[])
  350. {
  351. new vehicleid = GetPlayerVehicleID(playerid);
  352. if(IsPlayerInVehicle(playerid, vehicleid)) {
  353. DestroyVehicle(vehicleid); }
  354. return 1;
  355. }
  356.  
  357. CMD:gethere(playerid, params[])
  358. {
  359. new Float:Pos[3], pID;
  360. if(sscanf(params, "u", pID)) return SendClientMessage(playerid, -1, "USAGE: /gethere [ID/Name]");
  361. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  362. SetPlayerPos(pID, Pos[0]+2, Pos[1]+2, Pos[2]);
  363. return 1;
  364. }
  365.  
  366. CMD:goto(playerid,params[])
  367. {
  368. new Float:Pos[3], pID;
  369. if(sscanf(params, "u", pID)) return SendClientMessage(playerid, -1, "USAGE: /goto [ID/Name]");
  370. GetPlayerPos(pID, Pos[0], Pos[1], Pos[2]);
  371. SetPlayerPos(playerid, Pos[0]+2, Pos[1]+2, Pos[2]);
  372. return 1;
  373. }
  374.  
  375. CMD:port(playerid, params[])
  376. {
  377. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Port", "Los Santos\nBay Side\nBurg\nBanka\nAerodrom\nArea 51\nLas Venturas\nDesert\nSan Fiero\nPizza Stacked\nGrotti\n", "Select", "Quit");
  378. return 1;
  379. }
  380.  
  381. CMD:cargod(playerid, params[])
  382. {
  383. if(Godmode[0] == 0) {
  384. SendClientMessage(playerid, COLOR_LIGHTBLUE, " You activate God Mode on your vehicle!");
  385. Godmode[0] = 1; }
  386. else {
  387. SendClientMessage(playerid, COLOR_LIGHTBLUE, " You deactivate God Mode on your vehicle!");
  388. Godmode[0] = 0; }
  389. return 1;
  390. }
  391.  
  392. CMD:god(playerid, params[])
  393. {
  394. if(Godmode[1] == 0) {
  395. SendClientMessage(playerid, COLOR_LIGHTBLUE, " You activate God Mode!");
  396. Godmode[1] = 1;
  397. SetPlayerArmour(playerid, 300.0);
  398. SetPlayerHealth(playerid, 300.0); }
  399. else {
  400. SendClientMessage(playerid, COLOR_LIGHTBLUE, " You deactivate God Mode!");
  401. Godmode[1] = 0; }
  402. return 1;
  403. }
  404.  
  405. CMD:name(playerid, params[])
  406. {
  407. if(Name[playerid] == 1) {
  408. for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
  409. GameTextForPlayer(playerid, "~W~Nametags ~R~off", 5000, 6);
  410. Name[playerid] = 0;}
  411. else {
  412. for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
  413. GameTextForPlayer(playerid, "~W~Nametags ~R~On", 5000, 6);
  414. Name[playerid] = 1;}
  415. return 1;
  416. }
  417.  
  418. CMD:gun(playerid, params[])
  419. {
  420. new gun, ammo;
  421. if(sscanf(params, "ii", gun, ammo)) return SendClientMessage(playerid, -1, "USAGE:/gun [WeaponID (1-46)][Ammo]");
  422. if(gun > 46 || gun < 0) return SendClientMessage(playerid, COLOR_RED, "Wrong WeaponID input (1-46)!");
  423. GivePlayerWeapon(playerid, gun, ammo);
  424. return 1;
  425. }
  426.  
  427. CMD:object(playerid, params[])
  428. {
  429. new item[32], Float:Pos[4], objectid;
  430. if (sscanf(params, "s[32] ", item)) {
  431. SendClientMessage(playerid, -1, "USAGE: /object [option]");
  432. SendClientMessage(playerid, -1, "Options: create, edit, delete");
  433. return 1; }
  434. if(strcmp(item,"create",true) == 0) {
  435. if(sscanf(params, "s[32]i", item, objectid)) return SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /object create [ObjectID]");
  436. if(objectid < 761 || objectid > 3399) return SendClientMessage(playerid, COLOR_RED, "Wrong ObjectID input (761-3399)!");
  437. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  438. GetPlayerFacingAngle(playerid, Pos[3]);
  439. CreateObject(objectid, Pos[0]+2, Pos[1]+2, Pos[2], 0, 0, Pos[3], 100);
  440. }
  441. else if(strcmp(item,"edit",true) == 0)
  442. {
  443. SendClientMessage(playerid, COLOR_LIGHTBLUE, " Please select object for editing.");
  444. SelectObject(playerid);
  445. }
  446. else if(strcmp(item,"delete",true) == 0)
  447. {
  448. SendClientMessage(playerid, COLOR_LIGHTBLUE, " Please select object for deleting.");
  449. SelectObject(playerid);
  450. DelObject = 1;
  451. }
  452. return 1;
  453. }
  454.  
  455. CMD:mod(playerid, params[])
  456. {
  457. new NOS, vehicleid = GetPlayerVehicleID(playerid);
  458. if(GetPlayerState(playerid) == 2) {
  459. if(NOS == 0) {
  460. AddVehicleComponent(vehicleid, 1010);
  461. SendClientMessage(playerid, COLOR_YELLOW, " You add nitro to your vehicle!");
  462. NOS = 1; }
  463. else {
  464. RemoveVehicleComponent(1,1010);
  465. SendClientMessage(playerid, COLOR_YELLOW, " You remove nitro from your vehicle!");
  466. NOS = 0; }
  467. }
  468. return 1;
  469. }
  470.  
  471. CMD:set(playerid, params[])
  472. {
  473. new item[32], pID,
  474. Float:armour, Float:health;
  475. if(sscanf(params, "s[32] ", item))
  476. {
  477. SendClientMessage(playerid, -1, "USAGE: /set [Option]");
  478. SendClientMessage(playerid, -1, "Options: armour, health, skin, control (freezes the player)");
  479. return 1;
  480. }
  481. else if(strcmp(item, "armour", true) == 0)
  482. {
  483. if(sscanf(params, "s[32]f", item, armour)) return SendClientMessage(playerid, -1, "USAGE: /set armour [Armour]");
  484. SetPlayerArmour(playerid, armour);
  485. }
  486. else if(strcmp(item, "health", true) == 0)
  487. {
  488. if(sscanf(params, "s[32]f", item, health)) return SendClientMessage(playerid, -1, "USAGE: /set health [ID/Name][Health]");
  489. SetPlayerHealth(playerid, health);
  490. }
  491. else if(strcmp(item, "skin", true) == 0)
  492. {
  493. new skin;
  494. if(sscanf(params, "s[32]ui", item, pID, skin)) return SendClientMessage(playerid, -1, "USAGE: /set skin [ID/Name][SkinID]");
  495. if(skin < 0 || skin > 299) return SendClientMessage(playerid, COLOR_RED, "Wrong SkinID input (0-299)!");
  496. SetPlayerSkin(pID, skin);
  497. }
  498. else if(strcmp(item, "control", true) == 0)
  499. {
  500. if(sscanf(params, "s[32]u", item, pID)) return SendClientMessage(playerid, -1, "USAGE: /set control [ID/Name]");
  501. if(control[pID] == 0) {
  502. TogglePlayerControllable(pID,1);
  503. control[pID] = 1; }
  504. else {
  505. TogglePlayerControllable(pID,0);
  506. control[pID] = 0; }
  507. }
  508. return 1;
  509. }
  510.  
  511. CMD:fix(playerid, params[])
  512. {
  513. new tires, panels, doors, lights,
  514. vehicleid = GetPlayerVehicleID(playerid);
  515. SetVehicleHealth(vehicleid, 1000.0);
  516. tires = encode_tires(0, 0, 0, 0);
  517. panels = encode_panels(0, 0, 0, 0, 0, 0, 0);
  518. doors = encode_doors(0, 0, 0, 0, 0, 0);
  519. lights = encode_lights(0, 0, 0, 0);
  520. UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
  521. return 1;
  522. }
  523.  
  524. CMD:count(playerid, params[])
  525. {
  526. if(Count == 0)
  527. {
  528. if(sscanf(params, "i", CountDown)) return SendClientMessage(playerid, -1, "USAGE: /count [Time]");
  529. CountT = SetTimer("OnCountdown", 1000, true);
  530. }
  531. else return SendClientMessage(playerid, COLOR_RED, "You already started countdown!");
  532. return 1;
  533. }
  534.  
  535. CMD:cchat(playerid, params[])
  536. {
  537. SendClientMessage(playerid, -1, "");
  538. SendClientMessage(playerid, -1, "");
  539. SendClientMessage(playerid, -1, "");
  540. SendClientMessage(playerid, -1, "");
  541. SendClientMessage(playerid, -1, "");
  542. SendClientMessage(playerid, -1, "");
  543. SendClientMessage(playerid, -1, "");
  544. SendClientMessage(playerid, -1, "");
  545. SendClientMessage(playerid, -1, "");
  546. SendClientMessage(playerid, -1, "");
  547. SendClientMessage(playerid, -1, "");
  548. return 1;
  549. }
  550.  
  551. CMD:plant(playerid, params[])
  552. {
  553. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 0, 0, 0, 0, 1000, 1);
  554. new Float:X, Float:Y, Float:Z;
  555. GetPlayerPos(playerid, X, Y, Z);
  556. BombO = CreateObject(1252, X, Y, Z, 0.0, 0.0, 96.0);
  557. TArmed[playerid] = 1;
  558. GivePlayerWeapon(playerid, 40, 2);
  559. return 1;
  560. }
  561.  
  562. CMD:disarm(playerid, params[])
  563. {
  564. new pID;
  565. if(sscanf(params, "u", pID)) return SendClientMessage(playerid, -1, "USAGE: /disarm [ID/Name]");
  566. ResetPlayerWeapons(pID);
  567. SendClientMessage(playerid, COLOR_YELLOW, " You disarm that player!");
  568. return 1;
  569. }
  570.  
  571. CMD:time(playerid, params[])
  572. {
  573. new time;
  574. if(sscanf(params, "i", time)) return SendClientMessage(playerid, -1, "USAGE: /time [Hours]");
  575. SetWorldTime(time);
  576. return 1;
  577. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement