vipcore.pwn 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386
  1. /*
  2. /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$$
  3. | $$$ | $$ /$$__ $$ | $$__ $$| $$__ $$
  4. | $$$$| $$| $$ \__/ | $$ \ $$| $$ \ $$
  5. | $$ $$ $$| $$ /$$$$ /$$$$$$| $$$$$$$/| $$$$$$$/
  6. | $$ $$$$| $$|_ $$|______/| $$__ $$| $$____/
  7. | $$\ $$$| $$ \ $$ | $$ \ $$| $$
  8. | $$ \ $$| $$$$$$/ | $$ | $$| $$
  9. |__/ \__/ \______/ |__/ |__/|__/
  10. VIP Core
  11. Next Generation Gaming, LLC
  12. (created by Next Generation Gaming Development Team)
  13. * Copyright (c) 2016, Next Generation Gaming, LLC
  14. *
  15. * All rights reserved.
  16. *
  17. * Redistribution and use in source and binary forms, with or without modification,
  18. * are not permitted in any case.
  19. *
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  25. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  26. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  27. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  28. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  29. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  30. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  31. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. */
  33. stock IsVIPcar(carid)
  34. {
  35. for(new i = 0; i < sizeof(VIPVehicles); i++)
  36. {
  37. if(carid == VIPVehicles[i]) return 1;
  38. }
  39. return 0;
  40. }
  41. stock IsVIPModel(carid)
  42. {
  43. new Cars[] = { 451, 411, 429, 522, 444, 556, 557 };
  44. for(new i = 0; i < sizeof(Cars); i++)
  45. {
  46. if(GetVehicleModel(carid) == Cars[i]) return 1;
  47. }
  48. return 0;
  49. }
  50. stock GetVIPRankName(i)
  51. {
  52. new string[128];
  53. switch(i)
  54. {
  55. case 1:
  56. {
  57. format(string, sizeof(string), "Bronze VIP");
  58. }
  59. case 2:
  60. {
  61. format(string, sizeof(string), "Silver VIP");
  62. }
  63. case 3:
  64. {
  65. format(string, sizeof(string), "Gold VIP");
  66. }
  67. case 4:
  68. {
  69. format(string, sizeof(string), "Platinum VIP");
  70. }
  71. default:
  72. {
  73. format(string, sizeof(string), "VIP Moderator");
  74. }
  75. }
  76. return string;
  77. }
  78. stock SendVIPMessage(color, string[])
  79. {
  80. foreach(new i: Player)
  81. {
  82. if((PlayerInfo[i][pDonateRank] >= 1 || PlayerInfo[i][pAdmin] >= 2 || PlayerInfo[i][pVIPMod]) && PlayerInfo[i][pToggledChats][9] == 0) {
  83. ChatTrafficProcess(i, color, string, 9);
  84. }
  85. }
  86. }
  87. CMD:vipdate(playerid, params[]) {
  88. new giveplayerid;
  89. if(PlayerInfo[playerid][pAdmin] < 2)
  90. {
  91. giveplayerid = playerid;
  92. }
  93. else
  94. {
  95. if(sscanf(params, "u", giveplayerid)) giveplayerid = playerid;
  96. }
  97. if(1 <= PlayerInfo[giveplayerid][pDonateRank] <= 4 && !PlayerInfo[giveplayerid][pBuddyInvited])
  98. {
  99. new string[128];
  100. new drank[20];
  101. switch(PlayerInfo[giveplayerid][pDonateRank])
  102. {
  103. case 1: drank = "Bronze";
  104. case 2: drank = "Silver";
  105. case 3: drank = "Gold";
  106. case 4: drank = "Platinum";
  107. }
  108. new datestring[32];
  109. datestring = date(PlayerInfo[giveplayerid][pVIPExpire], 4);
  110. if(PlayerInfo[giveplayerid][pVIPExpire] == 0) format(string, sizeof(string), "* Your %s VIP subscription is not set to expire.", drank);
  111. else format(string, sizeof(string), "* Your %s VIP subscription expires on %s.", drank, datestring);
  112. SendClientMessageEx(playerid, COLOR_VIP, string);
  113. }
  114. else SendClientMessageEx(playerid, COLOR_GRAD2, "You don't have a VIP subscription.");
  115. return 1;
  116. }
  117. CMD:spawnathome(playerid, params[])
  118. {
  119. if( PlayerInfo[playerid][pPhousekey] != INVALID_HOUSE_ID )
  120. {
  121. if(PlayerInfo[playerid][pDonateRank] >= 4)
  122. {
  123. PlayerInfo[playerid][pInsurance] = HOSPITAL_HOMECARE;
  124. SendClientMessageEx( playerid, COLOR_YELLOW, "Platinum VIP: You will now spawn at your house after deaths." );
  125. }
  126. else
  127. {
  128. SendClientMessageEx( playerid, COLOR_WHITE, "You are not Platinum VIP!" );
  129. }
  130. }
  131. else
  132. {
  133. SendClientMessageEx( playerid, COLOR_WHITE, "You do not own a house." );
  134. }
  135. return 1;
  136. }
  137. CMD:vipnum(playerid, params[])
  138. {
  139. if(!(IsPlayerInRangeOfPoint(playerid, 3.0, 2549.548095, 1404.047729, 7699.584472 ) || IsPlayerInRangeOfPoint(playerid, 3.0, 1832.6000, 1375.1700, 1464.4600)) )
  140. {
  141. SendClientMessageEx(playerid, COLOR_GREY, "You are not at the VIP phone number changing station!");
  142. return 1;
  143. }
  144. if(PlayerInfo[playerid][pDonateRank] < 2)
  145. {
  146. SendClientMessageEx(playerid, COLOR_GRAD1, "You must be a Silver VIP or higher to use this function.");
  147. return 1;
  148. }
  149. ShowPlayerDialogEx(playerid, VIPNUMMENU, DIALOG_STYLE_INPUT, "New Phone Number","New phone number:", "Submit", "Cancel");
  150. return 1;
  151. }
  152. CMD:buddyinvites(playerid, params[])
  153. {
  154. new string[128];
  155. if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pAdmin] > 1 && PlayerInfo[playerid][pShopTech] > 2) {
  156. if(BuddyInvite == true) {
  157. BuddyInvite = false;
  158. format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has disabled the /buddyinvite command.", GetPlayerNameEx(playerid));
  159. ABroadCast(COLOR_YELLOW, string, 2);
  160. } else {
  161. BuddyInvite = true;
  162. format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has enabled the /buddyinvite command.", GetPlayerNameEx(playerid));
  163. ABroadCast(COLOR_YELLOW, string, 2);
  164. }
  165. } else {
  166. SendClientMessageEx(playerid, COLOR_GRAD2, "You don't have permission to use this command.");
  167. }
  168. return 1;
  169. }
  170. CMD:buddyinvite(playerid, params[])
  171. {
  172. if(PlayerInfo[playerid][pDonateRank] < 2) return SendClientMessageEx(playerid, COLOR_GREY, "You need to be Silver VIP+ to use this function!");
  173. if(BuddyInvite == false) return SendClientMessageEx(playerid, COLOR_GREY, "Buddy invites has been disabled by an adminstrator.");
  174. new giveplayerid;
  175. if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /buddyinvite [player]");
  176. if(!IsPlayerConnected(giveplayerid)) return SendClientMessageEx(playerid, COLOR_GRAD2, "That person is not connected!");
  177. if(PlayerInfo[giveplayerid][pDonateRank] > 0) return SendClientMessageEx(playerid, COLOR_WHITE, "Unable to invite: That person is already a VIP.");
  178. if(PlayerInfo[giveplayerid][pAdmin] >= 2 && !PlayerInfo[giveplayerid][pTogReports]) return SendClientMessageEx(playerid, COLOR_WHITE, "Unable to invite: That person is already a VIP.");
  179. new days, daytime, string[128];
  180. if(PlayerInfo[playerid][pDonateRank] == 2)
  181. {
  182. daytime = 7;
  183. }
  184. else if(PlayerInfo[playerid][pDonateRank] == 3)
  185. {
  186. daytime = 1;
  187. }
  188. else if(PlayerInfo[playerid][pDonateRank] >= 4)
  189. {
  190. daytime = 0;
  191. }
  192. ConvertTime(gettime() - PlayerInfo[playerid][pVIPInviteDay], .ctd=days);
  193. if(days >= 1 && PlayerInfo[playerid][pDonateRank] >= 4)
  194. {
  195. PlayerInfo[playerid][pVIPInviteDay] = gettime();
  196. PlayerInfo[playerid][pBuddyInvites] = 3;
  197. }
  198. if(days < daytime && PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessageEx(playerid, COLOR_WHITE, "You must wait 7 days as silver or 1 day as gold, before inviting another person to become a VIP.");
  199. if(PlayerInfo[playerid][pDonateRank] >= 4 && PlayerInfo[playerid][pBuddyInvites] < 1) return SendClientMessageEx(playerid, COLOR_WHITE, "You must wait 7 days as silver or 1 day as gold, before inviting another person to become a VIP.");
  200. PlayerInfo[giveplayerid][pDonateRank] = 1;
  201. PlayerInfo[giveplayerid][pTempVIP] = 180;
  202. PlayerInfo[giveplayerid][pBuddyInvited] = 1;
  203. format(string, sizeof(string), "You have invited %s to become a Bronze VIP for 3 hours.", GetPlayerNameEx(giveplayerid));
  204. SendClientMessageEx(playerid, COLOR_WHITE, string);
  205. format(string, sizeof(string), "You have been invited by %s to become a Bronze VIP for 3 hours. Enjoy!", GetPlayerNameEx(playerid));
  206. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
  207. format(string, sizeof(string), "BUDDY INVITE: %s(%d) has invited %s(%d)", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
  208. Log("logs/setvip.log", string);
  209. if(PlayerInfo[playerid][pDonateRank] >= 4)
  210. {
  211. PlayerInfo[playerid][pBuddyInvites]--;
  212. format(string, sizeof(string), "Platinum VIP: You have %d invites left for today.", PlayerInfo[playerid][pBuddyInvites]);
  213. SendClientMessageEx(playerid, COLOR_YELLOW, string);
  214. }
  215. else
  216. {
  217. PlayerInfo[playerid][pVIPInviteDay] = gettime();
  218. }
  219. mysql_format(MainPipeline, string, sizeof(string), "UPDATE `accounts` SET `VIPInviteDay` = %d, `BuddyInvites` = %d WHERE `id` = '%d'",
  220. PlayerInfo[playerid][pVIPInviteDay], PlayerInfo[playerid][pBuddyInvites], GetPlayerSQLId(playerid));
  221. mysql_tquery(MainPipeline, string, "OnQueryFinish", "ii", SENDDATA_THREAD, playerid);
  222. return 1;
  223. }
  224. CMD:travel(playerid, params[])
  225. {
  226. if(IsPlayerInRangeOfPoint(playerid, 13.0, 2491.7783,2397.6230,4.2109))
  227. {
  228. if(PlayerInfo[playerid][pFamed] >= 1)
  229. {
  230. if(isnull(params))
  231. {
  232. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /travel [famed, sffamed, trfamed]");
  233. return 1;
  234. }
  235. if(strcmp(params,"famed",true) == 0)
  236. {
  237. if (GetPlayerState(playerid) == 2)
  238. {
  239. new tmpcar = GetPlayerVehicleID(playerid);
  240. SetVehiclePos(tmpcar, 1010.7523, -1121.7469, 24.1332);
  241. if(GetPVarInt(playerid, "tpDeliverVehTimer") > 0)
  242. SetPVarInt(playerid, "tpJustEntered", 1);
  243. SetVehicleZAngle(tmpcar, 180.0373);
  244. fVehSpeed[playerid] = 0.0;
  245. SendClientMessageEx(playerid, COLOR_YELLOW, "Famed: You have traveled to the front of the famed lounge.");
  246. SetPlayerInterior(playerid,0);
  247. PlayerInfo[playerid][pInt] = 0;
  248. SetPlayerVirtualWorld(playerid, 0);
  249. PlayerInfo[playerid][pVW] = 0;
  250. }
  251. else
  252. {
  253. SendClientMessageEx(playerid, COLOR_GRAD1, "You're not inside a vehicle!");
  254. }
  255. }
  256. else if(strcmp(params,"trfamed",true) == 0)
  257. {
  258. if (GetPlayerState(playerid) == 2)
  259. {
  260. new tmpcar = GetPlayerVehicleID(playerid);
  261. SetVehiclePos(tmpcar, -2419.3953,2328.9312,4.9921);
  262. if(GetPVarInt(playerid, "tpDeliverVehTimer") > 0)
  263. SetPVarInt(playerid, "tpJustEntered", 1);
  264. SetVehicleZAngle(tmpcar, 14.1091);
  265. fVehSpeed[playerid] = 0.0;
  266. SendClientMessageEx(playerid, COLOR_YELLOW, "Famed: You have traveled to the front of the New Robada famed lounge.");
  267. SetPlayerInterior(playerid,0);
  268. PlayerInfo[playerid][pInt] = 0;
  269. SetPlayerVirtualWorld(playerid, 0);
  270. PlayerInfo[playerid][pVW] = 0;
  271. }
  272. else
  273. {
  274. SendClientMessageEx(playerid, COLOR_GRAD1, "You're not inside a vehicle!");
  275. }
  276. }
  277. else if(strcmp(params,"sffamed",true) == 0)
  278. {
  279. if (GetPlayerState(playerid) == 2)
  280. {
  281. new tmpcar = GetPlayerVehicleID(playerid);
  282. SetVehiclePos(tmpcar, -2484.3599,59.7974,26.0415);
  283. if(GetPVarInt(playerid, "tpDeliverVehTimer") > 0)
  284. SetPVarInt(playerid, "tpJustEntered", 1);
  285. SetVehicleZAngle(tmpcar, 357.5536);
  286. fVehSpeed[playerid] = 0.0;
  287. SendClientMessageEx(playerid, COLOR_YELLOW, "Famed: You have traveled to the front of the San Fierro famed lounge.");
  288. SetPlayerInterior(playerid,0);
  289. PlayerInfo[playerid][pInt] = 0;
  290. SetPlayerVirtualWorld(playerid, 0);
  291. PlayerInfo[playerid][pVW] = 0;
  292. }
  293. else
  294. {
  295. SendClientMessageEx(playerid, COLOR_GRAD1, "You're not inside a vehicle!");
  296. }
  297. }
  298. }
  299. else
  300. return SendClientMessageEx(playerid, COLOR_GRAD1, "You're not part of famed!");
  301. }
  302. else if(IsPlayerInRangeOfPoint(playerid, 13.0, -4429.944824, 905.032470, 987.078186))
  303. {
  304. if(PlayerInfo[playerid][pDonateRank] > 0)
  305. {
  306. if(isnull(params))
  307. {
  308. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /travel [location]");
  309. SendClientMessageEx(playerid, COLOR_GRAD1, "Locations: LS, SF, RC, LSVIP, SFVIP, LVVIP, APVIP, FC, BAYSIDE, FLINT");
  310. return 1;
  311. }
  312. if(strcmp(params,"ls",true) == 0)
  313. {
  314. if (GetPlayerState(playerid) == 2)
  315. {
  316. new tmpcar = GetPlayerVehicleID(playerid);
  317. SetVehiclePos(tmpcar, 1529.6,-1691.2,13.3);
  318. if(GetPVarInt(playerid, "tpDeliverVehTimer") > 0)
  319. SetPVarInt(playerid, "tpJustEntered", 1);
  320. fVehSpeed[playerid] = 0.0;
  321. SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have traveled to Los Santos with your vehicle.");
  322. SetPlayerInterior(playerid,0);
  323. PlayerInfo[playerid][pInt] = 0;
  324. SetPlayerVirtualWorld(playerid, 0);
  325. PlayerInfo[playerid][pVW] = 0;
  326. }
  327. else
  328. {
  329. SendClientMessageEx(playerid, COLOR_GRAD1, " You are not in a vehicle!");
  330. }
  331. }
  332. if(strcmp(params,"sf",true) == 0)
  333. {
  334. if (GetPlayerState(playerid) == 2)
  335. {
  336. new tmpcar = GetPlayerVehicleID(playerid);
  337. SetVehiclePos(tmpcar, -1605.0,720.0,12.0);
  338. if(GetPVarInt(playerid, "tpDeliverVehTimer") > 0)
  339. SetPVarInt(playerid, "tpJustEntered", 1);
  340. fVehSpeed[playerid] = 0.0;
  341. SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have traveled to San Fierro with your vehicle.");
  342. SetPlayerInterior(playerid,0);
  343. PlayerInfo[playerid][pInt] = 0;
  344. SetPlayerVirtualWorld(playerid, 0);
  345. PlayerInfo[playerid][pVW] = 0;
  346. }
  347. else
  348. {
  349. SendClientMessageEx(playerid, COLOR_GRAD1, " You are not in a vehicle!");
  350. }
  351. }
  352. if(strcmp(params,"rc",true) == 0)
  353. {
  354. if (GetPlayerState(playerid) == 2)
  355. {
  356. new tmpcar = GetPlayerVehicleID(playerid);
  357. SetVehiclePos(tmpcar, 1253.70, 343.73, 19.41);
  358. if(GetPVarInt(playerid, "tpDeliverVehTimer") > 0)
  359. SetPVarInt(playerid, "tpJustEntered", 1);
  360. fVehSpeed[playerid] = 0.0;
  361. SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have traveled to Red County with your vehicle.");
  362. SetPlayerInterior(playerid,0);
  363. PlayerInfo[playerid][pInt] = 0;
  364. SetPlayerVirtualWorld(playerid, 0);
  365. PlayerInfo[playerid][pVW] = 0;
  366. }
  367. else
  368. {
  369. SendClientMessageEx(playerid, COLOR_GRAD1, " You are not in a vehicle!");
  370. }
  371. }
  372. if(strcmp(params,"lsvip",true) == 0)
  373. {
  374. if (GetPlayerState(playerid) == 2)
  375. {
  376. new tmpcar = GetPlayerVehicleID(playerid);
  377. SetVehiclePos(tmpcar, 1826.76, -1538.57, 13.25);
  378. if(GetPVarInt(playerid, "tpDeliverVehTimer") > 0)
  379. SetPVarInt(playerid, "tpJustEntered", 1);
  380. SetPlayerFacingAngle(playerid, 255.08);
  381. fVehSpeed[playerid] = 0.0;
  382. SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have traveled to the VIP Lounge with your vehicle.");
  383. SetPlayerInterior(playerid,0);
  384. PlayerInfo[playerid][pInt] = 0;
  385. SetPlayerVirtualWorld(playerid, 0);
  386. PlayerInfo[playerid][pVW] = 0;
  387. }
  388. else
  389. {
  390. SendClientMessageEx(playerid, COLOR_GRAD1, " You are not in a vehicle!");
  391. }
  392. }
  393. if(strcmp(params,"sfvip",true) == 0)
  394. {
  395. if (GetPlayerState(playerid) == 2)
  396. {
  397. new tmpcar = GetPlayerVehicleID(playerid);
  398. SetVehiclePos(tmpcar, -2441.009521, 522.708923, 29.785852);
  399. if(GetPVarInt(playerid, "tpDeliverVehTimer") > 0)
  400. SetPVarInt(playerid, "tpJustEntered", 1);
  401. SetPlayerFacingAngle(playerid, 181.54);
  402. fVehSpeed[playerid] = 0.0;
  403. SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have traveled to the VIP Lounge with your vehicle.");
  404. SetPlayerInterior(playerid,0);
  405. PlayerInfo[playerid][pInt] = 0;
  406. SetPlayerVirtualWorld(playerid, 0);
  407. PlayerInfo[playerid][pVW] = 0;
  408. }
  409. else
  410. {
  411. SendClientMessageEx(playerid, COLOR_GRAD1, " You are not in a vehicle!");
  412. }
  413. }
  414. if(strcmp(params,"apvip",true) == 0)
  415. {
  416. if (GetPlayerState(playerid) == 2)
  417. {
  418. new tmpcar = GetPlayerVehicleID(playerid);
  419. SetVehiclePos(tmpcar, -2106.056396, -2403.133056, 31.089097);
  420. SetVehicleZAngle(tmpcar, 232.05); // Sets the direction in which the vehicle faces
  421. if(GetPVarInt(playerid, "tpDeliverVehTimer") > 0)
  422. SetPVarInt(playerid, "tpJustEntered", 1);
  423. SetPlayerFacingAngle(playerid, 232.05);
  424. fVehSpeed[playerid] = 0.0;
  425. SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have traveled to the VIP Lounge with your vehicle.");
  426. SetPlayerInterior(playerid,0);
  427. PlayerInfo[playerid][pInt] = 0;
  428. SetPlayerVirtualWorld(playerid, 0);
  429. PlayerInfo[playerid][pVW] = 0;
  430. }
  431. else
  432. {
  433. SendClientMessageEx(playerid, COLOR_GRAD1, " You are not in a vehicle!");
  434. }
  435. }
  436. if(strcmp(params,"lvvip",true) == 0)
  437. {
  438. if (GetPlayerState(playerid) == 2)
  439. {
  440. new tmpcar = GetPlayerVehicleID(playerid);
  441. SetVehiclePos(tmpcar, 1875.7731, 1366.0796, 16.8998);
  442. if(GetPVarInt(playerid, "tpDeliverVehTimer") > 0)
  443. SetPVarInt(playerid, "tpJustEntered", 1);
  444. SetPlayerFacingAngle(playerid, 255.08);
  445. fVehSpeed[playerid] = 0.0;
  446. SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have traveled to the VIP Lounge with your vehicle.");
  447. SetPlayerInterior(playerid,0);
  448. PlayerInfo[playerid][pInt] = 0;
  449. SetPlayerVirtualWorld(playerid, 0);
  450. PlayerInfo[playerid][pVW] = 0;
  451. }
  452. else
  453. {
  454. SendClientMessageEx(playerid, COLOR_GRAD1, " You are not in a vehicle!");
  455. }
  456. }
  457. if(strcmp(params,"fc",true) == 0)
  458. {
  459. if (GetPlayerState(playerid) == 2)
  460. {
  461. new tmpcar = GetPlayerVehicleID(playerid);
  462. SetVehiclePos(tmpcar, 162.7059, 1180.0232, 14.6859);
  463. if(GetPVarInt(playerid, "tpDeliverVehTimer") > 0)
  464. SetPVarInt(playerid, "tpJustEntered", 1);
  465. SetPlayerFacingAngle(playerid, 255.08);
  466. fVehSpeed[playerid] = 0.0;
  467. SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have traveled to the VIP Lounge with your vehicle.");
  468. SetPlayerInterior(playerid,0);
  469. PlayerInfo[playerid][pInt] = 0;
  470. SetPlayerVirtualWorld(playerid, 0);
  471. PlayerInfo[playerid][pVW] = 0;
  472. }
  473. else
  474. {
  475. SendClientMessageEx(playerid, COLOR_GRAD1, " You are not in a vehicle!");
  476. }
  477. }
  478. if(strcmp(params,"bayside",true) == 0)
  479. {
  480. if (GetPlayerState(playerid) == 2)
  481. {
  482. new tmpcar = GetPlayerVehicleID(playerid);
  483. SetVehiclePos(tmpcar, -2465.7285, 2238.6355, 4.6803);
  484. if(GetPVarInt(playerid, "tpDeliverVehTimer") > 0)
  485. SetPVarInt(playerid, "tpJustEntered", 1);
  486. SetPlayerFacingAngle(playerid, 255.08);
  487. fVehSpeed[playerid] = 0.0;
  488. SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have traveled to the VIP Lounge with your vehicle.");
  489. SetPlayerInterior(playerid,0);
  490. PlayerInfo[playerid][pInt] = 0;
  491. SetPlayerVirtualWorld(playerid, 0);
  492. PlayerInfo[playerid][pVW] = 0;
  493. }
  494. else
  495. {
  496. SendClientMessageEx(playerid, COLOR_GRAD1, " You are not in a vehicle!");
  497. }
  498. }
  499. if(strcmp(params,"flint",true) == 0)
  500. {
  501. if (GetPlayerState(playerid) == 2)
  502. {
  503. new tmpcar = GetPlayerVehicleID(playerid);
  504. SetVehiclePos(tmpcar, -79.608451, -1192.061157, 1.463104);
  505. SetVehicleZAngle(tmpcar, 73.97);
  506. if(GetPVarInt(playerid, "tpDeliverVehTimer") > 0)
  507. SetPVarInt(playerid, "tpJustEntered", 1);
  508. SetPlayerFacingAngle(playerid, 73.97);
  509. fVehSpeed[playerid] = 0.0;
  510. SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have traveled to Flint County with your vehicle.");
  511. SetPlayerInterior(playerid,0);
  512. PlayerInfo[playerid][pInt] = 0;
  513. SetPlayerVirtualWorld(playerid, 0);
  514. PlayerInfo[playerid][pVW] = 0;
  515. }
  516. else
  517. {
  518. SendClientMessageEx(playerid, COLOR_GRAD1, " You are not in a vehicle!");
  519. }
  520. }
  521. }
  522. }
  523. return 1;
  524. }
  525. CMD:viplocker(playerid, params[]) {
  526. #if defined zombiemode
  527. if(zombieevent == 1 && GetPVarType(playerid, "pIsZombie")) return SendClientMessageEx(playerid, COLOR_GREY, "Zombies can't use this.");
  528. #endif
  529. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2555.747314, 1404.106079, 7699.584472) /*LS Main*/
  530. || IsPlayerInRangeOfPoint(playerid, 7.0, 1832.0533, 1380.7281, 1464.3822) /*LV Main*/
  531. || IsPlayerInRangeOfPoint(playerid, 7.0, 772.4844, 1715.7213, 1938.0391) /*LV Plat*/
  532. || IsPlayerInRangeOfPoint(playerid, 7.0, 1378.0017, 1747.4668, 927.3564) /*Olympics*/)
  533. switch(PlayerInfo[playerid][pDonateRank]) {
  534. case 0: SendClientMessageEx(playerid, COLOR_GRAD2, "You're not a VIP.");
  535. case 1: ShowPlayerDialogEx(playerid, 7483, DIALOG_STYLE_LIST, "VIP Locker", "First Aid Kit (Free)\nKevlar Vest ($15000)\nWeapons\nClothes Corner\nJob Center\nVIP Color", "Select", "Cancel");
  536. case 2: ShowPlayerDialogEx(playerid, 7483, DIALOG_STYLE_LIST, "VIP Locker", "First Aid Kit (Free)\nKevlar Vest ($10000)\nWeapons\nClothes Corner\nJob Center\nVIP Color", "Select", "Cancel");
  537. default: ShowPlayerDialogEx(playerid, 7483, DIALOG_STYLE_LIST, "VIP Locker", "First Aid Kit (Free)\nKevlar Vest (Free)\nWeapons\nClothes Corner\nJob Center\nVIP Color", "Select", "Cancel");
  538. }
  539. else SendClientMessageEx(playerid, COLOR_GRAD2, "You're not at the VIP locker.");
  540. return 1;
  541. }
  542. CMD:v(playerid, params[]) {
  543. if(PlayerInfo[playerid][pJailTime] && strfind(PlayerInfo[playerid][pPrisonReason], "[OOC]", true) != -1) return SendClientMessageEx(playerid, COLOR_GREY, "OOC prisoners are restricted to only speak in /b");
  544. if(PlayerInfo[playerid][pDonateRank] >= 1 || PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pVIPMod]) {
  545. if(isnull(params)) {
  546. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /v [message]");
  547. }
  548. else if(gettime() < GetPVarInt(playerid, "timeVIP")) {
  549. new
  550. szMessage[64];
  551. format(szMessage, sizeof(szMessage), "You must wait %d seconds before speaking again in this channel.", GetPVarInt(playerid, "timeVIP") - gettime());
  552. SendClientMessageEx(playerid, COLOR_GREY, szMessage);
  553. }
  554. else if(PlayerInfo[playerid][pToggledChats][9]) {
  555. SendClientMessageEx(playerid, COLOR_GREY, "You have VIP chat toggled - /tog vip to enable it.");
  556. }
  557. else if(PlayerInfo[playerid][pVMuted] > 0) {
  558. SendClientMessageEx(playerid, COLOR_GREY, "You are muted from the VIP chat channel.");
  559. }
  560. else {
  561. if(novip && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessageEx(playerid, COLOR_GREY, "The VIP chat has been disabled by an administrator.");
  562. new szMessage[128];
  563. if(PlayerInfo[playerid][pAdmin] >= 2 && !GetPVarType(playerid, "Undercover"))
  564. {
  565. format(szMessage, sizeof(szMessage), "** %s %s: %s", GetAdminRankName(PlayerInfo[playerid][pAdmin]), GetPlayerNameEx(playerid), params);
  566. }
  567. else if(GetPVarType(playerid, "Undercover") || PlayerInfo[playerid][pDonateRank] > 0 || PlayerInfo[playerid][pVIPMod])
  568. {
  569. if(PlayerInfo[playerid][pVIPMod] == 1) format(szMessage, sizeof(szMessage), "-- VIP Moderator %s: %s", GetPlayerNameEx(playerid), params);
  570. else if(PlayerInfo[playerid][pVIPMod] == 2) format(szMessage, sizeof(szMessage), "-- Senior VIP Moderator %s: %s", GetPlayerNameEx(playerid), params);
  571. else format(szMessage, sizeof(szMessage), "-- %s %s: %s", GetVIPRankName(PlayerInfo[playerid][pDonateRank]), GetPlayerNameEx(playerid), params);
  572. SetPVarInt(playerid, "timeVIP", gettime()+5);
  573. }
  574. SendVIPMessage(COLOR_VIP, szMessage);
  575. }
  576. }
  577. return 1;
  578. }
  579. CMD:searchvipm(playerid, params[])
  580. {
  581. if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pShopTech] >= 1)
  582. {
  583. new
  584. count,
  585. vipm,
  586. string[128];
  587. if(sscanf(params, "d", vipm)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /searchvipm [vipm]");
  588. foreach(new i: Player)
  589. {
  590. if(PlayerInfo[i][pVIPM] == vipm)
  591. {
  592. format(string, sizeof(string), "%s (%d) | VIPM: %d", GetPlayerNameEx(i), i, vipm);
  593. SendClientMessageEx(playerid, COLOR_WHITE, string);
  594. count++;
  595. }
  596. if(PlayerInfo[i][pVIPMO] == vipm)
  597. {
  598. format(string, sizeof(string), "%s (%d) | VIPM Old: %d", GetPlayerNameEx(i), i, vipm);
  599. SendClientMessageEx(playerid, COLOR_WHITE, string);
  600. count++;
  601. }
  602. else if(count == 0) return SendClientMessageEx(playerid, COLOR_WHITE, "No person online matched that VIPM number.");
  603. }
  604. }
  605. return 1;
  606. }
  607. CMD:sellvip(playerid, params[]) {
  608. if(!(1 <= PlayerInfo[playerid][pDonateRank] <= 3)) {
  609. SendClientMessageEx(playerid, COLOR_GREY, "You can only sell Bronze, Silver, and Gold VIP.");
  610. }
  611. else if(PlayerInfo[playerid][pVIPM] == 0) {
  612. SendClientMessageEx(playerid, COLOR_GREY, "You currently don't have a VIP ID assigned. Contact a Shop Tech.");
  613. }
  614. else if(PlayerInfo[playerid][pVIPSellable] == 1)
  615. {
  616. SendClientMessageEx(playerid, COLOR_GREY, "Your VIP is not sellable.");
  617. }
  618. else if(PlayerInfo[playerid][pVIPExpire] - 604800 < gettime()) {
  619. SendClientMessageEx(playerid, COLOR_GREY, "Your VIP expires in less than a week - you can't sell it.");
  620. }
  621. else if(PlayerInfo[playerid][pVIPSold] > gettime()) {
  622. SendClientMessageEx(playerid, COLOR_GREY, "You can only sell your VIP once every two hours.");
  623. }
  624. else {
  625. new
  626. player,
  627. price,
  628. string[128],
  629. viptype[7];
  630. if(sscanf(params, "ud", player, price)) {
  631. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /sellvip [player] [price]");
  632. }
  633. else if(price < 0) {
  634. SendClientMessageEx(playerid, COLOR_GREY, "The price can't be below zero.");
  635. }
  636. else if(player == playerid) {
  637. SendClientMessageEx(playerid, COLOR_WHITE, "You can't sell VIP to yourself.");
  638. }
  639. else if(!IsPlayerConnected(player)) {
  640. SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
  641. }
  642. else if(PlayerInfo[player][pVIPSold] > gettime()) {
  643. SendClientMessageEx(playerid, COLOR_GREY, "That person can only buy VIP once every two hours.");
  644. }
  645. else if (ProxDetectorS(10.0, playerid, player))
  646. {
  647. switch(PlayerInfo[playerid][pDonateRank])
  648. {
  649. case 1: viptype = "Bronze";
  650. case 2: viptype = "Silver";
  651. case 3: viptype = "Gold";
  652. default: viptype = "Error";
  653. }
  654. SetPVarInt(player, "VIPSell", playerid);
  655. SetPVarInt(player, "VIPCost", price);
  656. SetPVarString(player, "VIPSeller", GetPlayerNameEx(playerid));
  657. format(string, sizeof(string), "Seller: %s\nVIP level: %s \nPrice: %d \nVIP ID: %d\nExpires: %s\n\nDo you wish to purchase %s VIP from %s for $%d?", GetPlayerNameEx(playerid), viptype, price, PlayerInfo[playerid][pVIPM], date(PlayerInfo[playerid][pVIPExpire], 2), viptype, GetPlayerNameEx(playerid), price);
  658. ShowPlayerDialogEx(player, SELLVIP, DIALOG_STYLE_MSGBOX, "Purchase VIP", string, "Purchase", "Decline");
  659. format(string, sizeof(string), "You offered %s $%d for your %s VIP.", GetPlayerNameEx(player), price, viptype);
  660. SendClientMessageEx(playerid, COLOR_WHITE, string);
  661. }
  662. else SendClientMessageEx(playerid, COLOR_GREY, "That person is not near you.");
  663. }
  664. return 1;
  665. }
  666. CMD:newgvip(playerid, params[])
  667. {
  668. if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pShopTech] >= 2)
  669. {
  670. new
  671. iOrderID,
  672. iTargetID,
  673. szIP[16],
  674. szMessage[128];
  675. if(sscanf(params, "ud", iTargetID, iOrderID)) {
  676. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /newgvip [Player] [OrderID]");
  677. }
  678. else if(!IsPlayerConnected(iTargetID)) {
  679. SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
  680. }
  681. else {
  682. if(PlayerInfo[iTargetID][pGVip] != 0 && GetPVarInt(playerid, "ConfirmGVip") == 0) {
  683. SetPVarInt(playerid, "ConfirmGVip", 1);
  684. SendClientMessageEx(playerid, COLOR_WHITE, "That person has been issued gold vip before, if you are sure you want to issue him gold vip again");
  685. SendClientMessageEx(playerid, COLOR_WHITE, "re-type this command (/newgvip). If he ordered a gold vip renewal use the other command (/renewgvip).");
  686. }
  687. else
  688. {
  689. DeletePVar(playerid, "ConfirmGVip");
  690. if(PlayerInfo[iTargetID][pVIPM] != 0) {
  691. PlayerInfo[iTargetID][pVIPMO] = PlayerInfo[iTargetID][pVIPM];
  692. PlayerInfo[iTargetID][pVIPM] = VIPM;
  693. VIPM++;
  694. } else {
  695. PlayerInfo[iTargetID][pVIPM] = VIPM;
  696. VIPM++;
  697. }
  698. PlayerInfo[iTargetID][pVIPExpire] = gettime()+2592000;
  699. format(szMessage, sizeof(szMessage), "AdmCmd: %s has set %s's VIP level to Gold (3).", GetPlayerNameEx(playerid), GetPlayerNameEx(iTargetID));
  700. ABroadCast(COLOR_LIGHTRED,szMessage, 1337);
  701. format(szMessage, sizeof(szMessage), "Your VIP level has been set to Gold by Admin %s.", GetPlayerNameEx(playerid));
  702. SendClientMessageEx(iTargetID, COLOR_WHITE, szMessage);
  703. if (PlayerInfo[playerid][pAdmin] < 1337) {
  704. format(szMessage, sizeof(szMessage), "AdmCmd: %s has set %s's VIP level to Gold (3).", GetPlayerNameEx(playerid), GetPlayerNameEx(iTargetID));
  705. SendClientMessageEx(playerid, COLOR_LIGHTRED, szMessage);
  706. }
  707. PlayerInfo[iTargetID][pDonateRank] = 3;
  708. PlayerInfo[iTargetID][pTempVIP] = 0;
  709. PlayerInfo[iTargetID][pBuddyInvited] = 0;
  710. PlayerInfo[iTargetID][pGVip] = 1;
  711. LoadPlayerDisabledVehicles(iTargetID);
  712. GetPlayerIp(iTargetID, szIP, sizeof(szIP));
  713. format(szMessage, sizeof(szMessage), "[GVIP] %s has set %s's(%d) (IP:%s) VIP level to Gold (3). (VIPM - %d | OrderID - %d)", GetPlayerNameEx(playerid), GetPlayerNameEx(iTargetID), GetPlayerSQLId(iTargetID), szIP, PlayerInfo[iTargetID][pVIPM], iOrderID);
  714. Log("logs/setvip.log", szMessage);
  715. }
  716. }
  717. }
  718. else
  719. {
  720. SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command.");
  721. }
  722. return 1;
  723. }
  724. CMD:renewgvip(playerid, params[])
  725. {
  726. if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pASM] >= 1 || PlayerInfo[playerid][pShopTech] >= 1)
  727. {
  728. new
  729. iOrderID,
  730. iTargetID,
  731. szIP[16],
  732. szMessage[128],
  733. months;
  734. if(sscanf(params, "udd", iTargetID, iOrderID, months)) {
  735. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /renewgvip [player] [order ID] [months]");
  736. }
  737. else if(!IsPlayerConnected(iTargetID)) {
  738. SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
  739. }
  740. else if(PlayerInfo[iTargetID][pGVip] == 0) {
  741. SendClientMessageEx(playerid, COLOR_GREY, "That person has never purchased Gold VIP.");
  742. }
  743. else {
  744. if(PlayerInfo[iTargetID][pVIPM] != 0) {
  745. PlayerInfo[iTargetID][pVIPMO] = PlayerInfo[iTargetID][pVIPM];
  746. PlayerInfo[iTargetID][pVIPM] = VIPM;
  747. VIPM++;
  748. } else {
  749. PlayerInfo[iTargetID][pVIPM] = VIPM;
  750. VIPM++;
  751. }
  752. PlayerInfo[iTargetID][pVIPExpire] = gettime()+(2592000*months);
  753. format(szMessage, sizeof(szMessage), "AdmCmd: %s has set %s's VIP level to Gold (3).", GetPlayerNameEx(playerid), GetPlayerNameEx(iTargetID));
  754. ABroadCast(COLOR_LIGHTRED,szMessage, 1337);
  755. format(szMessage, sizeof(szMessage), "Your VIP level has been set to Gold by Admin %s.", GetPlayerNameEx(playerid));
  756. SendClientMessageEx(iTargetID, COLOR_WHITE, szMessage);
  757. if (PlayerInfo[playerid][pAdmin] < 1337) {
  758. format(szMessage, sizeof(szMessage), "AdmCmd: %s has set %s's VIP level to Gold (3).", GetPlayerNameEx(playerid), GetPlayerNameEx(iTargetID));
  759. SendClientMessageEx(playerid, COLOR_LIGHTRED, szMessage);
  760. }
  761. PlayerInfo[iTargetID][pDonateRank] = 3;
  762. PlayerInfo[iTargetID][pTempVIP] = 0;
  763. PlayerInfo[iTargetID][pBuddyInvited] = 0;
  764. GetPlayerIp(iTargetID, szIP, sizeof(szIP));
  765. format(szMessage, sizeof(szMessage), "[GVIP RENEWAL] %s has set %s's(%d) (IP:%s) VIP level to Gold (3). (VIPM - %d | OrderID - %d | Months: %d)", GetPlayerNameEx(playerid), GetPlayerNameEx(iTargetID), GetPlayerSQLId(iTargetID), szIP, PlayerInfo[iTargetID][pVIPM], iOrderID, months);
  766. Log("logs/setvip.log", szMessage);
  767. }
  768. }
  769. else
  770. {
  771. SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command.");
  772. }
  773. return 1;
  774. }
  775. CMD:setvip(playerid, params[])
  776. {
  777. if (PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pShopTech] >= 1)
  778. {
  779. new string[128], giveplayerid, level, months, orderid[32];
  780. if(sscanf(params, "udds[32]", giveplayerid, level, months, orderid))
  781. {
  782. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /setvip [player] [level] [months] [orderID]");
  783. SendClientMessageEx(playerid, COLOR_GRAD3, "Available Levels: |0| None |1| Bronze |2| Silver |4| Platinum");
  784. return 1;
  785. }
  786. if(IsPlayerConnected(giveplayerid))
  787. {
  788. if(giveplayerid != INVALID_PLAYER_ID)
  789. {
  790. if(level < 0 || level > 4) return SendClientMessageEx(playerid, COLOR_GRAD1, "VIP Level can not be below 0 or above 4!");
  791. if(level == 3) return SendClientMessage(playerid, COLOR_GRAD1, "VIP Level can not be set to 3 through this command");
  792. new playerip[32];
  793. GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
  794. if(level == 0)
  795. {
  796. if (PlayerInfo[playerid][pAdmin] < 1337)
  797. {
  798. format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to None (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
  799. SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
  800. }
  801. format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to None (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
  802. ABroadCast(COLOR_LIGHTRED,string, 1337);
  803. format(string, sizeof(string), "Your VIP level has been set to None by Admin %s.", GetPlayerNameEx(playerid));
  804. SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
  805. PlayerInfo[giveplayerid][pTokens] = 0;
  806. format(string, sizeof(string), "AdmCmd: %s has set %s's(%d) (IP:%s) VIP level to None (%d) (order #%s)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), playerip, level, orderid);
  807. Log("logs/setvip.log", string);
  808. }
  809. if(level == 1)
  810. {
  811. if (PlayerInfo[playerid][pAdmin] < 1337)
  812. {
  813. format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Bronze (%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level, orderid);
  814. SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
  815. }
  816. if(PlayerInfo[giveplayerid][pVIPM] == 0)
  817. {
  818. PlayerInfo[giveplayerid][pVIPM] = VIPM;
  819. VIPM++;
  820. }
  821. format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Bronze (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
  822. ABroadCast(COLOR_LIGHTRED,string, 1337);
  823. format(string, sizeof(string), "Your VIP level has been set to Bronze by Admin %s.", GetPlayerNameEx(playerid));
  824. SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
  825. format(string, sizeof(string), "AdmCmd: %s has set %s's(%d) (IP:%s) VIP level to Bronze (%d) (order #%s)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), playerip, level, orderid);
  826. Log("logs/setvip.log", string);
  827. }
  828. if(level == 2)
  829. {
  830. if (PlayerInfo[playerid][pAdmin] < 1337)
  831. {
  832. format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Silver (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
  833. SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
  834. }
  835. if(PlayerInfo[giveplayerid][pVIPM] == 0)
  836. {
  837. PlayerInfo[giveplayerid][pVIPM] = VIPM;
  838. VIPM++;
  839. }
  840. format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Silver (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
  841. ABroadCast(COLOR_LIGHTRED,string, 1337);
  842. format(string, sizeof(string), "Your VIP level has been set to Silver by Admin %s.", GetPlayerNameEx(playerid));
  843. SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
  844. format(string, sizeof(string), "AdmCmd: %s has set %s's(%d) (IP:%s) VIP level to Silver (%d) (order #%s)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), playerip, level, orderid);
  845. Log("logs/setvip.log", string);
  846. }
  847. if(level == 3)
  848. {
  849. if(!GetPVarType(playerid, "ConfirmGold")) {
  850. SendClientMessageEx(playerid, COLOR_WHITE, "You are about to set someone's vip level to gold. If this is a gold vip order please use the new system.");
  851. SendClientMessageEx(playerid, COLOR_WHITE, "For a new purchase of Gold Vip use(/newgvip). For renewals use(/renewgvip). If you wish to continue using this command type it again(/setvip)");
  852. SetPVarInt(playerid, "ConfirmGold", 1);
  853. return 1;
  854. }
  855. else {
  856. DeletePVar(playerid, "ConfirmGold");
  857. if (PlayerInfo[playerid][pAdmin] < 1337)
  858. {
  859. format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Gold (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
  860. SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
  861. }
  862. if(PlayerInfo[giveplayerid][pVIPM] == 0)
  863. {
  864. PlayerInfo[giveplayerid][pVIPM] = VIPM;
  865. VIPM++;
  866. }
  867. format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Gold (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
  868. ABroadCast(COLOR_LIGHTRED,string, 1337);
  869. format(string, sizeof(string), "Your VIP level has been set to Gold by Admin %s.", GetPlayerNameEx(playerid));
  870. SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
  871. format(string, sizeof(string), "AdmCmd: %s has set %s's(%d) (IP:%s) VIP level to Gold (%d) (order #%s)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), playerip, level, orderid);
  872. Log("logs/setvip.log", string);
  873. }
  874. }
  875. if(level == 4)
  876. {
  877. if (PlayerInfo[giveplayerid][pAdmin] < 1337)
  878. {
  879. format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Platinum (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
  880. SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
  881. }
  882. if(PlayerInfo[giveplayerid][pVIPM] == 0)
  883. {
  884. PlayerInfo[giveplayerid][pVIPM] = VIPM;
  885. VIPM++;
  886. }
  887. format(string, sizeof(string), "AdmCmd: %s has set %s's VIP level to Platinum (%d).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), level);
  888. ABroadCast(COLOR_LIGHTRED,string, 1337);
  889. format(string, sizeof(string), "Your VIP level has been set to Platinum by Admin %s.", GetPlayerNameEx(playerid));
  890. SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
  891. PlayerInfo[giveplayerid][pVIPExpire] = gettime()+2592000*months;
  892. // Level 5 Arms Job - Platinum VIP
  893. PlayerInfo[giveplayerid][pArmsSkill] = 1200;
  894. format(string, sizeof(string), "AdmCmd: %s has set %s's(%d) (IP:%s) VIP level to Platinum (%d) (order #%s)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), playerip, level, orderid);
  895. Log("logs/setvip.log", string);
  896. }
  897. PlayerInfo[giveplayerid][pDonateRank] = level;
  898. if(months > 0) PlayerInfo[giveplayerid][pVIPExpire] = gettime()+2592000*months;
  899. else PlayerInfo[giveplayerid][pVIPExpire] = 0;
  900. PlayerInfo[giveplayerid][pTempVIP] = 0;
  901. PlayerInfo[giveplayerid][pBuddyInvited] = 0;
  902. PlayerInfo[giveplayerid][pVIPSellable] = 0;
  903. LoadPlayerDisabledVehicles(giveplayerid);
  904. }
  905. Misc_Save();
  906. }
  907. }
  908. else
  909. {
  910. SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
  911. }
  912. return 1;
  913. }
  914. CMD:giftgvip(playerid, params[])
  915. {
  916. if (PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pShopTech] >= 1)
  917. {
  918. new string[128], giveplayerid, days,reason[32];
  919. if(sscanf(params, "uds[32]", giveplayerid, days, reason))
  920. {
  921. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /giftgvip [player] [days] [reason]");
  922. return 1;
  923. }
  924. if(IsPlayerConnected(giveplayerid))
  925. {
  926. PlayerInfo[giveplayerid][pDonateRank] = 3;
  927. PlayerInfo[giveplayerid][pTempVIP] = 0;
  928. PlayerInfo[giveplayerid][pBuddyInvited] = 0;
  929. new playerip[32];
  930. GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
  931. PlayerInfo[giveplayerid][pVIPExpire] = gettime()+86400*days;
  932. format(string, sizeof(string), "AdmCmd: %s has gifted %s Gold VIP for %d days (%s)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), days, reason);
  933. ABroadCast(COLOR_LIGHTRED,string, 1337);
  934. format(string, sizeof(string), "Your VIP level has been set to Gold by Admin %s.", GetPlayerNameEx(playerid));
  935. SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
  936. format(string, sizeof(string), "AdmCmd: %s has gifted %s(%d) Gold VIP for %d days (%s)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), days, reason);
  937. Log("logs/setvip.log", string);
  938. return 1;
  939. }
  940. }
  941. else
  942. {
  943. SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
  944. }
  945. return 1;
  946. }
  947. CMD:vsuspend(playerid, params[])
  948. {
  949. if(PlayerInfo[playerid][pAdmin] >= 1337)
  950. {
  951. new string[128], giveplayerid;
  952. if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /vsuspend [player]");
  953. if(IsPlayerConnected(giveplayerid))
  954. {
  955. format(string, sizeof(string), "AdmCmd: %s(%d) has been VIP suspended by %s.", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), GetPlayerNameEx(playerid));
  956. Log("logs/admin.log", string);
  957. format(string, sizeof(string), "AdmCmd: %s has been VIP suspended by %s.", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
  958. ABroadCast(COLOR_LIGHTRED, string, 2);
  959. if(PlayerInfo[playerid][pAdmin] == 0)
  960. {
  961. SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
  962. }
  963. PlayerInfo[giveplayerid][pDonateRank] = 0;
  964. format(string, sizeof(string), "Your VIP has been suspended by %s. You may appeal this on the forums (admin complaint).", GetPlayerNameEx(playerid));
  965. }
  966. }
  967. else
  968. {
  969. SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
  970. }
  971. return 1;
  972. }
  973. CMD:respawnvipcars(playerid, params[])
  974. {
  975. if (PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pASM] >= 1)
  976. {
  977. for(new i = 0; i < sizeof(VIPVehicles); i++)
  978. {
  979. if(!IsVehicleOccupied(VIPVehicles[i]))
  980. {
  981. SetVehicleVirtualWorld(VIPVehicles[i], 0);
  982. LinkVehicleToInterior(VIPVehicles[i], 0);
  983. SetVehicleToRespawn(VIPVehicles[i]);
  984. }
  985. }
  986. SendClientMessageEx(playerid, COLOR_GREY, "You have respawned all unoccupied VIP Vehicles.");
  987. }
  988. return 1;
  989. }
  990. CMD:vmute(playerid, params[])
  991. {
  992. if (PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pVIPMod])
  993. {
  994. new string[128], giveplayerid;
  995. if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /vmute [player]");
  996. if(IsPlayerConnected(giveplayerid))
  997. {
  998. if(PlayerInfo[giveplayerid][pAdmin] >= 2) return SendClientMessageEx(playerid, COLOR_GRAD2, "You cannot mute admins from VIP Chat!");
  999. if(PlayerInfo[giveplayerid][pVMuted] == 0)
  1000. {
  1001. PlayerInfo[giveplayerid][pVMuted] = 1;
  1002. format(string, sizeof(string), "AdmCmd: %s has indefinitely blocked %s from using VIP Chat.",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  1003. if(PlayerInfo[playerid][pAdmin] < 2)
  1004. {
  1005. SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
  1006. }
  1007. ABroadCast(COLOR_LIGHTRED,string,2);
  1008. format(string, sizeof(string), "You have been indefinitely muted from VIP Chat for abuse by %s. You may appeal this on the forums (admin complaint)", GetPlayerNameEx(playerid));
  1009. SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
  1010. format(string, sizeof(string), "AdmCmd: %s(%d) was blocked from /v by %s(%d)", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), GetPlayerNameEx(playerid), GetPlayerSQLId(playerid));
  1011. Log("logs/mute.log", string);
  1012. }
  1013. else
  1014. {
  1015. PlayerInfo[giveplayerid][pVMuted] = 0;
  1016. format(string, sizeof(string), "AdmCmd: %s has been re-allowed to use VIP Chat by %s.",GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
  1017. if(PlayerInfo[playerid][pAdmin] < 2)
  1018. {
  1019. SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
  1020. }
  1021. ABroadCast(COLOR_LIGHTRED,string,2);
  1022. format(string, sizeof(string), "You have been re-allowed to use VIP Chat by %s.", GetPlayerNameEx(playerid));
  1023. SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
  1024. format(string, sizeof(string), "AdmCmd: %s(%d) was unblocked from /v by %s(%d)", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), GetPlayerNameEx(playerid), GetPlayerSQLId(playerid));
  1025. Log("logs/mute.log", string);
  1026. }
  1027. }
  1028. }
  1029. else
  1030. {
  1031. SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
  1032. }
  1033. return 1;
  1034. }
  1035. CMD:vto(playerid, params[])
  1036. {
  1037. if (PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pASM] >= 1 || PlayerInfo[playerid][pVIPMod])
  1038. {
  1039. new string[128], giveplayerid, reason[64];
  1040. if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /vto [player] [reason]");
  1041. if(IsPlayerConnected(giveplayerid))
  1042. {
  1043. if(PlayerInfo[giveplayerid][pVMuted] == 0)
  1044. {
  1045. PlayerInfo[giveplayerid][pVMuted] = 2;
  1046. PlayerInfo[giveplayerid][pVMutedTime] = 15*60;
  1047. format(string, sizeof(string), "AdmCmd: %s has temporarily blocked %s from using VIP Chat, reason: %s",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), reason);
  1048. ABroadCast(COLOR_LIGHTRED,string,2);
  1049. if(PlayerInfo[playerid][pAdmin] < 2)
  1050. {
  1051. SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
  1052. }
  1053. format(string, sizeof(string), "You have been temporarily blocked from using VIP Chat by %s, reason: %s.", GetPlayerNameEx(playerid), reason);
  1054. SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
  1055. SendClientMessageEx(giveplayerid, COLOR_GRAD2, "You will not be able to use VIP Chat for 15 minutes.");
  1056. SendClientMessageEx(giveplayerid, COLOR_GRAD2, "Note the future abuse of VIP Chat could result in loss of that privilege altogether or being banned from the server.");
  1057. format(string, sizeof(string), "AdmCmd: %s(%d) was temporarily blocked from VIP Chat by %s(%d), reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), reason);
  1058. Log("logs/mute.log", string);
  1059. }
  1060. else
  1061. {
  1062. SendClientMessageEx(playerid, COLOR_GRAD2, "That person is already disabled from VIP Chat.");
  1063. }
  1064. }
  1065. }
  1066. else
  1067. {
  1068. SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
  1069. }
  1070. return 1;
  1071. }
  1072. CMD:vtoreset(playerid, params[])
  1073. {
  1074. if (PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pASM] >= 1 || PlayerInfo[playerid][pVIPMod])
  1075. {
  1076. new string[128], giveplayerid, reason[64];
  1077. if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /vtoreset [player] [reason]");
  1078. if(IsPlayerConnected(giveplayerid))
  1079. {
  1080. if(PlayerInfo[giveplayerid][pVMuted] == 2)
  1081. {
  1082. PlayerInfo[giveplayerid][pVMuted] = 0;
  1083. PlayerInfo[giveplayerid][pVMutedTime] = 0;
  1084. format(string, sizeof(string), "AdmCmd: %s has unblocked %s from using VIP Chat, reason: %s",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), reason);
  1085. if(PlayerInfo[playerid][pAdmin] < 2)
  1086. {
  1087. SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
  1088. }
  1089. ABroadCast(COLOR_LIGHTRED,string,2);
  1090. SendClientMessageEx(giveplayerid, COLOR_GRAD2, "You have been unblocked from using VIP Chat. You may now use the VIP Chat system again.");
  1091. SendClientMessageEx(giveplayerid, COLOR_GRAD2, "Please accept our apologies for any error and inconvenience this may have caused.");
  1092. format(string, sizeof(string), "AdmCmd: %s(%d) was unblocked from VIP Chat by %s(%d), reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), reason);
  1093. Log("logs/mute.log", string);
  1094. }
  1095. else
  1096. {
  1097. SendClientMessageEx(playerid, COLOR_GRAD2, "That person is not temporarily disabled from VIP Chat.");
  1098. }
  1099. }
  1100. }
  1101. else
  1102. {
  1103. SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
  1104. }
  1105. return 1;
  1106. }
  1107. CMD:vipplate(playerid, params[])
  1108. {
  1109. if(PlayerInfo[playerid][pDonateRank] < 4) return SendClientMessageEx(playerid, COLOR_GRAD1, "You are not a Platinum VIP+");
  1110. if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /vipplate [use/remove]");
  1111. for(new d = 0 ; d < MAX_PLAYERVEHICLES; d++)
  1112. {
  1113. if(IsPlayerInVehicle(playerid, PlayerVehicleInfo[playerid][d][pvId]))
  1114. {
  1115. new Float: vHealth;
  1116. GetVehicleHealth(PlayerVehicleInfo[playerid][d][pvId], vHealth);
  1117. if(vHealth < 800) return SendClientMessageEx(playerid, COLOR_LIGHTRED, "Please repair your vehicle before replacing your plate.");
  1118. new string[64];
  1119. if(strcmp(params, "remove", true) == 0)
  1120. {
  1121. PlayerVehicleInfo[playerid][d][pvPlate] = 0;
  1122. SendClientMessageEx(playerid, COLOR_YELLOW, "Your vehicle will now appear with the default plate, parking your vehicle momentarily...");
  1123. cmd_park(playerid, params); //Save a few lines of code here xD
  1124. }
  1125. else if(strcmp(params, "use", true) == 0)
  1126. {
  1127. format(string, sizeof(string), "{800080}PVIP");
  1128. format(PlayerVehicleInfo[playerid][d][pvPlate], 32, "%s", string);
  1129. SendClientMessageEx(playerid, COLOR_YELLOW, "Your vehicle will now appear with the PVIP Plate, parking your vehicle momentarily...");
  1130. cmd_park(playerid, params); //Save a few lines of code here xD
  1131. }
  1132. else
  1133. {
  1134. SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /vipplate [use/remove]");
  1135. }
  1136. return 1;
  1137. }
  1138. }
  1139. SendClientMessageEx(playerid, COLOR_GRAD2, "You're not inside a vehicle that you own!");
  1140. return 1;
  1141. }
  1142. CMD:spawnatvip(playerid, params[])
  1143. {
  1144. if(PlayerInfo[playerid][pDonateRank] > 2) return SendClientMessageEx(playerid, COLOR_GREY, "You are already able to get an insurance inside the Gold VIP+ room.");
  1145. if(PlayerInfo[playerid][pDonateRank] != 2) return SendClientMessageEx(playerid, COLOR_GREY, "You are not a Silver VIP+!");
  1146. if(PlayerInfo[playerid][pVIPSpawn] > 0) return SendClientMessageEx(playerid, COLOR_GREY, "You already bought a spawn at the Gold VIP+ room, you will be able to use it after your next death.");
  1147. if(!GetPVarType(playerid, "PinConfirmed")) return PinLogin(playerid);
  1148. if(PlayerInfo[playerid][pCredits] < 10) return SendClientMessageEx(playerid, COLOR_GREY, "You need 10 credits to buy a spawn at the Gold VIP+ room. Visit shop.ng-gaming.net to purchase credits.");
  1149. new string[128];
  1150. SetPVarInt(playerid, "MiscShop", 9);
  1151. format(string, sizeof(string), "Spawn at Gold VIP+ room\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[30][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[30][sItemPrice]));
  1152. ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Purchase a spawn at Gold VIP+ room", string, "Purchase", "Cancel");
  1153. return 1;
  1154. }
  1155. CMD:pvipjob(playerid, params[])
  1156. {
  1157. if(PlayerInfo[playerid][pDonateRank] < 4) return SendClientMessageEx(playerid, COLOR_GREY, "You are not a Platinum VIP+");
  1158. if(PlayerInfo[playerid][pVIPJob] < 1) return SendClientMessageEx(playerid, COLOR_GREY, "You have already used this feature.");
  1159. SendClientMessageEx(playerid, COLOR_YELLOW, "You can select one job to be set to level 5 as a Platinum VIP+");
  1160. ShowPlayerDialogEx(playerid, DIALOG_VIPJOB, DIALOG_STYLE_LIST, "Job List", "Detective\nLawyer\nWhore\nDrugs Dealer\nDrug Smuggling\nArms Dealer\nCar Mechanic\nBoxer\nFishing\nShipment Contractor\nLock Picking", "Select", "Close");
  1161. return 1;
  1162. }
  1163. CMD:ovmute(playerid, params[])
  1164. {
  1165. if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pASM] < 1 && PlayerInfo[playerid][pShopTech] < 3) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use this command.");
  1166. new query[256], tmpName[MAX_PLAYER_NAME];
  1167. if(sscanf(params, "s[24]", tmpName)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /ovmute [player name]");
  1168. new giveplayerid = ReturnUser(tmpName);
  1169. if(IsPlayerConnected(giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "This player is currently connected, please use /vmute.");
  1170. mysql_escape_string(params, tmpName);
  1171. SetPVarString(playerid, "OnSetVMute", tmpName);
  1172. mysql_format(MainPipeline, query,sizeof(query),"UPDATE `accounts` SET `VIPMuted` = 1 WHERE `Username`= '%s' AND `AdminLevel` < 4", tmpName);
  1173. mysql_tquery(MainPipeline, query, "OnSetVMute", "ii", playerid, 1);
  1174. format(query, sizeof(query), "Attempting to vip mute %s's account.", tmpName);
  1175. SendClientMessageEx(playerid, COLOR_YELLOW, query);
  1176. return 1;
  1177. }
  1178. CMD:ovunmute(playerid, params[])
  1179. {
  1180. if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pASM] < 1 && PlayerInfo[playerid][pShopTech] < 3) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use this command.");
  1181. new query[256], tmpName[MAX_PLAYER_NAME];
  1182. if(sscanf(params, "s[24]", tmpName)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /ovunmute [player name]");
  1183. new giveplayerid = ReturnUser(tmpName);
  1184. if(IsPlayerConnected(giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "This player is currently connected, please use /vmute.");
  1185. mysql_escape_string(params, tmpName);
  1186. SetPVarString(playerid, "OnSetVMute", tmpName);
  1187. mysql_format(MainPipeline, query,sizeof(query),"UPDATE `accounts` SET `VIPMuted` = 0 WHERE `Username`= '%s' AND `AdminLevel` < 4", tmpName);
  1188. mysql_tquery(MainPipeline, query, "OnSetVMute", "ii", playerid, 2);
  1189. format(query, sizeof(query), "Attempting to vip unmute %s's account.", tmpName);
  1190. SendClientMessageEx(playerid, COLOR_YELLOW, query);
  1191. return 1;
  1192. }
  1193. CMD:togvipm(playerid, params[])
  1194. {
  1195. if(!PlayerInfo[playerid][pVIPMod] && PlayerInfo[playerid][pShopTech] < 3 && PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessageEx(playerid, COLOR_GRAD1, "You're not authorized to use this command!");
  1196. if(GetPVarInt(playerid, "vStaffChat") == 1)
  1197. {
  1198. SendClientMessageEx(playerid, COLOR_GRAD1, "** You have disabled VIP staff chat.");
  1199. return SetPVarInt(playerid, "vStaffChat", 0);
  1200. }
  1201. else
  1202. {
  1203. SendClientMessageEx(playerid, COLOR_GRAD1, "** You have enabled VIP staff chat.");
  1204. return SetPVarInt(playerid, "vStaffChat", 1);
  1205. }
  1206. }
  1207. CMD:vipm(playerid, params[])
  1208. {
  1209. if(PlayerInfo[playerid][pJailTime] && strfind(PlayerInfo[playerid][pPrisonReason], "[OOC]", true) != -1) return SendClientMessageEx(playerid, COLOR_GREY, "OOC prisoners are restricted to only speak in /b");
  1210. if(!PlayerInfo[playerid][pVIPMod] && PlayerInfo[playerid][pShopTech] < 3 && PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessageEx(playerid, COLOR_GRAD1, "You're not authorized to use this command!");
  1211. if(GetPVarInt(playerid, "vStaffChat") == 0) return SendClientMessageEx(playerid, COLOR_GREY, "You have VIP staff chat disabled - /togvipm to enable it.");
  1212. if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /vipm [text]");
  1213. new szMessage[128];
  1214. if(PlayerInfo[playerid][pVIPMod] == 1) format(szMessage, sizeof(szMessage), "* VIP Moderator %s: %s", GetPlayerNameEx(playerid), params);
  1215. else if(PlayerInfo[playerid][pVIPMod] == 2) format(szMessage, sizeof(szMessage), "* Senior VIP Moderator %s: %s", GetPlayerNameEx(playerid), params);
  1216. else if(PlayerInfo[playerid][pShopTech] >= 3) format(szMessage, sizeof(szMessage), "* DoCR %s: %s", GetPlayerNameEx(playerid), params);
  1217. else if(PlayerInfo[playerid][pAdmin] == 99999) format(szMessage, sizeof(szMessage), "* Executive Admin %s: %s", GetPlayerNameEx(playerid), params);
  1218. else format(szMessage, sizeof(szMessage), "* Undefined Rank %s: %s", GetPlayerNameEx(playerid), params);
  1219. foreach(new i: Player)
  1220. {
  1221. if((PlayerInfo[i][pVIPMod] || PlayerInfo[i][pShopTech] >= 3 || PlayerInfo[i][pAdmin] >= 1338) && GetPVarInt(i, "vStaffChat") == 1)
  1222. {
  1223. SendClientMessageEx(i, 0xff0066FF, szMessage);
  1224. }
  1225. }
  1226. return 1;
  1227. }
  1228. CMD:makevipmod(playerid, params[])
  1229. {
  1230. if(PlayerInfo[playerid][pShopTech] < 3 && PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessageEx(playerid, COLOR_GRAD1, "You're not authorized to use this command!");
  1231. new target, level;
  1232. szMiscArray[0] = 0;
  1233. if(sscanf(params, "ud", target, level)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /makevipmod [player] [level(0-2)])");
  1234. if(!IsPlayerConnected(target)) return SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid player specified.");
  1235. if(!(0 <= level <= 2)) return SendClientMessageEx(playerid, COLOR_GREY, "Valid levels are 0 - 2");
  1236. if(PlayerInfo[target][pVIPMod] == level) return SendClientMessageEx(playerid, COLOR_GREY, "This person already has this level.");
  1237. if(PlayerInfo[target][pStaffBanned] >= 1) return SendClientMessage(playerid, COLOR_WHITE, "That player is currently staff banned.");
  1238. switch(level)
  1239. {
  1240. case 0: format(szMiscArray, sizeof(szMiscArray), "AdmCmd: %s has removed %s's VIP Moderator rank.", GetPlayerNameEx(playerid), GetPlayerNameEx(target));
  1241. case 1: format(szMiscArray, sizeof(szMiscArray), "AdmCmd: %s has made %s a VIP Moderator.", GetPlayerNameEx(playerid), GetPlayerNameEx(target));
  1242. case 2: format(szMiscArray, sizeof(szMiscArray), "AdmCmd: %s has made %s a Senior VIP Moderator.", GetPlayerNameEx(playerid), GetPlayerNameEx(target));
  1243. }
  1244. Log("logs/admin.log", szMiscArray);
  1245. switch(level)
  1246. {
  1247. case 0: format(szMiscArray, sizeof(szMiscArray), "Your VIP Moderator rank has been removed by %s.", GetPlayerNameEx(playerid));
  1248. case 1: format(szMiscArray, sizeof(szMiscArray), "You have been made a VIP Moderator by %s.", GetPlayerNameEx(playerid));
  1249. case 2: format(szMiscArray, sizeof(szMiscArray), "You have been made a Senior VIP Moderator by %s.", GetPlayerNameEx(playerid));
  1250. }
  1251. SendClientMessageEx(target, COLOR_LIGHTBLUE, szMiscArray);
  1252. switch(level)
  1253. {
  1254. case 0: format(szMiscArray, sizeof(szMiscArray), "You have removed %s's VIP Moderator rank.", GetPlayerNameEx(target));
  1255. case 1: format(szMiscArray, sizeof(szMiscArray), "You have made %s a VIP Moderator.", GetPlayerNameEx(target));
  1256. case 2: format(szMiscArray, sizeof(szMiscArray), "You have made %s a Senior VIP Moderator.", GetPlayerNameEx(target));
  1257. }
  1258. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, szMiscArray);
  1259. PlayerInfo[target][pVIPMod] = level;
  1260. return 1;
  1261. }
  1262. CMD:vipmods(playerid, params[])
  1263. {
  1264. if(PlayerInfo[playerid][pShopTech] < 3) return SendClientMessageEx(playerid, COLOR_GRAD1, "You're not authorized to use this command!");
  1265. SendClientMessageEx(playerid, -1, "VIP Moderators Online:");
  1266. foreach(Player, i)
  1267. {
  1268. if(PlayerInfo[i][pVIPMod])
  1269. {
  1270. format(szMiscArray, sizeof(szMiscArray), "%s %s - VIP Chat %s", PlayerInfo[i][pVIPMod] == 1 ? ("VIP Moderator"):("Senior VIP Moderator"), GetPlayerNameEx(i), PlayerInfo[playerid][pToggledChats][9] == 0 ? ("On"):("Off"));
  1271. SendClientMessageEx(playerid, -1, szMiscArray);
  1272. }
  1273. }
  1274. return 1;
  1275. }
  1276. CMD:novip(playerid, params[])
  1277. {
  1278. if(PlayerInfo[playerid][pAdmin] >= 3)
  1279. {
  1280. if (!novip)
  1281. {
  1282. novip = 1;
  1283. foreach(new p: Player) {
  1284. if(PlayerInfo[p][pDonateRank] > 0 || PlayerInfo[p][pVIPMod] || PlayerInfo[p][pAdmin] > 1) {
  1285. SendClientMessageEx(p, COLOR_VIP, "** System: VIP chat channel has been disabled by an Admin!");
  1286. }
  1287. }
  1288. }
  1289. else
  1290. {
  1291. novip = 0;
  1292. foreach(new p: Player) {
  1293. if(PlayerInfo[p][pDonateRank] > 0 || PlayerInfo[p][pVIPMod] || PlayerInfo[p][pAdmin] > 1) {
  1294. SendClientMessageEx(p, COLOR_VIP, "** System: VIP chat channel has been enabled by an Admin!");
  1295. }
  1296. }
  1297. }
  1298. }
  1299. else
  1300. {
  1301. SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
  1302. }
  1303. return 1;
  1304. }