Advertisement
Guest User

Untitled

a guest
Jul 20th, 2015
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 57.33 KB | None | 0 0
  1.  
  2. //====================================================================*/
  3. #include <a_samp>
  4. #include <sscanf>
  5. #include <streamer>
  6. #include <dini>
  7. #include <zcmd>
  8. #include <foreach>
  9. #include <YSI\y_ini>
  10.  
  11.  
  12. #undef MAX_PLAYERS
  13. #define MAX_PLAYERS 50 // Here you need to set the maximum number of players able to play on your server
  14.  
  15.  
  16. #define Grey 0xC0C0C0FF
  17. #define COLOR_YELLOW2 0xF5DEB3AA
  18. #define COLOR_NICERED 0xFF0000FF
  19. #define COLOR_SUPERGREEN 0xFF01FF
  20. #define COLOR_MODRA 0x0088FFFF
  21. #define xBox DIALOG_STYLE_MSGBOX
  22. #define COLOR_HNEDA 0x993300AA
  23. #define COLOR_0000 0x0000FFAA
  24. #define DIALOG_REGISTER 1
  25. #define DIALOG_LOGIN 2
  26. #define DIALOG_SUCCESS_1 3
  27. #define DIALOG_SUCCESS_2 4
  28. #define COLOR_SYSTEM 0xEFEFF7AA
  29. #define COLOR_BLUE 0x0000FFAA
  30. #define COLOR_GREY 0xAFAFAFAA
  31. #define COLOR_RED 0xFF0000AA
  32. #define COLOR_YELLOW 0xFFFF00AA
  33. #define Vcmds ShowPlayerDialog
  34. #define COLOR_WHITE 0xFFFFFFAA
  35. #define COLOR_PURPLE 0x9900FFAA
  36. #define COL_OGREEN "{FFAF00}"
  37. #define COL_ERROR "{FF0202}"
  38. #define COL_USAGE "{DFDFDF}"
  39. #define TAG[SRC] "{FFBF00}"
  40. #define COL_EASY "{FFF1AF}"
  41. #define COL_WHITE "{FFFFFF}"
  42. #define COL_BLACK "{0E0101}"
  43. #define COL_GREY "{C3C3C3}"
  44. #define V.I.PCmds 29
  45. #define COL_GREEN "{6EF83C}"
  46. #define COL_RED "{F81414}"
  47. #define COL_YELLOW "{F3FF02}"
  48. #define COL_ORANGE "{FFA1A1}"
  49. #define COL_INDIGO "{8B008B}"
  50. #define COL_LIME "{B7FF00}"
  51. #define COL_CYAN "{00FFEE}"
  52. #define COL_LIGHTBLUE "{C9FFAB}"
  53. #define CLB "{FFAF00}"
  54. #define COL_BLUE "{0049FF}"
  55. #define COL_MAGENTA "{F300FF}"
  56. #define COL_VIOLET "{B700FF}"
  57. #define COL_PINK "{FF00EA}"
  58. #define COL_MARONE "{A90202}"
  59. #define COL_CMD "{B8FF02}"
  60. #define COL_PARAM "{3FCD02}"
  61. #define COL_SERVER "{AFE7FF}"
  62. #define COL_VALUE "{FF8E02}"
  63. #define COL_RULE "{FFDE02}"
  64. #define COL_RULE2 "{FBDF89}"
  65. #define COL_RWHITE "{FFFFFF}"
  66. #define COL_LGREEN "{C9FFAB}"
  67. #define COL_LRED "{FFA1A1}"
  68. #define COL_WHITE "{FFFFFF}"
  69. #define COL_RED "{F81414}"
  70. #define COL_LRED2 "{C77D87}"
  71. #define SERVER "{0E0101}[{AFE7FF}SERVER{0E0101}]{FFFFFF}:"
  72. #define COL_TRASH "{ACD59D}"
  73. #define COLOR_BROWN 0x993300AA
  74. #define COLOR_ORANGE 0xFF9933AA
  75. #define COLOR_CYAN 0x99FFFFAA
  76. #define COLOR_PINK 0xFF66FFAA
  77. #define COLOR_KHAKI 0x999900AA
  78. #define COLOR_LIME 0x99FF00AA
  79. #define XVip1 String1
  80. #define XVip2 String2
  81. #define XVip3 String3
  82. #define XVcmds StringF
  83. #define COLOR_BLACK 0x000000AA
  84. #define COLOR_WHITE 0xFFFFFFAA
  85. #define COLOR_GAMES 0xFFFFFFAA
  86. #define blue 0x375FFFFF
  87. #define red 0xFF0000AA
  88. #define green 0x33FF33AA
  89. #define yellow 0xFFFF00AA
  90. #define COLOR_GREY 0xAFAFAFAA
  91. #define COLOR_GREEN 0x33AA33AA
  92. #define COLOR_YELLOW 0xFFFF00AA
  93. #define COLOR_WHITE 0xFFFFFFAA
  94. #define COLOR_LIME 0x99FF00AA
  95. #define COLOR_LIGHTYELLOW 0xFAEAA9FF
  96. #define COLOR_LIGHTGREEN 0x5BC476FF
  97. #define COLOR_LIGHTORANGE 0xF7A26FFF
  98. #define PATH "/Users/%s.ini"
  99. #define COLOR_LIGHTRED 0xFF6A6AFF
  100. #define COLOR_VIP 0xDDD100FF
  101. #define MAX_FAIL_LOGINS 3
  102. new bool:IsLogged[MAX_PLAYERS];
  103. new Vip[MAX_PLAYERS];
  104. new Text3D:VIPS[MAX_PLAYERS];
  105. new Anti_heal[MAX_PLAYERS];
  106. new wep[MAX_PLAYERS];
  107. new de[MAX_PLAYERS];
  108. new deb[MAX_PLAYERS];
  109. new VipCar[MAX_PLAYERS];
  110. new tune[MAX_PLAYERS];
  111. new ob1;
  112. new ob2;
  113. new ob3;
  114. new ob4;
  115. new ob5;
  116. new ob6;
  117. new ob7;
  118. new ob8;
  119. new ob9;
  120. new ob10;
  121. new ob11;
  122. new ob12;
  123. new ob13;
  124. new ob14;
  125. new ob15;
  126. new ob16;
  127. new ob17;
  128. new ob18;
  129. new ob19;
  130. new ob20;
  131. new ob21;
  132. new ob22;
  133. new pipi;
  134. new caca;
  135. new muie;
  136. enum pInfo
  137. {
  138. pVIP,
  139. }
  140. enum PLAYERDATA
  141. {
  142. Float: E_LAST_X,
  143. Float: E_LAST_Y,
  144. Float: E_LAST_Z,
  145.  
  146. bool: E_SET,
  147. }
  148. new gPlayerData[MAX_PLAYERS][PLAYERDATA];
  149. new PlayerInfo[MAX_PLAYERS][pInfo];
  150. new String[128], Float:SpecX[MAX_PLAYERS], Float:SpecY[MAX_PLAYERS], Float:SpecZ[MAX_PLAYERS], vWorld[MAX_PLAYERS], Inter[MAX_PLAYERS];
  151. new IsSpecing[MAX_PLAYERS], Name[MAX_PLAYER_NAME], IsBeingSpeced[MAX_PLAYERS],spectatorid[MAX_PLAYERS];
  152. forward IronMan(playerid);
  153. forward DestroyMe(objectid);
  154. forward Jav(playerid);
  155. forward Float:SetPlayerToFacePos(playerid, Float:X, Float:Y);
  156. forward GetClosestPlayer(p1);
  157. forward Float:GetDistanceBetweenPlayers(p1, p2);
  158. new
  159. bool:flying[MAX_PLAYERS],
  160. Javelin[MAX_PLAYERS][2],
  161. Float:JavPos[MAX_PLAYERS][3];
  162.  
  163. new ship[MAX_PLAYERS];
  164. new o;
  165. new SpawnedVeh[MAX_PLAYERS];
  166. new Text:Textdraw0;
  167. new asked[MAX_PLAYERS];
  168. new asked1[MAX_PLAYERS];
  169. public OnPlayerConnect(playerid)
  170. {
  171. new string[200];
  172. format(string, sizeof(string), " Welcome Back %s Your Vip Level is: %d", PlayerName(playerid), Vip[playerid] );
  173. SendClientMessage(playerid ,COLOR_RED, string);
  174. tune[playerid] = 0;
  175. asked1[playerid] = 0;
  176. asked[playerid] = 0;
  177. ship[playerid] = 0;
  178. SendClientMessage(playerid,-1,"RPG.KRONDZ.COM");
  179. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  180. new INI:File = INI_Open(UserPath(playerid));
  181. INI_SetTag(File,"data");
  182. INI_WriteInt(File,"VIP",0);
  183. INI_Close(File);
  184. return 1;
  185. }
  186.  
  187.  
  188. public OnPlayerDisconnect(playerid, reason)
  189. {
  190. if(IsBeingSpeced[playerid] == 1)
  191. {
  192. foreach(Player,i)
  193. {
  194. if(spectatorid[i] == playerid)
  195. {
  196. TogglePlayerSpectating(i,false);
  197. }
  198. }
  199. }
  200. new INI:File = INI_Open(UserPath(playerid));
  201. INI_SetTag(File,"data");
  202. INI_WriteInt(File,"VIP",Vip[playerid]);
  203. INI_Close(File);
  204. if(IsPlayerConnected(playerid)) {
  205. IsLogged[playerid] = false;
  206. }
  207. return 1;
  208. }
  209. forward LoadUser_data(playerid,name[],value[]);
  210. public LoadUser_data(playerid,name[],value[])
  211. {
  212. INI_Int("VIP",PlayerInfo[playerid][pVIP]);
  213. return 1;
  214. }
  215. stock UserPath(playerid)
  216. {
  217. new string[128],playername[MAX_PLAYER_NAME];
  218. GetPlayerName(playerid,playername,sizeof(playername));
  219. format(string,sizeof(string),PATH,playername);
  220. return string;
  221. }
  222. public OnPlayerSpawn(playerid)
  223. {
  224. if(IsSpecing[playerid] == 1)
  225. {
  226. SetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);
  227. SetPlayerInterior(playerid,Inter[playerid]);
  228. SetPlayerVirtualWorld(playerid,vWorld[playerid]);
  229. IsSpecing[playerid] = 0;
  230. IsBeingSpeced[spectatorid[playerid]] = 0;
  231. }
  232. if(Vip[playerid] >= 1) {
  233. VIPS[playerid] = Create3DTextLabel(" V.I.P Member", COLOR_VIP, 0.0, 0.0, 0.0, 50.0, 0, 0);
  234. Attach3DTextLabelToPlayer(VIPS[playerid], playerid, 0.0, 0.0, 0.0);
  235. SetPlayerArmour(playerid,100);
  236. }
  237. return 1;
  238. }
  239.  
  240.  
  241. public OnPlayerDeath(playerid, killerid, reason)
  242. {
  243. if(IsBeingSpeced[playerid] == 1)
  244. {
  245. foreach(Player,i)
  246. {
  247. if(spectatorid[i] == playerid)
  248. {
  249. TogglePlayerSpectating(i,false);
  250. }
  251. }
  252. }
  253.  
  254. Anti_heal[playerid] = 0;
  255. deb[playerid] = 0;
  256. if(Vip[playerid] == 0) {
  257. VipCar[playerid] = 0;
  258. SendDeathMessage(killerid,playerid,reason);
  259. SendClientMessage(killerid, COLOR_GREEN, "+1 Score & +$ 500");
  260. SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
  261. GivePlayerMoney(killerid,GetPlayerMoney(killerid)+500);
  262. GameTextForPlayer(killerid,"~r~+$500~n~~b~+1~w~Score",3000,4);
  263. }
  264. if(Vip[playerid] == 1) {
  265. VipCar[playerid] = 0;
  266. SendDeathMessage(killerid,playerid,reason);
  267. SendClientMessage(killerid, COLOR_GAMES, "You are (Level 1 VIP) , you win +1score and +700$! ");
  268. SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
  269. GivePlayerMoney(killerid,GetPlayerMoney(killerid)+700);
  270. GameTextForPlayer(killerid,"~r~+$700~n~~b~+1~w~Score",3000,4);
  271. }
  272. if(Vip[playerid] == 2) {
  273. VipCar[playerid] = 0;
  274. SendDeathMessage(killerid,playerid,reason);
  275. SendClientMessage(killerid, COLOR_YELLOW2, "You are (Level 2 VIP , you win +1score and +900$! ");
  276. SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
  277. GivePlayerMoney(killerid,GetPlayerMoney(killerid)+900);
  278. GameTextForPlayer(killerid,"~r~+$900~n~~b~+1~w~Score",3000,4);
  279. }
  280. if(Vip[playerid] == 3) {
  281. VipCar[playerid] = 0;
  282. SendDeathMessage(killerid,playerid,reason);
  283. SendClientMessage(killerid, COLOR_NICERED, "You are (Level 3 VIP) , you win +1score and +1000$ ! ");
  284. SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
  285. GivePlayerMoney(killerid,GetPlayerMoney(killerid)+1000);
  286. GameTextForPlayer(killerid,"~r~+$1000~n~~b~+1~w~Score",3000,4);
  287. }
  288. return 1;
  289. }
  290.  
  291.  
  292. public OnVehicleSpawn(vehicleid)
  293. {
  294. return 1;
  295. }
  296.  
  297.  
  298. public OnVehicleDeath(vehicleid, killerid)
  299. {
  300. return 1;
  301. }
  302.  
  303. public OnGameModeInit()
  304. {
  305. pipi = CreateObject(19332, 364.71, 2537.19, 15.68, 0.00, 0.00, 0.00);
  306. caca = CreateObject(19333, 154.77, -1858.23, 2.78, 0.00, 0.00, 0.00);
  307. muie = CreateObject(19334, -1748.00, -154.60, 2.60, 0.00, 0.00, 0.00);
  308.  
  309. CreateDynamicObject(18751,4802.12,-4921.35,4.16,0.00,0.00,0.00);
  310. CreateDynamicObject(18751,4746.04,-4921.95,4.16,0.00,0.00,0.00);
  311. CreateDynamicObject(18751,4746.04,-4875.93,3.81,0.00,0.00,0.00);
  312. CreateDynamicObject(18751,4800.19,-4872.35,3.81,0.00,0.00,0.00);
  313. CreateDynamicObject(18750,4702.36,-4904.54,48.72,89.49,0.00,91.75);
  314. CreateDynamicObject(710,4722.75,-4864.69,22.20,0.00,0.00,0.00);
  315. CreateDynamicObject(710,4827.72,-4851.19,22.22,0.00,0.00,0.00);
  316. CreateDynamicObject(710,4829.30,-4950.55,21.85,0.00,0.00,0.00);
  317. CreateDynamicObject(710,4721.45,-4951.63,21.57,0.00,0.00,0.00);
  318. CreateDynamicObject(710,4709.59,-4931.41,20.32,0.00,0.00,0.00);
  319. CreateDynamicObject(710,4713.84,-4904.80,21.07,0.00,0.00,0.00);
  320. CreateDynamicObject(710,4753.89,-4944.07,23.03,0.00,0.00,0.00);
  321. CreateDynamicObject(710,4773.88,-4955.72,22.53,0.00,0.00,0.00);
  322. CreateDynamicObject(710,4791.16,-4944.48,22.28,0.00,0.00,0.00);
  323. CreateDynamicObject(710,4808.41,-4954.20,20.53,0.00,0.00,0.00);
  324. CreateDynamicObject(710,4822.39,-4930.03,23.03,0.00,0.00,0.00);
  325. CreateDynamicObject(710,4816.12,-4915.56,25.03,0.00,0.00,0.00);
  326. CreateDynamicObject(710,4804.01,-4896.12,22.78,0.00,0.00,0.00);
  327. CreateDynamicObject(710,4786.81,-4911.10,29.78,0.00,0.00,0.00);
  328. CreateDynamicObject(710,4774.98,-4922.33,21.28,0.00,0.00,0.00);
  329. CreateDynamicObject(710,4768.61,-4891.08,20.78,0.00,0.00,0.00);
  330. CreateDynamicObject(710,4747.54,-4873.75,20.53,0.00,0.00,0.00);
  331. CreateDynamicObject(710,4754.10,-4855.72,20.03,0.00,0.00,0.00);
  332. CreateDynamicObject(710,4775.39,-4852.38,20.03,0.00,0.00,0.00);
  333. CreateDynamicObject(710,4795.67,-4865.55,23.53,0.00,0.00,0.00);
  334. CreateDynamicObject(710,4819.15,-4878.53,22.78,0.00,0.00,0.00);
  335. CreateDynamicObject(710,4804.49,-4843.81,20.28,0.00,0.00,0.00);
  336. CreateDynamicObject(710,4739.19,-4906.89,22.03,0.00,0.00,0.00);
  337. CreateDynamicObject(710,4732.04,-4849.78,20.78,0.00,0.00,0.00);
  338. CreateDynamicObject(14560,4785.57,-4901.21,13.14,0.24,1.24,0.49);
  339. CreateDynamicObject(18751,4784.10,-4896.81,2.81,0.00,0.00,0.00);
  340. CreateDynamicObject(18751,4787.82,-4891.87,2.81,0.00,0.00,0.00);
  341. CreateDynamicObject(18751,4787.84,-4903.91,2.44,0.00,0.00,0.00);
  342. CreateDynamicObject(710,4786.62,-4891.45,29.78,0.00,0.00,0.00);
  343. CreateDynamicObject(4874,4803.51,-4790.33,5.26,0.00,0.00,274.00);
  344. CreateDynamicObject(710,4845.21,-4907.10,17.35,0.00,0.00,0.00);
  345. CreateDynamicObject(710,4842.04,-4943.09,19.85,0.00,0.00,0.00);
  346. CreateDynamicObject(710,4826.54,-4969.58,17.85,0.00,0.00,0.00);
  347. CreateDynamicObject(710,4788.97,-4962.02,19.35,0.00,0.00,0.00);
  348. CreateDynamicObject(710,4743.65,-4964.55,18.60,0.00,0.00,0.00);
  349. CreateDynamicObject(710,4838.56,-4872.83,18.60,0.00,0.00,0.00);
  350. CreateDynamicObject(710,4838.14,-4834.81,17.10,0.00,0.00,0.00);
  351. CreateDynamicObject(710,4802.21,-4826.24,15.85,0.00,0.00,0.00);
  352. CreateDynamicObject(710,4773.89,-4833.88,18.35,0.00,0.00,0.00);
  353. CreateDynamicObject(710,4737.66,-4829.94,15.60,0.00,0.00,0.00);
  354. CreateDynamicObject(710,4715.45,-4838.33,18.35,0.00,0.00,0.00);
  355. CreateDynamicObject(710,4705.28,-4872.88,17.85,0.00,0.00,0.00);
  356. CreateDynamicObject(1646,4837.52,-4857.08,5.28,19.75,0.00,94.75);
  357. CreateDynamicObject(1646,4837.37,-4855.62,5.26,19.74,0.00,94.74);
  358. CreateDynamicObject(1646,4837.41,-4854.17,5.31,19.74,0.00,94.74);
  359. CreateDynamicObject(1646,4837.43,-4852.56,5.38,19.74,0.00,94.74);
  360. CreateDynamicObject(1646,4837.53,-4851.11,5.48,20.21,356.53,94.94);
  361. CreateDynamicObject(1255,4809.30,-4885.92,10.08,0.00,0.00,0.00);
  362. CreateDynamicObject(1255,4809.12,-4884.04,10.01,0.00,0.00,0.00);
  363. CreateDynamicObject(1255,4809.14,-4882.06,9.96,0.00,0.00,0.00);
  364. CreateDynamicObject(1255,4809.11,-4880.41,9.91,0.00,0.00,0.00);
  365. CreateDynamicObject(3580,4809.47,-4931.61,13.76,0.00,0.00,42.00);
  366. CreateDynamicObject(18751,4746.04,-4875.93,4.06,0.00,0.00,0.00);
  367. CreateDynamicObject(3580,4746.13,-4924.64,13.88,0.00,0.00,302.00);
  368. CreateDynamicObject(3580,4729.37,-4858.95,10.66,0.00,0.00,249.99);
  369. CreateDynamicObject(1281,4780.41,-4887.51,9.33,349.75,0.25,0.04);
  370. CreateDynamicObject(1281,4785.40,-4886.42,9.20,349.74,0.25,0.04);
  371. CreateDynamicObject(1281,4792.80,-4893.72,9.55,359.49,0.74,0.00);
  372. CreateDynamicObject(1281,4793.53,-4899.43,9.50,359.49,0.74,0.00);
  373. CreateDynamicObject(1281,4793.45,-4905.58,9.43,359.49,0.74,0.00);
  374. CreateDynamicObject(1281,4785.20,-4915.99,9.25,359.49,0.74,0.00);
  375. CreateDynamicObject(1281,4778.56,-4911.86,9.13,1.98,5.00,273.82);
  376. CreateDynamicObject(1281,4778.03,-4907.11,9.38,7.21,5.03,273.36);
  377. CreateDynamicObject(1281,4777.69,-4900.51,9.28,7.21,5.03,273.36);
  378. CreateDynamicObject(1281,4778.50,-4893.69,9.20,1.98,4.99,273.82);
  379. CreateDynamicObject(1432,4795.00,-4913.63,9.16,354.00,0.00,0.00);
  380. CreateDynamicObject(1432,4791.74,-4909.15,8.66,3.99,2.00,354.11);
  381. CreateDynamicObject(1432,4791.61,-4890.28,8.91,356.24,0.00,0.00);
  382. CreateDynamicObject(14565,4785.64,-4901.48,10.66,0.00,5.00,0.25);
  383. CreateDynamicObject(946,4819.88,-4880.03,9.86,0.00,0.00,197.74);
  384. CreateDynamicObject(2114,4821.57,-4882.58,8.08,0.00,0.00,0.00);
  385. CreateDynamicObject(1598,4825.22,-4887.57,7.68,0.00,0.00,0.00);
  386. CreateDynamicObject(1598,4829.93,-4882.34,7.26,0.00,0.00,0.00);
  387. CreateDynamicObject(1598,4825.56,-4881.07,7.61,0.00,0.00,0.00);
  388. CreateDynamicObject(1598,4829.38,-4875.27,6.73,0.00,0.00,0.00);
  389. CreateDynamicObject(1598,4829.38,-4875.27,6.73,0.00,0.00,0.00);
  390. CreateDynamicObject(1598,4826.97,-4864.50,7.03,0.00,0.00,0.00);
  391. CreateDynamicObject(1598,4825.73,-4871.18,6.71,0.00,0.00,0.00);
  392. CreateDynamicObject(1598,4831.18,-4868.26,6.38,0.00,0.00,0.00);
  393. CreateDynamicObject(1598,4823.17,-4877.67,7.36,0.00,0.00,0.00);
  394. CreateDynamicObject(1461,4809.54,-4826.20,3.21,0.00,0.00,268.25);
  395. CreateDynamicObject(1461,4809.56,-4823.18,2.61,0.00,0.00,268.24);
  396. CreateDynamicObject(1609,4838.91,-4842.81,5.41,338.75,0.00,260.00);
  397. CreateDynamicObject(1610,4837.83,-4859.91,5.03,0.00,0.00,0.00);
  398. CreateDynamicObject(1637,4742.40,-4890.95,10.74,0.00,0.00,0.00);
  399. CreateDynamicObject(1637,4837.01,-4893.87,6.92,0.00,0.00,0.00);
  400. CreateDynamicObject(2406,4838.87,-4871.88,5.93,0.00,0.00,158.50);
  401. CreateDynamicObject(6295,4752.43,-5068.51,26.16,0.00,0.00,0.00);
  402. CreateDynamicObject(11495,4753.54,-4978.19,2.40,0.00,0.00,0.00);
  403. CreateDynamicObject(11495,4753.55,-4999.38,2.40,0.00,0.00,0.00);
  404. CreateDynamicObject(11495,4753.47,-5021.11,2.40,0.00,0.00,0.00);
  405. CreateDynamicObject(18751,4751.38,-5061.14,-3.02,0.00,0.00,0.00);
  406. CreateDynamicObject(11495,4753.47,-5043.03,2.40,0.00,0.00,0.00);
  407. CreateDynamicObject(9958,4641.37,-4897.12,6.90,0.00,0.00,1.00);
  408. CreateDynamicObject(710,4726.46,-5085.42,16.07,0.00,0.00,0.00);
  409. CreateDynamicObject(710,4728.82,-5039.80,15.60,0.00,0.00,0.00);
  410. CreateDynamicObject(710,4780.74,-5096.28,15.00,0.00,0.00,0.00);
  411. CreateDynamicObject(710,4776.91,-5046.60,14.65,0.00,0.00,0.00);
  412. CreateDynamicObject(710,4707.08,-4968.39,17.85,0.00,0.00,0.00);
  413. CreateDynamicObject(1608,4754.58,-5102.19,-0.72,0.00,0.00,64.00);
  414. CreateDynamicObject(1608,4741.65,-5104.36,-0.72,0.00,0.00,315.99);
  415. CreateDynamicObject(1607,4796.21,-5056.94,0.00,0.00,0.00,0.00);
  416. CreateDynamicObject(1637,4779.46,-5088.95,1.39,0.00,0.00,92.00);
  417. CreateDynamicObject(9237,4766.22,-4844.98,12.69,0.00,0.00,110.00);
  418. CreateDynamicObject(902,4847.81,-4879.33,1.80,0.00,22.25,0.00);
  419. CreateDynamicObject(1481,4745.98,-4874.70,10.73,0.00,0.00,355.00);
  420. CreateDynamicObject(1481,4746.93,-4875.15,10.73,0.00,0.00,314.99);
  421. CreateDynamicObject(1481,4744.98,-4874.86,10.73,0.00,0.00,22.99);
  422. CreateDynamicObject(11495,4744.94,-4819.69,1.62,0.00,0.00,12.00);
  423. CreateDynamicObject(11495,4740.79,-4800.04,7.37,32.25,0.00,11.99);
  424. CreateDynamicObject(11495,4739.54,-4794.23,11.15,34.74,0.00,11.99);
  425.  
  426. ob1 = CreateObject(1006,0,0,-1000,0,0,0,100);
  427. ob2 = CreateObject(1161,0,0,-1000,0,0,0,100);
  428. ob3 = CreateObject(1161,0,0,-1000,0,0,0,100);
  429. ob4 = CreateObject(1059,0,0,-1000,0,0,0,100);
  430. ob5 = CreateObject(1146,0,0,-1000,0,0,0,100);
  431. ob6 = CreateObject(1006,0,0,-1000,0,0,0,100);
  432. ob7 = CreateObject(1146,0,0,-1000,0,0,0,100);
  433. ob8 = CreateObject(1006,0,0,-1000,0,0,0,100);
  434. ob9 = CreateObject(1006,0,0,-1000,0,0,0,100);
  435. ob10 = CreateObject(1006,0,0,-1000,0,0,0,100);
  436. ob11 = CreateObject(1027,0,0,-1000,0,0,0,100);
  437. ob12 = CreateObject(1027,0,0,-1000,0,0,0,100);
  438. ob13 = CreateObject(1146,0,0,-1000,0,0,0,100);
  439. ob14 = CreateObject(1003,0,0,-1000,0,0,0,100);
  440. ob15 = CreateObject(1018,0,0,-1000,0,0,0,100);
  441. ob16 = CreateObject(1149,0,0,-1000,0,0,0,100);
  442. ob17 = CreateObject(1018,0,0,-1000,0,0,0,100);
  443. ob18 = CreateObject(1006,0,0,-1000,0,0,0,100);
  444. ob19 = CreateObject(1166,0,0,-1000,0,0,0,100);
  445. ob20 = CreateObject(1006,0,0,-1000,0,0,0,100);
  446. ob21 = CreateObject(1026,0,0,-1000,0,0,0,100);
  447. ob22 = CreateObject(1027,0,0,-1000,0,0,0,100);
  448.  
  449. Textdraw0 = TextDrawCreate(4.000000, 160.000000, "Would u like to have Pirate Ship?? ~n~~n~~n~/Yes if u want to ~n~/No if you dont want to!~n~/Hidebox To Hide This Box");
  450. TextDrawBackgroundColor(Textdraw0, 255);
  451. TextDrawFont(Textdraw0, 1);
  452. TextDrawLetterSize(Textdraw0, 0.230000, 1.000000);
  453. TextDrawColor(Textdraw0, -1);
  454. TextDrawSetOutline(Textdraw0, 0);
  455. TextDrawSetProportional(Textdraw0, 1);
  456. TextDrawSetShadow(Textdraw0, 1);
  457. TextDrawUseBox(Textdraw0, 1);
  458. TextDrawBoxColor(Textdraw0, 0x00000033);
  459. TextDrawTextSize(Textdraw0, 137.000000, -1.000000);
  460. o = CreateObject(8493,0,0,-1000,0,0,0,100);
  461. }
  462.  
  463. public OnPlayerExitVehicle(playerid, vehicleid)//OnExitingTheVehicle :p
  464. {
  465. if (tune[playerid] == 1)
  466. {
  467. o = CreateObject(1006,0,0,-1000,0,0,0,100);
  468. ob2 = CreateObject(1161,0,0,-1000,0,0,0,100);
  469. ob3 = CreateObject(1161,0,0,-1000,0,0,0,100);
  470. ob4 = CreateObject(1059,0,0,-1000,0,0,0,100);
  471. ob5 = CreateObject(1146,0,0,-1000,0,0,0,100);
  472. ob6 = CreateObject(1006,0,0,-1000,0,0,0,100);
  473. ob7 = CreateObject(1146,0,0,-1000,0,0,0,100);
  474. ob8 = CreateObject(1006,0,0,-1000,0,0,0,100);
  475. ob9 = CreateObject(1006,0,0,-1000,0,0,0,100);
  476. ob10 = CreateObject(1006,0,0,-1000,0,0,0,100);
  477. ob11 = CreateObject(1027,0,0,-1000,0,0,0,100);
  478. ob12 = CreateObject(1027,0,0,-1000,0,0,0,100);
  479. ob13 = CreateObject(1146,0,0,-1000,0,0,0,100);
  480. ob14 = CreateObject(1003,0,0,-1000,0,0,0,100);
  481. ob15 = CreateObject(1018,0,0,-1000,0,0,0,100);
  482. ob16 = CreateObject(1149,0,0,-1000,0,0,0,100);
  483. ob17 = CreateObject(1018,0,0,-1000,0,0,0,100);
  484. ob18 = CreateObject(1006,0,0,-1000,0,0,0,100);
  485. ob19 = CreateObject(1166,0,0,-1000,0,0,0,100);
  486. ob20 = CreateObject(1006,0,0,-1000,0,0,0,100);
  487. ob21 = CreateObject(1026,0,0,-1000,0,0,0,100);
  488. ob22 = CreateObject(1027,0,0,-1000,0,0,0,100);
  489. tune[playerid] = 0;
  490. }
  491. TextDrawHideForPlayer(playerid,Textdraw0);
  492. if (ship[playerid] == 1)
  493. {
  494. DestroyObject(o);
  495. ship[playerid] = 0;
  496. }
  497. }
  498. stock SpawnVeh(vehicleid, playerid)
  499. {
  500. if(SpawnedVeh[playerid] != 0)
  501. {
  502. DestroyVehicle(SpawnedVeh[playerid]);
  503. }
  504. new Float:X, Float:Y, Float:Z, Float:Angle;
  505. GetPlayerPos(playerid, Float:X, Float:Y, Float:Z);
  506. GetPlayerFacingAngle(playerid, Float:Angle);
  507. SpawnedVeh[playerid] = CreateVehicle(vehicleid, X, Y, Z + 2.0, Angle + 90.0, -1, -1, 600);
  508. SetVehicleVirtualWorld(SpawnedVeh[playerid], GetPlayerVirtualWorld(playerid));
  509. LinkVehicleToInterior(SpawnedVeh[playerid], GetPlayerInterior(playerid));
  510. PutPlayerInVehicle(playerid, SpawnedVeh[playerid], 0);
  511. }
  512. public OnPlayerStateChange(playerid, newstate, oldstate)
  513. {
  514. if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)// If the player's state changes to a vehicle state we'll have to spec the vehicle.
  515. {
  516. if(IsBeingSpeced[playerid] == 1)//If the player being spectated, enters a vehicle, then let the spectator spectate the vehicle.
  517. {
  518. foreach(Player,i)
  519. {
  520. if(spectatorid[i] == playerid)
  521. {
  522. PlayerSpectateVehicle(i, GetPlayerVehicleID(playerid));// Letting the spectator, spectate the vehicle of the player being spectated (I hope you understand this xD)
  523. }
  524. }
  525. }
  526. }
  527. if(newstate == PLAYER_STATE_ONFOOT)
  528. {
  529. if(IsBeingSpeced[playerid] == 1)//If the player being spectated, exists a vehicle, then let the spectator spectate the player.
  530. {
  531. foreach(Player,i)
  532. {
  533. if(spectatorid[i] == playerid)
  534. {
  535. PlayerSpectatePlayer(i, playerid);// Letting the spectator, spectate the player who exited the vehicle.
  536. }
  537. }
  538. }
  539. }
  540. return 1;
  541. }
  542.  
  543. public OnPlayerEnterCheckpoint(playerid)
  544. {
  545. return 1;
  546. }
  547.  
  548.  
  549. public OnPlayerLeaveCheckpoint(playerid)
  550. {
  551. return 1;
  552. }
  553.  
  554.  
  555. public OnPlayerEnterRaceCheckpoint(playerid)
  556. {
  557. return 1;
  558. }
  559.  
  560.  
  561. public OnPlayerLeaveRaceCheckpoint(playerid)
  562. {
  563. return 1;
  564. }
  565.  
  566.  
  567. public OnRconCommand(cmd[])
  568. {
  569. return 1;
  570. }
  571.  
  572.  
  573. public OnPlayerRequestSpawn(playerid)
  574. {
  575. return 1;
  576. }
  577.  
  578. public OnObjectMoved(objectid)
  579. {
  580. for(new playerid = 0; playerid < MAX_PLAYERS; ++playerid)
  581. {
  582. if(objectid == Javelin[playerid][0])
  583. {
  584. if(Javelin[playerid][1] == 1)
  585. {
  586. MoveObject(Javelin[playerid][0], JavPos[playerid][0], JavPos[playerid][1], JavPos[playerid][2], 50.0);
  587. Javelin[playerid][1] = 2;
  588. goto skip;
  589. }
  590. if(Javelin[playerid][1] == 2)
  591. {
  592. DestroyObject(Javelin[playerid][0]);
  593. CreateExplosion(JavPos[playerid][0], JavPos[playerid][1], JavPos[playerid][2], 7, 15.0);
  594. CreateExplosion(JavPos[playerid][0], JavPos[playerid][1], JavPos[playerid][2] + 5.0, 7, 15.0);
  595. CreateExplosion(JavPos[playerid][0] + 7.5, JavPos[playerid][1], JavPos[playerid][2], 7, 15.0);
  596. CreateExplosion(JavPos[playerid][0] - 7.5, JavPos[playerid][1], JavPos[playerid][2], 7, 15.0);
  597. CreateExplosion(JavPos[playerid][0], JavPos[playerid][1] + 7.5, JavPos[playerid][2], 7, 15.0);
  598. CreateExplosion(JavPos[playerid][0], JavPos[playerid][1] - 7.5, JavPos[playerid][2], 7, 15.0);
  599. Javelin[playerid][1] = 0;
  600. JavPos[playerid][0] = 0.0;
  601. JavPos[playerid][1] = 0.0;
  602. JavPos[playerid][2] = 0.0;
  603. }
  604. }
  605. skip:
  606. }
  607. return 0;
  608. }
  609. public Float:SetPlayerToFacePos(playerid, Float:X, Float:Y)
  610. {
  611. new
  612. Float:pX,
  613. Float:pY,
  614. Float:pZ,
  615. Float:ang;
  616.  
  617. if(!IsPlayerConnected(playerid)) return 0.0;
  618.  
  619. GetPlayerPos(playerid, pX, pY, pZ);
  620.  
  621. if( Y > pY ) ang = (-acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
  622. else if( Y < pY && X < pX ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 450.0);
  623. else if( Y < pY ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
  624.  
  625. if(X > pX) ang = (floatabs(floatabs(ang) + 180.0));
  626. else ang = (floatabs(ang) - 180.0);
  627.  
  628. ang += 180.0;
  629.  
  630. SetPlayerFacingAngle(playerid, ang);
  631.  
  632. return ang;
  633. }
  634.  
  635. stock IsPlayerFacingPlayer(playerid, targetid, Float:dOffset)
  636. {
  637. new
  638. Float:pX,
  639. Float:pY,
  640. Float:pZ,
  641. Float:pA,
  642. Float:X,
  643. Float:Y,
  644. Float:Z,
  645. Float:ang;
  646.  
  647. if(!IsPlayerConnected(playerid) || !IsPlayerConnected(targetid)) return 0;
  648.  
  649. GetPlayerPos(targetid, pX, pY, pZ);
  650. GetPlayerPos(playerid, X, Y, Z);
  651. GetPlayerFacingAngle(playerid, pA);
  652.  
  653. if( Y > pY ) ang = (-acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
  654. else if( Y < pY && X < pX ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 450.0);
  655. else if( Y < pY ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
  656.  
  657. return AngleInRangeOfAngle(-ang, pA, dOffset);
  658. }
  659.  
  660. stock AngleInRangeOfAngle(Float:a1, Float:a2, Float:range)
  661. {
  662. a1 -= a2;
  663. if((a1 < range) && (a1 > -range)) return true;
  664.  
  665. return false;
  666. }
  667.  
  668. public GetClosestPlayer(p1)
  669. {
  670. new
  671. x,
  672. Float:dis,
  673. Float:dis2,
  674. player;
  675.  
  676. player = -1;
  677. dis = 99999.99;
  678.  
  679. for (x=0;x<MAX_PLAYERS;x++)
  680. if(IsPlayerConnected(x))
  681. if(x != p1)
  682. {
  683. dis2 = GetDistanceBetweenPlayers(x,p1);
  684. if(dis2 < dis && dis2 != -1.00)
  685. {
  686. dis = dis2;
  687. player = x;
  688. }
  689. }
  690.  
  691. return player;
  692. }
  693. public Float:GetDistanceBetweenPlayers(p1, p2)
  694. {
  695. new
  696. Float:x1,
  697. Float:y1,
  698. Float:z1,
  699. Float:x2,
  700. Float:y2,
  701. Float:z2;
  702.  
  703. if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2))
  704. return -1.00;
  705.  
  706. GetPlayerPos(p1,x1,y1,z1);
  707. GetPlayerPos(p2,x2,y2,z2);
  708.  
  709. return floatsqroot(
  710. floatpower(floatabs(floatsub(x2,x1)), 2)
  711. + floatpower(floatabs(floatsub(y2,y1)), 2)
  712. + floatpower(floatabs(floatsub(z2,z1)), 2));
  713. }
  714.  
  715.  
  716. public OnPlayerObjectMoved(playerid, objectid)
  717. {
  718. return 1;
  719. }
  720.  
  721. public OnVehicleMod(playerid, vehicleid, componentid)
  722. {
  723. return 1;
  724. }
  725.  
  726.  
  727. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  728. {
  729. return 1;
  730. }
  731.  
  732.  
  733. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  734. {
  735. return 1;
  736. }
  737.  
  738.  
  739. public OnPlayerSelectedMenuRow(playerid, row)
  740. {
  741. return 1;
  742. }
  743.  
  744.  
  745. public OnPlayerExitedMenu(playerid)
  746. {
  747. return 1;
  748. }
  749.  
  750.  
  751. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)//This is called when a player's interior is changed.
  752. {
  753. if(IsBeingSpeced[playerid] == 1)//If the player being spectated, changes an interior, then update the interior and virtualword for the spectator.
  754. {
  755. foreach(Player,i)
  756. {
  757. if(spectatorid[i] == playerid)
  758. {
  759. SetPlayerInterior(i,GetPlayerInterior(playerid));
  760. SetPlayerVirtualWorld(i,GetPlayerVirtualWorld(playerid));
  761. }
  762. }
  763. }
  764. return 1;
  765. }
  766.  
  767.  
  768. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  769. {
  770. return 1;
  771. }
  772.  
  773.  
  774. public OnRconLoginAttempt(ip[], password[], success)
  775. {
  776. return 1;
  777. }
  778.  
  779.  
  780.  
  781. public OnPlayerStreamIn(playerid, forplayerid)
  782. {
  783. return 1;
  784. }
  785.  
  786.  
  787. public OnPlayerStreamOut(playerid, forplayerid)
  788. {
  789. return 1;
  790. }
  791.  
  792.  
  793. public OnVehicleStreamIn(vehicleid, forplayerid)
  794. {
  795. return 1;
  796. }
  797.  
  798.  
  799. public OnVehicleStreamOut(vehicleid, forplayerid)
  800. {
  801. return 1;
  802. }
  803.  
  804.  
  805.  
  806. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  807. {
  808. return 1;
  809. }
  810. CMD:vips(playerid, params[])
  811. {
  812. #pragma unused params
  813. new
  814. count = 0,
  815. string[800];
  816. for(new i = 0; i < MAX_PLAYERS; i++)
  817. {
  818. if (IsPlayerConnected(i))
  819. {
  820. if (Vip[playerid] >= 1)
  821. {
  822. format(string, 500, "%s %s [ID:%i] | VIP Level: %d\n", string, PlayerName(i), i, Vip[playerid]);
  823. count++;
  824. }
  825. }
  826. }
  827. if (count == 0) ShowPlayerDialog(playerid, 800, DIALOG_STYLE_MSGBOX, "{F81414}Online V.I.Ps", "{00FFEE}No V.I.Ps Online", "Close", "");
  828. else ShowPlayerDialog(playerid, 800, DIALOG_STYLE_MSGBOX, "{F81414}Online V.I.Ps", string, "Close", "");
  829. return 1;
  830. }
  831. CMD:vdick( playerid, params[] )
  832. {
  833. if (Vip[playerid] >= 2)
  834. {
  835. SetPlayerAttachedObject(playerid, 1, 19086, 8, -0.049768, -0.014062, -0.108385, 87.458297, 263.478149, 184.123764, 0.622413, 1.041609, 1.012785 ); // ChainsawDildo1 - lolatdick
  836. SendClientMessage(playerid, -1,"Dick Attached ");
  837. xVip(playerid,"VDICK");
  838. }
  839. return 1;
  840. }
  841. CMD:vgod( playerid, params[] )
  842. {
  843. if (Vip[playerid] >= 2)
  844. {
  845. SetPlayerHealth(playerid,100000);
  846. SendClientMessage(playerid, -1,"God Enabled");
  847. xVip(playerid,"VGOD");
  848. }
  849. return 1;
  850. }
  851. CMD:vjetpack( playerid, params[] )
  852. {
  853. if (Vip[playerid] >= 2)
  854. {
  855. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
  856. xVip(playerid,"VJETPACK");
  857. }
  858. return 1;
  859. }
  860. CMD:vspec(playerid, params[])
  861. {
  862. if (Vip[playerid] >= 2)
  863. {
  864. new id;
  865. if(!IsPlayerAdmin(playerid))return 0;
  866. if(sscanf(params,"u", id))return SendClientMessage(playerid, Grey, "Usage: /spec [id]");
  867. if(id == playerid)return SendClientMessage(playerid,Grey,"You cannot spec yourself.");
  868. if(id == INVALID_PLAYER_ID)return SendClientMessage(playerid, Grey, "Player not found!");
  869. if(IsSpecing[playerid] == 1)return SendClientMessage(playerid,Grey,"You are already specing someone.");
  870. GetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);
  871. Inter[playerid] = GetPlayerInterior(playerid);
  872. vWorld[playerid] = GetPlayerVirtualWorld(playerid);
  873. TogglePlayerSpectating(playerid, true);
  874. xVip(playerid,"VSPEC");
  875. if(IsPlayerInAnyVehicle(id))
  876. {
  877. if(GetPlayerInterior(id) > 0)
  878. {
  879. SetPlayerInterior(playerid,GetPlayerInterior(id));
  880. }
  881. if(GetPlayerVirtualWorld(id) > 0)
  882. {
  883. SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
  884. }
  885. PlayerSpectateVehicle(playerid,GetPlayerVehicleID(id));
  886. }
  887. else
  888. {
  889. if(GetPlayerInterior(id) > 0)
  890. {
  891. SetPlayerInterior(playerid,GetPlayerInterior(id));
  892. }
  893. if(GetPlayerVirtualWorld(id) > 0)
  894. {
  895. SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
  896. }
  897. PlayerSpectatePlayer(playerid,id);
  898. }
  899. GetPlayerName(id, Name, sizeof(Name));
  900. format(String, sizeof(String),"You have started to spectate %s.",Name);
  901. SendClientMessage(playerid,0x0080C0FF,String);
  902. IsSpecing[playerid] = 1;
  903. IsBeingSpeced[id] = 1;
  904. spectatorid[playerid] = id;
  905. }
  906. return 1;
  907. }
  908. CMD:ballooncmds(playerid, params[])
  909. {
  910. #define DIALOG_B 2
  911. if (Vip[playerid] >= 1)
  912. {
  913. ShowPlayerDialog(playerid, DIALOG_B, DIALOG_STYLE_MSGBOX, "Balloon Commands", "/rballoon red balloon\n/bballon blue balloon\n/gballon grey balloon\n/rup - Red balloon Up, /rdown - Red Balloon Down\n/bup - Blue balloon Up, /bdown - Blue Balloon Down\n/gup - Grey balloon Up, /gdown - Grey Balloon Down", "Close", "");
  914. }
  915. return 1;
  916. }
  917. CMD:rballoon(playerid, params[])
  918. {
  919. if (Vip[playerid] >= 1)
  920. {
  921. SetPlayerPos(playerid,382.0658, 2537.5269, 15.6774);
  922. SendClientMessage(playerid, 0xDEEE20FF, "Welcome to Red Balloon");
  923. xVip(playerid,"RBALLOON");
  924. }
  925. return 1;
  926. }
  927. CMD:bballoon(playerid, params[])
  928. {
  929. if (Vip[playerid] >= 1)
  930. {
  931. SetPlayerPos(playerid,153.8562, -1879.2620, 2.7823);
  932. SendClientMessage(playerid, 0xDEEE20FF, "Welcome to Blue Balloon");
  933. xVip(playerid,"BBALLOON");
  934. }
  935. return 1;
  936. }
  937. CMD:gballoon(playerid, params[])
  938. {
  939. if (Vip[playerid] >= 1)
  940. {
  941. SetPlayerPos(playerid,-1738.4253, -137.0162, 2.6011);
  942. SendClientMessage(playerid, 0xDEEE20FF, "Welcome to Grey Balloon");
  943. xVip(playerid,"GBALLOON");
  944. }
  945. return 1;
  946. }
  947. CMD:rup(playerid, params[])
  948. {
  949. if (Vip[playerid] >= 1)
  950. {
  951. MoveObject(pipi, 237.11, 2547.02, 354.68, 3);
  952. SendClientMessage(playerid, 0xDEEE20FF, "Going!");
  953. xVip(playerid,"RUP");
  954. }
  955. return 1;
  956. }
  957. CMD:bup(playerid, params[])
  958. {
  959. if (Vip[playerid] >= 1)
  960. {
  961. MoveObject(caca, 455.3196, -1870.2194, 824.6305, 3);
  962. SendClientMessage(playerid, 0xDEEE20FF, "Going!");
  963. xVip(playerid,"BUP");
  964. }
  965. return 1;
  966. }
  967. CMD:gup(playerid, params[])
  968. {
  969. if (Vip[playerid] >= 1)
  970. {
  971. MoveObject(muie,-1752.5271, -8.4947, 282.0090, 3);
  972. SendClientMessage(playerid, 0xDEEE20FF, "Going!");
  973. xVip(playerid,"GUP");
  974. }
  975. return 1;
  976. }
  977. CMD:rdown(playerid, params[])
  978. {
  979. if (Vip[playerid] >= 1)
  980. {
  981. MoveObject(pipi, 365.56, 2537.17, 15.68, 5);
  982. SendClientMessage(playerid, 0xDEEE20FF, "Going Down!");
  983. xVip(playerid,"RDOWN");
  984. }
  985. return 1;
  986. }
  987. CMD:bdown(playerid, params[])
  988. {
  989. if (Vip[playerid] >= 1)
  990. {
  991. MoveObject(caca, 154.7741, -1858.2334, 2.7823 , 5);
  992. SendClientMessage(playerid, 0xDEEE20FF, "Going Down!");
  993. xVip(playerid,"BDOWN");
  994. }
  995. return 1;
  996. }
  997. CMD:gdown(playerid, params[])
  998. {
  999. if (Vip[playerid] >= 1)
  1000. {
  1001. MoveObject(muie, -1748.0038, -154.6030, 2.6011, 5);
  1002. SendClientMessage(playerid, 0xDEEE20FF, "Going Down!");
  1003. xVip(playerid,"GDOWN");
  1004. }
  1005. return 1;
  1006. }
  1007. CMD:vspecoff(playerid, params[])
  1008. {
  1009. if (Vip[playerid] >= 2)
  1010. {
  1011. if(IsSpecing[playerid] == 0)return SendClientMessage(playerid,Grey,"You are not spectating anyone.");
  1012. TogglePlayerSpectating(playerid, 0);
  1013. xVip(playerid,"VSPECOFF");
  1014. }
  1015. return 1;
  1016. }
  1017. CMD:vloadpos(playerid, params[])
  1018. {
  1019. if (Vip[playerid] >= 2)
  1020. {
  1021. if(gPlayerData[playerid][E_SET] == true)
  1022. {
  1023. SetPlayerLastPos(playerid);
  1024. xVip(playerid,"VLOADPOS");
  1025. } else return SendClientMessage(playerid, 0xFFFFFFFF, "Not set!");
  1026. }
  1027. return 1;
  1028. }
  1029.  
  1030. CMD:vsavepos(playerid, params[])
  1031. {
  1032. if (Vip[playerid] >= 2)
  1033. {
  1034. GetPlayerLastPos(playerid);
  1035. xVip(playerid,"VSASVEPOS");
  1036. SendClientMessage(playerid, 0xFFFFFFFF, "Position set! Use /vloadpos to go to that pos!");
  1037. gPlayerData[playerid][E_SET] = true;
  1038. }
  1039. return 1;
  1040. }
  1041. //CARSSSSSSSSSSSSSSSSSSSSSSSSS :D
  1042. CMD:untune(playerid, params[])
  1043. {
  1044. if (Vip[playerid] >= 1)
  1045. {
  1046. if(tune[playerid] == 1)
  1047. {
  1048. RemovePlayerFromVehicle(playerid);
  1049. DestroyObject(o);
  1050. DestroyObject(ob1 );
  1051. DestroyObject(ob2 );
  1052. DestroyObject(ob3);
  1053. DestroyObject(ob4);
  1054. DestroyObject(ob5);
  1055. DestroyObject(ob6);
  1056. DestroyObject(ob7);
  1057. DestroyObject(ob8);
  1058. DestroyObject(ob9);
  1059. DestroyObject(ob10);
  1060. DestroyObject(ob11);
  1061. DestroyObject(ob12);
  1062. DestroyObject(ob13);
  1063. DestroyObject(ob14);
  1064. DestroyObject(ob15);
  1065. DestroyObject(ob16);
  1066. DestroyObject(ob17);
  1067. DestroyObject(ob18);
  1068. DestroyObject(ob19);
  1069. DestroyObject(ob20);
  1070. DestroyObject(ob21);
  1071. DestroyObject(ob22);
  1072. xVip(playerid,"UNTUNE");
  1073. SendClientMessage(playerid,-1,"SERVER:Untuned Sucessfully !");
  1074. }
  1075. else
  1076. if(tune[playerid] == 0)
  1077. {
  1078. SendClientMessage(playerid,-1,"SERVER:Your vehicle is not tuned!");
  1079. }
  1080. }
  1081. return 1;
  1082. }
  1083. CMD:vtune(playerid, params[])
  1084. {
  1085. if (Vip[playerid] >= 1)
  1086. {
  1087. new vehicleid = GetPlayerVehicleID(playerid);
  1088. if(GetVehicleModel(vehicleid) == 411) // 411 is the infernus model
  1089. {
  1090. tune[playerid] = 1;
  1091. AttachObjectToVehicle(o, GetPlayerVehicleID(playerid), -0.300000,0.000000,0.675000,0.000000,0.000000,0.000000);
  1092. AttachObjectToVehicle(ob2, GetPlayerVehicleID(playerid), 1.049999,2.174999,-0.599999,0.000005,180.899887,180.899963);
  1093. AttachObjectToVehicle(ob3, GetPlayerVehicleID(playerid), -1.049999,-1.950001,-0.599999,0.000005,180.899887,361.799743);
  1094. AttachObjectToVehicle(ob4, GetPlayerVehicleID(playerid), 0.000000,0.000000,0.000000,0.000000,0.000000,0.000000);
  1095. AttachObjectToVehicle(ob5, GetPlayerVehicleID(playerid), -0.074999,-2.325000,0.375000,0.000000,0.000000,0.000000);
  1096. AttachObjectToVehicle(ob6, GetPlayerVehicleID(playerid), 0.225000,0.000000,0.674999,0.000000,0.000000,0.000000);
  1097. AttachObjectToVehicle(ob7, GetPlayerVehicleID(playerid), -0.074999,-2.325000,0.524999,0.000000,0.000000,0.000000);
  1098. AttachObjectToVehicle(ob8, GetPlayerVehicleID(playerid), 0.000000,1.800000,0.149999,0.000000,0.000000,0.000000);
  1099. AttachObjectToVehicle(ob9, GetPlayerVehicleID(playerid), 0.000000,1.650000,0.150000,0.000000,0.000000,0.000000);
  1100. AttachObjectToVehicle(ob10, GetPlayerVehicleID(playerid), 0.000000,1.950000,0.150000,-10.800001,0.000000,0.000000);
  1101. AttachObjectToVehicle(ob11, GetPlayerVehicleID(playerid), -1.049999,-0.824999,-0.599999,0.000000,0.000000,0.000000);
  1102. AttachObjectToVehicle(ob12, GetPlayerVehicleID(playerid), 0.974999,-0.824999,-0.599999,0.000000,0.000000,0.000000);
  1103. AttachObjectToVehicle(ob13, GetPlayerVehicleID(playerid), -0.074999,-2.325000,0.449999,0.000000,0.000000,0.000000);
  1104. AddVehicleComponent(vehicleid, 1079);
  1105. ChangeVehicleColor(vehicleid,0,0);
  1106. xVip(playerid,"VTUNE");
  1107. SendClientMessage(playerid, 0xDEEE20FF, "Your Infernes is now Tuned!");
  1108. }
  1109. else
  1110. if(GetVehicleModel(vehicleid) == 541) // 541 is the Bullet model
  1111. {
  1112. tune[playerid] = 1;
  1113. AttachObjectToVehicle(ob14, GetPlayerVehicleID(playerid), 0.000000,-2.025000,0.300000,0.000000,0.000000,0.000000);
  1114. AttachObjectToVehicle(ob15, GetPlayerVehicleID(playerid), -0.375000,-1.275000,-0.375000,0.000000,0.000000,0.000000);
  1115. AttachObjectToVehicle(ob16, GetPlayerVehicleID(playerid), 1.049999,-1.500000,0.075000,0.000000,0.000000,0.000000);
  1116. AttachObjectToVehicle(ob17, GetPlayerVehicleID(playerid), 0.374999,-1.275000,-0.375000,0.000000,0.000000,0.000000);
  1117. AttachObjectToVehicle(ob18, GetPlayerVehicleID(playerid), 0.000000,0.224999,0.600000,0.000000,0.000000,0.000000);
  1118. AttachObjectToVehicle(ob19, GetPlayerVehicleID(playerid), 1.049999,1.575000,0.000000,0.000000,0.000000,0.000000);
  1119. AttachObjectToVehicle(ob20, GetPlayerVehicleID(playerid), -0.075000,1.200000,0.300000,0.000000,0.000000,0.000000);
  1120. AttachObjectToVehicle(ob21, GetPlayerVehicleID(playerid), 1.049999,-0.899999,-0.375000,0.000000,0.000000,0.000000);
  1121. AttachObjectToVehicle(ob22, GetPlayerVehicleID(playerid), -1.049999,-0.974999,-0.449999,0.000000,0.000000,0.000000);
  1122. AddVehicleComponent(vehicleid, 1079);
  1123. ChangeVehicleColor(vehicleid,0,0);
  1124. xVip(playerid,"VTUNE");
  1125. SendClientMessage(playerid, 0xDEEE20FF, "Your Bullet is now Tuned!");
  1126. }
  1127. else
  1128. {
  1129. tune[playerid] = 0;
  1130. SendClientMessage(playerid,-1,"SERVER:You need to be in infernus or bullet to use this command.");
  1131. }
  1132. }
  1133. return 1;
  1134. }
  1135. CMD:vtunecmds(playerid, params[])
  1136. {
  1137. #define tu 2
  1138. if (Vip[playerid] >= 1)
  1139. {
  1140. ShowPlayerDialog(playerid, tu, DIALOG_STYLE_MSGBOX, "Vehicle Tune Commands", "/vtune - To Tune the Car!!\n/untune - To Untune the Car\n\n\nNOTE: The Car Should be Infernus or Bullet Only", "Close", "");
  1141. }
  1142. return 1;
  1143. }
  1144. //=========================================
  1145. //SHIP!!!!!!!!!!!!!!!
  1146. CMD:piratecmds(playerid, params[])
  1147. {
  1148. #define DIALOG_P 2
  1149. if (Vip[playerid] >= 1)
  1150. {
  1151. ShowPlayerDialog(playerid, DIALOG_P, DIALOG_STYLE_MSGBOX, "Pirate Ship Commands!", "/VPirate - To Spawn the Ship\n/hidebox - Hide the Box (below the chat)\n/yes - To Use the Ship!!\n/no - Not To Use the Ship!!", "Close", "");
  1152. }
  1153. return 1;
  1154. }
  1155. CMD:vpirate(playerid, params[])
  1156. {
  1157. if (Vip[playerid] >= 1)
  1158. {
  1159. asked[playerid] = 1;
  1160. asked1[playerid] = 1;
  1161. SpawnVeh(453, playerid);
  1162. xVip(playerid,"VPIRATE");
  1163. SendClientMessage(playerid, 0xFF0080C8, "Reefer Spawned, Good Luck Mr Pirate!");//spawning that BOAT :D
  1164. TextDrawShowForPlayer(playerid,Textdraw0);
  1165. }
  1166. return 1;
  1167. }
  1168. CMD:vcmds(playerid, params[])
  1169. {
  1170. if (Vip[playerid] >= 1)
  1171. {
  1172. new Vip1[]="{FF4101}Level 1 V.I.P Commands\n\
  1173. /vcar /vbike \n\
  1174. /vboat /vheal \n\
  1175. /varmour /balloncmds \n\
  1176. /gballon /rballon \n\
  1177. /bballon /bup \n\
  1178. /gup /rup \n\
  1179. /bdown /rdown \n\
  1180. /gdown /yes \n\
  1181. /no /hidebox \n\
  1182. /vpirate /piratecmds \n\
  1183. /vtunecmds /vc \n\
  1184. /unship /vnos \n\
  1185. /vcolor /vcarcolor \n\
  1186. /vtune /vuntune\n\n\n\n",
  1187.  
  1188.  
  1189. Vip2[]="{FA0404}Level 2 V.I.P Commands\n\
  1190. /vskin /vcar \n\
  1191. /vspecoff /vspec \n\
  1192. /vweather /vboat \n\
  1193. /vpirate /vtune \n\
  1194. /vgod /vjetpack \n\
  1195. /vdick /vuntune\n\n\n\n",
  1196.  
  1197.  
  1198. Vip3[]="{2CF11A}Level 3 V.I.P Commands\n\
  1199. /varmour /vgodcar \n\
  1200. /vskin /vbike \n\
  1201. \n\n\n\
  1202. {FFFFFF}Use /vc For VIP Chat\n",
  1203.  
  1204. XVcmds[1600];
  1205. format( XVcmds, sizeof XVcmds, "%s%s%s%s%s", Vip1, Vip2, Vip3);
  1206. Vcmds(playerid, V.I.PCmds, xBox, "V.I.P Commands", XVcmds, "Ok", "" );
  1207. }
  1208. return 1;
  1209. }
  1210. CMD:hidebox(playerid, params[])
  1211. {
  1212. if (Vip[playerid] >= 1)
  1213. {
  1214. TextDrawHideForPlayer(playerid,Textdraw0);
  1215. xVip(playerid,"HIDEBOX");
  1216. SendClientMessage(playerid, 0xFF0080C8, "Box is Now Hidden!");
  1217. }
  1218. return 1;
  1219. }
  1220. CMD:yes(playerid, params[])
  1221. {
  1222. if (Vip[playerid] >= 1)
  1223. {
  1224. if (asked[playerid] == 1)
  1225. {
  1226. ship[playerid] = 1;
  1227. TextDrawHideForPlayer(playerid,Textdraw0);
  1228. asked[playerid] = 0;
  1229. xVip(playerid,"YES");
  1230. AttachObjectToVehicle(o, GetPlayerVehicleID(playerid), 0.899999,30.000114,17.099996,0.000000,0.000000,0.000000);
  1231. }
  1232. }
  1233. else if (asked[playerid] == 0)
  1234. {
  1235. SendClientMessage(playerid,-1,"Non. Asked u a Question!");
  1236. }
  1237. return 1;
  1238. }
  1239. CMD:no(playerid, params[])
  1240. {
  1241. if (Vip[playerid] >= 1)
  1242. {
  1243. if (asked1[playerid] == 1)
  1244. {
  1245. TextDrawHideForPlayer(playerid,Textdraw0);
  1246. asked1[playerid] = 0;
  1247. xVip(playerid,"NO");
  1248. SendClientMessage(playerid, 0xFF0080C8, "Use /vPirate if u wanna Use it ever again!");
  1249. }
  1250. }
  1251. else if (asked1[playerid] == 0)
  1252. {
  1253. SendClientMessage(playerid,-1,"Non. Asked u a Question!");
  1254. }
  1255. return 1;
  1256. }
  1257. //======================================
  1258. CMD:setvip(playerid, params[])
  1259. {
  1260. if (IsPlayerAdmin(playerid) )
  1261. {
  1262. new string[200], pos, level;
  1263. if(!params[0]||!(pos=chrfind(' ',params)+1)||!params[pos]) return SendClientMessage(playerid, COLOR_RED, "[!] USAGE: /setlevel [ID] [0-3]");
  1264. new id = strval(params[0]);
  1265. level = strval(params[pos]);
  1266. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, " [!] Player with this ID is not on the server !");
  1267. if(level < 0 || level > 3) return SendClientMessage(playerid, COLOR_RED, " [!] the level must be betwen 0 and 3 !");
  1268. format(string, sizeof(string), " **Administrator %s set Vip Level to %s [Level: %d]", PlayerName(playerid), PlayerName(id), level);
  1269. SendClientMessageToAll(COLOR_RED, string);
  1270. Vip[id] = level;
  1271. }
  1272. return 1;
  1273. }
  1274. stock PlayerName(playerid)
  1275. {
  1276. new name[MAX_PLAYER_NAME];
  1277. GetPlayerName(playerid,name,MAX_PLAYER_NAME);
  1278. return name;
  1279. }
  1280. CMD:unship(playerid, params[])
  1281. {
  1282. if(ship[playerid] == 1)
  1283. {
  1284. RemovePlayerFromVehicle(playerid);
  1285. DestroyObject(o);
  1286. SendClientMessage(playerid,-1,"SERVER:Pirate Ship Removed! !");
  1287. xVip(playerid,"UNSHIP");
  1288. }
  1289. else
  1290. if(ship[playerid] == 0)
  1291. {
  1292. SendClientMessage(playerid,-1,"SERVER:Your vehicle is not having Pirate Ship!");
  1293. }
  1294. return 1;
  1295. }
  1296. CMD:vweather(playerid, params[])
  1297. {
  1298. if (Vip[playerid] >= 2)
  1299. {
  1300. new pos, level;
  1301. if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "xUSAGE: /weahter [weather id]");
  1302. level = strval(params[pos]);
  1303. if(level < 1 || level > 44) return SendClientMessage(playerid, COLOR_RED, " Please enter number of weather [1-44]");
  1304. xVip(playerid,"VWEATHER");
  1305. SetWeather(level);
  1306. }
  1307. return 1;
  1308. }
  1309. CMD:vcargod(playerid, params[])
  1310. {
  1311. if (Vip[playerid] >= 3)
  1312. {
  1313. SendClientMessage(playerid,COLOR_RED,"Enjoy Your God Car!");
  1314. SetVehicleHealth(playerid,99999999999999999.0);
  1315. xVip(playerid,"VCARGOD");
  1316. } else {
  1317. SendClientMessage(playerid,COLOR_RED,"ERROR: You Cant Use This CMD");
  1318. }
  1319. return 1;
  1320. }
  1321.  
  1322. CMD:vheal(playerid, params[])
  1323. {
  1324. if (Vip[playerid] >= 1)
  1325. {
  1326. if(Anti_heal[playerid] == 0) {
  1327. SendClientMessage(playerid,COLOR_RED,"Health Restored");
  1328. xVip(playerid,"VHEAL");
  1329. SetPlayerHealth(playerid,100);
  1330. Anti_heal[playerid] = 1;
  1331. } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You Can Use This Per Death Only");
  1332. } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You Need Atleast VIP Rank 1 To Use This Command");
  1333. return 1;
  1334. }
  1335. CMD:varmour(playerid, params[])
  1336. {
  1337. if (Vip[playerid] >= 1)
  1338. {
  1339. if(Anti_heal[playerid] == 0) {
  1340. SendClientMessage(playerid,COLOR_RED,"Armour Restored");
  1341. SetPlayerArmour(playerid,100);
  1342. xVip(playerid,"VARMOUR");
  1343. Anti_heal[playerid] = 1;
  1344. } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You Can Use This Per Death Only");
  1345. } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You Need Atleast VIP Rank 1 To Use This Command");
  1346.  
  1347. return 1;
  1348. }
  1349. CMD:credits(playerid, params[])
  1350. {
  1351. SendClientMessage(playerid,COLOR_RED,"Thanks To XtremeR for VIP system");
  1352. SendClientMessage(playerid,COLOR_RED,"Thanks To Tannz0rz for /ironman");
  1353. SendClientMessage(playerid,COLOR_RED,"Thanks To Speederx for VIP Islan");
  1354. }
  1355. CMD:vcarcolor(playerid, params[])
  1356. {
  1357. if (Vip[playerid] >= 1)
  1358. {
  1359. xVip(playerid,"VCARCOLOR");
  1360. ShowPlayerDialog(playerid,245,DIALOG_STYLE_LIST,"Color List","{FCF7F9}White\n{1C9139}Green\n{2D5CAD}Blue\n{E8B82A}Orange\n{5C512F}Brwon\n{16F2E7}Light Blue\n{FF0000}Red\n{FF42EF}Pink\n{B907F5}Purple \n{878478}Grey\n{000000}Black","Select","Cancel");
  1361. }
  1362. return 1;
  1363. }
  1364.  
  1365. CMD:vnos(playerid, params[])
  1366. {
  1367. if (Vip[playerid] >= 1)
  1368. {
  1369. SendClientMessage(playerid,COLOR_RED,"Nirto Added");
  1370. AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); // Nitro
  1371. xVip(playerid,"VNOS");
  1372. }
  1373. return 1;
  1374. }
  1375. //Donor Chat!!!
  1376. CMD:vc(playerid, params[])
  1377. {
  1378. if (Vip[playerid] >= 1){
  1379. new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
  1380. GetPlayerName(playerid, name, sizeof(name));
  1381. if(isnull(params)) return SendClientMessage(playerid, red, "RPG: Please Use /vc [text]");
  1382. format(string, sizeof(string), "~VIP~Chat: %s: %s", name, params[0] );
  1383. return MessageToD(0xFF9900AA,string);
  1384. } else return SendClientMessage(playerid,red,"ERROR: You need to be VIP to use this command");
  1385. }
  1386. //---------------------------
  1387. CMD:vboat(playerid, params[])
  1388. {
  1389. if (Vip[playerid] >= 1)
  1390. {
  1391. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED,"You already have a vehicle!");
  1392. new Float:X, Float:Y, Float:Z;
  1393. GetPlayerPos(playerid, X, Y, Z);
  1394. PutPlayerInVehicle(playerid, CreateVehicle(493, X, Y, Z, 0.0,0, 1, 60), 0);
  1395. SendClientMessage(playerid, COLOR_RED,"Enjoy your new V.I.P Boat!");
  1396. xVip(playerid,"VBOAT");
  1397. } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You Need Atleast VIP Rank 1 To Use This Command");
  1398. return 1;
  1399. }
  1400. CMD:vcar(playerid, params[])
  1401. {
  1402. if (Vip[playerid] >= 1)
  1403. {
  1404. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED,"You already have a vehicle!");
  1405. new Float:X, Float:Y, Float:Z;
  1406. GetPlayerPos(playerid, X, Y, Z);
  1407. PutPlayerInVehicle(playerid, CreateVehicle(415, X, Y, Z, 0.0,0, 1, 60), 0);
  1408. SendClientMessage(playerid, COLOR_RED,"Enjoy your new V.I.P car!");
  1409. xVip(playerid,"VCAR");
  1410. } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You Need Atleast VIP Rank 1 To Use This Command");
  1411. return 1;
  1412. }
  1413. CMD:vbike(playerid, params[])
  1414. {
  1415. if (Vip[playerid] >= 1)
  1416. {
  1417. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED,"You already have a vehicle!");
  1418. new Float:X, Float:Y, Float:Z;
  1419. GetPlayerPos(playerid, X, Y, Z);
  1420. PutPlayerInVehicle(playerid, CreateVehicle(522, X, Y, Z, 0.0,0, 1, 60), 0);
  1421. SendClientMessage(playerid, COLOR_RED,"Enjoy your new V.I.P bike!");
  1422. xVip(playerid,"VBIKE");
  1423. } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You Need Atleast VIP Rank 1 To Use This Command");
  1424. return 1;
  1425. }
  1426. CMD:vstats(playerid, params[])
  1427. {
  1428. #pragma unused params
  1429. new string[200];
  1430. format(string, sizeof(string), " Name: %s Vip Level: %d", PlayerName(playerid), Vip[playerid] );
  1431. SendClientMessage(playerid ,COLOR_RED, string);
  1432. return 1;
  1433. }
  1434. CMD:vskin(playerid, params[])
  1435. {
  1436. if (Vip[playerid] >= 1)
  1437. {
  1438. new pos, level;
  1439. if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vskin [skin id]");
  1440. level = strval(params[pos]);
  1441. if(level < 1 || level > 299) return SendClientMessage(playerid, COLOR_RED, "ERROR: Please enter number of level [1-299]");
  1442. xVip(playerid,"VSKIN");
  1443. SetPlayerSkin(playerid, level);
  1444. }
  1445. return 1;
  1446. }
  1447. CMD:vcolor(playerid, params[])
  1448. {
  1449. if (Vip[playerid] >= 1)
  1450. {
  1451. #pragma unused params
  1452. SendClientMessage(playerid,COLOR_RED,"***Your Color Is VIP Now!***");
  1453. xVip(playerid,"VCOLOR");
  1454. SetPlayerColor(playerid,COLOR_VIP);
  1455. }
  1456. }
  1457. public IronMan(playerid)
  1458. {
  1459. if(!IsPlayerConnected(playerid))
  1460. return flying[playerid] = false;
  1461.  
  1462. if(flying[playerid])
  1463. {
  1464. if(!IsPlayerInAnyVehicle(playerid))
  1465. {
  1466. new
  1467. i,
  1468. keys,
  1469. ud,
  1470. lr,
  1471. Float:x[2],
  1472. Float:y[2],
  1473. Float:z,
  1474. Float:a;
  1475.  
  1476. GetPlayerKeys(playerid, keys, ud, lr);
  1477. GetPlayerVelocity(playerid, x[0], y[0], z);
  1478.  
  1479. if(!GetPlayerWeapon(playerid))
  1480. {
  1481. if((keys & KEY_FIRE) == (KEY_FIRE))
  1482. {
  1483. i = 0;
  1484. while(i < MAX_PLAYERS)
  1485. {
  1486. if(i != playerid)
  1487. {
  1488. GetPlayerPos(i, x[0], y[0], z);
  1489. if(IsPlayerInRangeOfPoint(playerid, 3.0, x[0], y[0], z))
  1490. if(IsPlayerFacingPlayer(playerid, i, 15.0))
  1491. SetPlayerVelocity(i, floatsin(-a, degrees), floatcos(-a, degrees), 0.05);
  1492. }
  1493. ++i;
  1494. }
  1495. }
  1496.  
  1497. if((keys & 136) == (136))
  1498. Jav(playerid);
  1499.  
  1500. }
  1501.  
  1502. if(ud == KEY_UP)
  1503. {
  1504. GetPlayerCameraPos(playerid, x[0], y[0], z);
  1505. GetPlayerCameraFrontVector(playerid, x[1], y[1], z);
  1506.  
  1507. a = SetPlayerToFacePos(playerid, x[0] + x[1], y[0] + y[1]);
  1508.  
  1509. ApplyAnimation(playerid, "PARACHUTE", "FALL_SkyDive_Accel", 4.1, 0, 0, 0, 0, 0);
  1510. SetPlayerVelocity(playerid, x[1], y[1], z);
  1511.  
  1512. i = 0;
  1513. while(i < MAX_PLAYERS)
  1514. {
  1515. if(i != playerid)
  1516. {
  1517. GetPlayerPos(i, x[0], y[0], z);
  1518. if(IsPlayerInRangeOfPoint(playerid, 10.0, x[0], y[0], z))
  1519. if(IsPlayerInAnyVehicle(i))
  1520. {
  1521. SetVehicleHealth(GetPlayerVehicleID(i), 0.0);
  1522. CreateExplosion(x[0], y[0], z, 7, 5.0);
  1523. }
  1524. }
  1525.  
  1526. ++i;
  1527. }
  1528. }
  1529. else
  1530. SetPlayerVelocity(playerid, 0.0, 0.0, 0.01);
  1531. }
  1532.  
  1533. SetTimerEx("IronMan", 100, 0, "d", playerid);
  1534. }
  1535.  
  1536. return 0;
  1537. }
  1538. public DestroyMe(objectid)
  1539. {
  1540. return DestroyObject(objectid);
  1541. }
  1542.  
  1543. public Jav(playerid)
  1544. {
  1545. if(!Javelin[playerid][1])
  1546. {
  1547. new
  1548. target = GetClosestPlayer(playerid);
  1549.  
  1550. if(target != -1)
  1551. {
  1552. GetPlayerPos(target, JavPos[playerid][0], JavPos[playerid][1], JavPos[playerid][2]);
  1553. if(IsPlayerInRangeOfPoint(playerid, 500.0, JavPos[playerid][0], JavPos[playerid][1], JavPos[playerid][2]))
  1554. {
  1555. new Float:a;
  1556. GetPlayerPos(playerid, JavPos[playerid][0], JavPos[playerid][1], JavPos[playerid][2]);
  1557. GetPlayerFacingAngle(playerid, a);
  1558.  
  1559. Javelin[playerid][0] = CreateObject(354, JavPos[playerid][0], JavPos[playerid][1], JavPos[playerid][2], 0.0, 90.0, 0.0);
  1560. MoveObject(Javelin[playerid][0], JavPos[playerid][0], JavPos[playerid][1], JavPos[playerid][2] + 100.0, 45.0);
  1561.  
  1562. GetPlayerPos(target, JavPos[playerid][0], JavPos[playerid][1], JavPos[playerid][2]);
  1563.  
  1564. Javelin[playerid][1] = 1;
  1565. }
  1566. }
  1567. }
  1568.  
  1569. return 0;
  1570. }
  1571. stock xVip(playerid,command[])
  1572. {
  1573. new string[128]; GetPlayerName(playerid,string,sizeof(string));
  1574. format(string,sizeof(string),"[INFO]V.I.P %s has used %s",string,command);
  1575. MessageToD(blue,string);
  1576. }
  1577. forward MessageToD(color,const string[]);
  1578. public MessageToD(color,const string[])
  1579. {
  1580. for(new i = 0; i < MAX_PLAYERS; i++)
  1581. {
  1582. if (Vip[i] >= 1 ) SendClientMessage(i, color, string);
  1583. }
  1584. return 1;
  1585. }
  1586. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1587. {
  1588. switch(dialogid)
  1589. {
  1590. case 245:
  1591. {
  1592. if(!response)
  1593. {
  1594. SendClientMessage(playerid, COLOR_RED,"You Canceled!");
  1595. return 1;
  1596. }
  1597. switch(listitem)
  1598. {
  1599. case 0:
  1600. {
  1601. ChangeVehicleColor(GetPlayerVehicleID(playerid), 1, 1);
  1602. }
  1603. case 1:
  1604. {
  1605. ChangeVehicleColor(GetPlayerVehicleID(playerid), 236, 236);
  1606. }
  1607. case 2:
  1608. {
  1609. ChangeVehicleColor(GetPlayerVehicleID(playerid), 79, 79);
  1610. }
  1611. case 3:
  1612. {
  1613. ChangeVehicleColor(GetPlayerVehicleID(playerid), 6, 6);
  1614. }
  1615. case 4:
  1616. {
  1617. ChangeVehicleColor(GetPlayerVehicleID(playerid), 55, 55);
  1618. }
  1619. case 5:
  1620. {
  1621. ChangeVehicleColor(GetPlayerVehicleID(playerid), 147, 147);
  1622. }
  1623. case 6:
  1624. {
  1625. ChangeVehicleColor(GetPlayerVehicleID(playerid), 3, 3);
  1626. }
  1627. case 7:
  1628. {
  1629. ChangeVehicleColor(GetPlayerVehicleID(playerid), 183, 183);
  1630. }
  1631. case 8:
  1632. {
  1633. ChangeVehicleColor(GetPlayerVehicleID(playerid), 186, 186);
  1634. }
  1635. case 9:
  1636. {
  1637. ChangeVehicleColor(GetPlayerVehicleID(playerid), 91, 91);
  1638. }
  1639. case 10:
  1640. {
  1641. ChangeVehicleColor(GetPlayerVehicleID(playerid), 000, 000);
  1642. }
  1643. }
  1644. }
  1645. }
  1646. switch(dialogid)
  1647. {
  1648. case 99:
  1649. {
  1650. if(!response)
  1651. {
  1652. SendClientMessage(playerid, COLOR_RED,"You Canceled!");
  1653. return 1;
  1654. }
  1655. switch(listitem)
  1656. {
  1657. case 0:
  1658. {
  1659. if(GetPlayerMoney(playerid) < 3000)
  1660. {
  1661. SetPlayerHealth(playerid, 100);
  1662. SetPlayerArmour(playerid, 100);
  1663. GivePlayerMoney(playerid,-3000);
  1664. }
  1665. }
  1666. case 1:
  1667. {
  1668. if(GetPlayerMoney(playerid) < 7800) {
  1669. GivePlayerWeapon(playerid,35,2);
  1670. GivePlayerMoney(playerid,-7800);
  1671. }
  1672. }
  1673. case 2:
  1674. {
  1675. if(GetPlayerMoney(playerid) < 6500) {
  1676. GivePlayerWeapon(playerid,16,4);
  1677. GivePlayerMoney(playerid,-6500);
  1678. }
  1679. }
  1680. }
  1681. }
  1682. }
  1683. switch(dialogid)
  1684. {
  1685. case 786:
  1686. {
  1687. if(!response)
  1688. {
  1689. SendClientMessage(playerid, COLOR_RED,"You Canceled!");
  1690. return 1;
  1691. }
  1692. switch(listitem)
  1693. {
  1694. case 0:
  1695. {
  1696. if (Vip[playerid] >= 1)
  1697. {
  1698. if (de[playerid] == 0)
  1699. {
  1700. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED,"You already have a vehicle!");
  1701. new Float:X, Float:Y, Float:Z;
  1702. GetPlayerPos(playerid, X, Y, Z);
  1703. PutPlayerInVehicle(playerid, CreateVehicle(415, X, Y, Z, 0.0,0, 1, 60), 0);
  1704. SendClientMessage(playerid, COLOR_RED,"Enjoy your new V.I.P car!");
  1705. de[playerid] = 1;
  1706. } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You Can Use This Per Death Only");
  1707. } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You Need Atleast VIP Rank 1 To Use This Command");
  1708. }
  1709. case 1:
  1710. {
  1711. if (Vip[playerid] >= 1)
  1712. {
  1713. SendClientMessage(playerid,COLOR_RED,"Nirto Added");
  1714. AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); // Nitro
  1715. }
  1716. }
  1717. case 2:
  1718. {
  1719. if (Vip[playerid] >= 1)
  1720. {
  1721. SendClientMessage(playerid,COLOR_RED,"***Your Color Is VIP Now!***");
  1722. SetPlayerColor(playerid,COLOR_VIP);
  1723. }
  1724. }
  1725. case 3:
  1726. {
  1727. if (Vip[playerid] >= 1)
  1728. {
  1729. if(wep[playerid] == 0) {
  1730. GivePlayerWeapon(playerid, 26,500);
  1731. GivePlayerWeapon(playerid, 24,500);
  1732. GivePlayerWeapon(playerid, 35,1);
  1733. GivePlayerWeapon(playerid, 16,2);
  1734. } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You Can Use This Per Death Only");
  1735. } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You Need Atleast VIP Rank 1 To Use This Command");
  1736. }
  1737. case 4:
  1738. {
  1739. if (Vip[playerid] >= 1)
  1740. {
  1741. if(Anti_heal[playerid] == 0) {
  1742. SendClientMessage(playerid,COLOR_RED,"Health Restored");
  1743. SetPlayerHealth(playerid,100);
  1744. Anti_heal[playerid] = 1;
  1745. } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You Can Use This Per Death Only");
  1746. } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You Need Atleast VIP Rank 1 To Use This Command");
  1747. }
  1748. case 5:
  1749. {
  1750. if (Vip[playerid] >= 1)
  1751. {
  1752. if(Anti_heal[playerid] == 0) {
  1753. SendClientMessage(playerid,COLOR_RED,"Armour Restored");
  1754. SetPlayerArmour(playerid,100);
  1755. Anti_heal[playerid] = 1;
  1756. } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You Can Use This Per Death Only");
  1757. } else return SendClientMessage(playerid,COLOR_RED,"ERROR: You Need Atleast VIP Rank 1 To Use This Command");
  1758.  
  1759. }
  1760. case 6:
  1761. {
  1762. ShowPlayerDialog(playerid,245,DIALOG_STYLE_LIST,"Color List","{FCF7F9}White\n{1C9139}Green\n{2D5CAD}Blue\n{E8B82A}Orange\n{5C512F}Brwon\n{16F2E7}Light Blue\n{FF0000}Red\n{FF42EF}Pink\n{B907F5}Purple \n{878478}Grey\n{000000}Black","Select","Cancel");
  1763. }
  1764. case 7:
  1765. {
  1766. if (Vip[playerid] >= 1)
  1767. {
  1768. SendClientMessage(playerid,COLOR_RED,"Enjoy Your God Car!");
  1769. SetVehicleHealth(playerid,99999999999999999.0);
  1770. } else {
  1771. SendClientMessage(playerid,COLOR_RED,"ERROR: You Cant Use This CMD");
  1772. }
  1773. }
  1774. }
  1775. }
  1776. }
  1777. return 0;
  1778. }
  1779. stock GetPlayerLastPos(playerid)
  1780. {
  1781. new Float:pX, Float:pY, Float:pZ;
  1782. GetPlayerPos(playerid, pX, pY, pZ);
  1783. gPlayerData[playerid][E_LAST_X] = pX;
  1784. gPlayerData[playerid][E_LAST_Y] = pY;
  1785. gPlayerData[playerid][E_LAST_Z] = pZ;
  1786. }
  1787.  
  1788. stock SetPlayerLastPos(playerid)
  1789. {
  1790. SetPlayerPos(playerid,gPlayerData[playerid][E_LAST_X],gPlayerData[playerid][E_LAST_Y], gPlayerData[playerid][E_LAST_Z]);
  1791. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement