1
0

helpcmds.pwn 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712
  1. /*
  2. /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$$
  3. | $$$ | $$ /$$__ $$ | $$__ $$| $$__ $$
  4. | $$$$| $$| $$ \__/ | $$ \ $$| $$ \ $$
  5. | $$ $$ $$| $$ /$$$$ /$$$$$$| $$$$$$$/| $$$$$$$/
  6. | $$ $$$$| $$|_ $$|______/| $$__ $$| $$____/
  7. | $$\ $$$| $$ \ $$ | $$ \ $$| $$
  8. | $$ \ $$| $$$$$$/ | $$ | $$| $$
  9. |__/ \__/ \______/ |__/ |__/|__/
  10. Help Commands
  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. Types/Subtypes
  33. 1) Administrator
  34. 0) All/undefined
  35. 1) Retired Administrator/SSM
  36. 2) Server Moderator
  37. 3) Watchdog
  38. 4) Junior Administrator
  39. 5) General Administrator
  40. 6) Assistant Shift Manager
  41. 7) Senior Administrator
  42. 8) Head Administrator
  43. 9) Executive Administrator
  44. 10) SA-MP Operations
  45. 11) Human Resources
  46. 12) Faction Moderator
  47. 13) Gang Moderator
  48. 14) Business Moderator
  49. 15) Special Operations
  50. 16) Shop Technician
  51. 17) Public Relations
  52. 18) Ban Appealer
  53. 2) Advisor
  54. 0) All/undefined
  55. 1) Helper
  56. 2) Community Advisor
  57. 3) Senior Advisor
  58. 4) Chief Advisor
  59. 3) Famed
  60. 0) All/undefined
  61. 1) Old-School
  62. 2) Chartered Old-School
  63. 3) Famed
  64. 4) Famed Commissioner
  65. 6) Famed Vice-Chairman
  66. 4) Newbie
  67. 5) General
  68. 6) Account
  69. 7) Chat
  70. 8) Shop
  71. 9) Job
  72. 1) Detective
  73. 2) Lawyer
  74. 3) Whore
  75. 4) Drug Dealer
  76. 5) [UNDEFINED]
  77. 6) [UNDEFINED]
  78. 7) Mechanic
  79. 8) Bodyguard
  80. 9) Arms Dealer
  81. 10) Car Dealer
  82. 11) [UNDEFINED]
  83. 12) Boxer
  84. 13) [UNDEFINED]
  85. 14) Drug Smuggler
  86. 15) Paper Boy
  87. 16) Trucker
  88. 17) Taxi Driver
  89. 18) Craftsman
  90. 19) Bartender
  91. 20) Shipment Contractor
  92. 21) Pizza Boy
  93. 10) Group
  94. 1) LEA/Cops
  95. 2) Hitman
  96. 3) Medic
  97. 4) News
  98. 5) Government
  99. 6) Judicial
  100. 7) Transportation
  101. 8) Towing
  102. 9) Criminal/Gang
  103. 10) Racing
  104. 11) Group Leader
  105. 1) LEA/Cops
  106. 2) Hitman
  107. 3) Medic
  108. 4) News
  109. 5) Government
  110. 6) Judicial
  111. 7) Transportation
  112. 8) Towing
  113. 9) Criminal/Gang
  114. 10) Racing
  115. 11) Business
  116. 1) Gas Station
  117. 2) Clothing
  118. 3) Restaurant
  119. 4) Gun Shop
  120. 5) New Car Dealership
  121. 6) Used Car Dealership
  122. 7) Mechanic
  123. 8) Store
  124. 9) Bar
  125. 10) Club
  126. 11) Sex Shop
  127. 12) Gym
  128. 13) Casino
  129. 12) VIP
  130. 2) Silver VIP
  131. 3) Gold VIP
  132. 4) Platinum VIP
  133. 5) VIP Moderator
  134. 13) Other
  135. 1) Animation
  136. 2) Backpack
  137. 3) Car
  138. 4) Cellphone
  139. 5) Fish
  140. 6) House
  141. 7) Mail
  142. 8) Rent
  143. 9) Toy
  144. 10) Voucher
  145. */
  146. #include <YSI\y_hooks>
  147. hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  148. {
  149. new string[128];
  150. if(arrAntiCheat[playerid][ac_iFlags][AC_DIALOGSPOOFING] > 0) return 1;
  151. switch(dialogid)
  152. {
  153. case DIALOG_HELPCATMAIN:
  154. {
  155. if(response)
  156. {
  157. format(string, sizeof(string), "HelpResultMainCat%i", listitem);
  158. if(GetPVarType(playerid, string))
  159. {
  160. switch(GetPVarInt(playerid, string))
  161. {
  162. case 0: Help_ListCat(playerid, DIALOG_HELPSEARCH0, response, listitem);
  163. case 1: Help_ListCat(playerid, DIALOG_HELPCATADMIN, response, listitem);
  164. case 2: Help_ListCat(playerid, DIALOG_HELPCATADVISOR, response, listitem);
  165. case 3: Help_ListCat(playerid, DIALOG_HELPCATFAMED, response, listitem);
  166. case 4: Help_ListCat(playerid, DIALOG_HELPCATNEWB, response, listitem);
  167. case 5: Help_ListCat(playerid, DIALOG_HELPCATGENERAL, response, listitem);
  168. case 6: Help_ListCat(playerid, DIALOG_HELPCATACCOUNT, response, listitem);
  169. case 7: Help_ListCat(playerid, DIALOG_HELPCATCHAT, response, listitem);
  170. case 8: Help_ListCat(playerid, DIALOG_HELPCATSHOP, response, listitem);
  171. case 9: Help_ListCat(playerid, DIALOG_HELPCATJOB, response, listitem);
  172. case 10: Help_ListCat(playerid, DIALOG_HELPCATGROUP, response, listitem);
  173. case 11: Help_ListCat(playerid, DIALOG_HELPCATBUSINESS, response, listitem);
  174. case 12: Help_ListCat(playerid, DIALOG_HELPCATVIP, response, listitem);
  175. case 13: Help_ListCat(playerid, DIALOG_HELPCATOTHER, response, listitem);
  176. default: Help_ListCat(playerid, DIALOG_HELPCATMAIN);
  177. }
  178. DeletePVar(playerid, string);
  179. }
  180. }
  181. }
  182. case DIALOG_HELPSEARCH0:
  183. {
  184. Help_ListCat(playerid, DIALOG_HELPSEARCH0, response, listitem);
  185. }
  186. case DIALOG_HELPSEARCH1:
  187. {
  188. if(response) Help_ListCat(playerid, DIALOG_HELPSEARCH1, response, listitem);
  189. else Help_ListCat(playerid, DIALOG_HELPCATMAIN, response, listitem);
  190. }
  191. case DIALOG_HELPSEARCH2:
  192. {
  193. if(strlen(inputtext) < 2) return Help_ListCat(playerid, DIALOG_HELPSEARCH_INPUTLIMIT, response, listitem);
  194. if(response) Help_ListCat(playerid, DIALOG_HELPSEARCH2, response, listitem, inputtext);
  195. else Help_ListCat(playerid, DIALOG_HELPSEARCH0, response, listitem);
  196. }
  197. case DIALOG_HELPSEARCH3:
  198. {
  199. if(response) Help_ListCat(playerid, DIALOG_HELPSEARCH3, response, listitem);
  200. else Help_ListCat(playerid, DIALOG_HELPSEARCH0, response, listitem);
  201. }
  202. case DIALOG_HELPSEARCH4:
  203. {
  204. if(response) Help_ListCat(playerid, DIALOG_HELPSEARCH4, response, listitem);
  205. else
  206. {
  207. switch(GetPVarInt(playerid, "HelpCancelCopy"))
  208. {
  209. case 0: Help_ListCat(playerid, DIALOG_HELPSEARCH0, response, listitem);
  210. case 1: Help_ListCat(playerid, DIALOG_HELPCATADMIN, response, listitem);
  211. case 2: Help_ListCat(playerid, DIALOG_HELPCATADVISOR, response, listitem);
  212. case 3: Help_ListCat(playerid, DIALOG_HELPCATFAMED, response, listitem);
  213. case 4: Help_ListCat(playerid, DIALOG_HELPCATNEWB, response, listitem);
  214. case 5: Help_ListCat(playerid, DIALOG_HELPCATGENERAL, response, listitem);
  215. case 6: Help_ListCat(playerid, DIALOG_HELPCATACCOUNT, response, listitem);
  216. case 7: Help_ListCat(playerid, DIALOG_HELPCATCHAT, response, listitem);
  217. case 8: Help_ListCat(playerid, DIALOG_HELPCATSHOP, response, listitem);
  218. case 9: Help_ListCat(playerid, DIALOG_HELPCATJOB, response, listitem);
  219. case 10: Help_ListCat(playerid, DIALOG_HELPCATGROUP, response, listitem);
  220. case 12: Help_ListCat(playerid, DIALOG_HELPCATBUSINESS, response, listitem);
  221. case 13: Help_ListCat(playerid, DIALOG_HELPCATVIP, response, listitem);
  222. case 14: Help_ListCat(playerid, DIALOG_HELPCATOTHER, response, listitem);
  223. }
  224. DeletePVar(playerid, "HelpCancelCopy");
  225. }
  226. }
  227. case DIALOG_HELPCATADMIN:
  228. {
  229. if(response) Help_ListCat(playerid, DIALOG_HELPCATADMIN1, response, listitem);
  230. else Help_ListCat(playerid, DIALOG_HELPCATMAIN, response, listitem);
  231. }
  232. case DIALOG_HELPCATADVISOR:
  233. {
  234. if(response) Help_ListCat(playerid, DIALOG_HELPCATADVISOR1, response, listitem);
  235. else Help_ListCat(playerid, DIALOG_HELPCATMAIN, response, listitem);
  236. }
  237. case DIALOG_HELPCATFAMED:
  238. {
  239. if(response) Help_ListCat(playerid, DIALOG_HELPCATFAMED1, response, listitem);
  240. else Help_ListCat(playerid, DIALOG_HELPCATMAIN, response, listitem);
  241. }
  242. case DIALOG_HELPCATNEWB:
  243. {
  244. if(response) Help_ListCat(playerid, DIALOG_HELPCATNEWB1, response, listitem);
  245. else Help_ListCat(playerid, DIALOG_HELPCATMAIN, response, listitem);
  246. }
  247. case DIALOG_HELPCATGENERAL:
  248. {
  249. if(response) Help_ListCat(playerid, DIALOG_HELPCATGENERAL1, response, listitem);
  250. else Help_ListCat(playerid, DIALOG_HELPCATMAIN, response, listitem);
  251. }
  252. case DIALOG_HELPCATACCOUNT:
  253. {
  254. if(response) Help_ListCat(playerid, DIALOG_HELPCATACCOUNT1, response, listitem);
  255. else Help_ListCat(playerid, DIALOG_HELPCATMAIN, response, listitem);
  256. }
  257. case DIALOG_HELPCATCHAT:
  258. {
  259. if(response) Help_ListCat(playerid, DIALOG_HELPCATCHAT1, response, listitem);
  260. else Help_ListCat(playerid, DIALOG_HELPCATMAIN, response, listitem);
  261. }
  262. case DIALOG_HELPCATSHOP:
  263. {
  264. if(response) Help_ListCat(playerid, DIALOG_HELPCATSHOP1, response, listitem);
  265. else Help_ListCat(playerid, DIALOG_HELPCATMAIN, response, listitem);
  266. }
  267. case DIALOG_HELPCATJOB:
  268. {
  269. if(response) Help_ListCat(playerid, DIALOG_HELPCATJOB1, response, listitem);
  270. else Help_ListCat(playerid, DIALOG_HELPCATMAIN, response, listitem);
  271. }
  272. case DIALOG_HELPCATGROUP:
  273. {
  274. if(response) Help_ListCat(playerid, DIALOG_HELPCATGROUP1, response, listitem);
  275. else Help_ListCat(playerid, DIALOG_HELPCATMAIN, response, listitem);
  276. }
  277. case DIALOG_HELPCATBUSINESS:
  278. {
  279. if(response) Help_ListCat(playerid, DIALOG_HELPCATBUSINESS1, response, listitem);
  280. else Help_ListCat(playerid, DIALOG_HELPCATMAIN, response, listitem);
  281. }
  282. case DIALOG_HELPCATVIP:
  283. {
  284. if(response) Help_ListCat(playerid, DIALOG_HELPCATVIP1, response, listitem);
  285. else Help_ListCat(playerid, DIALOG_HELPCATMAIN, response, listitem);
  286. }
  287. case DIALOG_HELPCATOTHER:
  288. {
  289. if(response) Help_ListCat(playerid, DIALOG_HELPCATOTHER1, response, listitem);
  290. else Help_ListCat(playerid, DIALOG_HELPCATMAIN, response, listitem);
  291. }
  292. case DIALOG_HELPSEARCH_INPUTLIMIT:
  293. {
  294. Help_ListCat(playerid, DIALOG_HELPSEARCH0, response, listitem);
  295. }
  296. }
  297. return 0;
  298. }
  299. stock LoadHelp()
  300. {
  301. printf("[LoadHelp] Loading data from database...");
  302. mysql_tquery(MainPipeline, "SELECT * FROM `help` ORDER BY `Type` ASC, `Subtype` ASC, `Name` ASC", true, "OnLoadHelp", "");
  303. }
  304. stock RehashHelp()
  305. {
  306. printf("[RehashHelp] Clearing in-game help data...");
  307. for(new i = 0; i < sizeof(Help); i++)
  308. {
  309. Help[i][HelpID] = -1;
  310. Help[i][HelpName] = EOS;
  311. Help[i][HelpParam] = EOS;
  312. Help[i][HelpDesc] = EOS;
  313. Help[i][HelpType] = -1;
  314. Help[i][HelpSubtype] = -1;
  315. Help[i][HelpLevel] = -1;
  316. }
  317. LoadHelp();
  318. return 1;
  319. }
  320. forward OnLoadHelp();
  321. public OnLoadHelp()
  322. {
  323. new i, rows, fields;
  324. szMiscArray[0] = 0;
  325. cache_get_data(rows, fields, MainPipeline);
  326. while(i < rows)
  327. {
  328. Help[i][HelpID] = cache_get_field_content_int(i, "id", MainPipeline);
  329. cache_get_field_content(i, "Name", Help[i][HelpName], MainPipeline, 128);
  330. cache_get_field_content(i, "Parameters", Help[i][HelpParam], MainPipeline, 128);
  331. cache_get_field_content(i, "Description", Help[i][HelpDesc], MainPipeline, 128);
  332. Help[i][HelpType] = cache_get_field_content_int(i, "Type", MainPipeline);
  333. Help[i][HelpSubtype] = cache_get_field_content_int(i, "Subtype", MainPipeline);
  334. Help[i][HelpLevel] = cache_get_field_content_int(i, "Level", MainPipeline);
  335. i++;
  336. }
  337. if(i > 0) printf("[LoadHelp] %d help entries rehashed/loaded.", i);
  338. else printf("[LoadHelp] Failed to load any help entries.");
  339. }
  340. stock Help_ListCat(playerid, dialogid = DIALOG_HELPCATMAIN, response = 0, listitem = 0, inputtext[] = 0)
  341. {
  342. new string[256];
  343. switch(dialogid)
  344. {
  345. case DIALOG_HELPCATMAIN:
  346. {
  347. new iGroupID = PlayerInfo[playerid][pMember], j = 0;
  348. format(szMiscArray, sizeof(szMiscArray), "Search\n");
  349. format(string, sizeof(string), "HelpResultMainCat%i", j);
  350. SetPVarInt(playerid, string, 0);
  351. j++;
  352. if(PlayerInfo[playerid][pAdmin] >= 1)
  353. {
  354. format(szMiscArray, sizeof(szMiscArray), "%sAdministrator\n", szMiscArray);
  355. format(string, sizeof(string), "HelpResultMainCat%i", j);
  356. SetPVarInt(playerid, string, 1);
  357. j++;
  358. }
  359. if(PlayerInfo[playerid][pHelper] >= 1)
  360. {
  361. format(szMiscArray, sizeof(szMiscArray), "%sAdvisor\n", szMiscArray);
  362. format(string, sizeof(string), "HelpResultMainCat%i", j);
  363. SetPVarInt(playerid, string, 2);
  364. j++;
  365. }
  366. if(PlayerInfo[playerid][pFamed] >= 1)
  367. {
  368. format(szMiscArray, sizeof(szMiscArray), "%sFamed\n", szMiscArray);
  369. format(string, sizeof(string), "HelpResultMainCat%i", j);
  370. SetPVarInt(playerid, string, 3);
  371. j++;
  372. }
  373. if(PlayerInfo[playerid][pLevel] <= 3)
  374. {
  375. format(szMiscArray, sizeof(szMiscArray), "%sNewbie Help\n", szMiscArray);
  376. format(string, sizeof(string), "HelpResultMainCat%i", j);
  377. SetPVarInt(playerid, string, 4);
  378. j++;
  379. }
  380. format(szMiscArray, sizeof(szMiscArray), "%sGeneral\n", szMiscArray);
  381. format(string, sizeof(string), "HelpResultMainCat%i", j);
  382. SetPVarInt(playerid, string, 5);
  383. j++;
  384. format(szMiscArray, sizeof(szMiscArray), "%sAccount\n", szMiscArray);
  385. format(string, sizeof(string), "HelpResultMainCat%i", j);
  386. SetPVarInt(playerid, string, 6);
  387. j++;
  388. format(szMiscArray, sizeof(szMiscArray), "%sChat\n", szMiscArray);
  389. format(string, sizeof(string), "HelpResultMainCat%i", j);
  390. SetPVarInt(playerid, string, 7);
  391. j++;
  392. format(szMiscArray, sizeof(szMiscArray), "%sShop\n", szMiscArray);
  393. format(string, sizeof(string), "HelpResultMainCat%i", j);
  394. SetPVarInt(playerid, string, 8);
  395. j++;
  396. format(szMiscArray, sizeof(szMiscArray), "%sJob\n", szMiscArray);
  397. format(string, sizeof(string), "HelpResultMainCat%i", j);
  398. SetPVarInt(playerid, string, 9);
  399. j++;
  400. if(iGroupID != INVALID_GROUP_ID)
  401. {
  402. format(szMiscArray, sizeof(szMiscArray), "%sGroup\n", szMiscArray);
  403. format(string, sizeof(string), "HelpResultMainCat%i", j);
  404. SetPVarInt(playerid, string, 10);
  405. j++;
  406. }
  407. if(IsValidBusinessID(PlayerInfo[playerid][pBusiness]))
  408. {
  409. format(szMiscArray, sizeof(szMiscArray), "%sBusiness\n", szMiscArray);
  410. format(string, sizeof(string), "HelpResultMainCat%i", j);
  411. SetPVarInt(playerid, string, 11);
  412. j++;
  413. }
  414. if(PlayerInfo[playerid][pDonateRank] || PlayerInfo[playerid][pVIPMod])
  415. {
  416. format(szMiscArray, sizeof(szMiscArray), "%sVIP\n", szMiscArray);
  417. format(string, sizeof(string), "HelpResultMainCat%i", j);
  418. SetPVarInt(playerid, string, 12);
  419. j++;
  420. }
  421. format(szMiscArray, sizeof(szMiscArray), "%sOther", szMiscArray);
  422. format(string, sizeof(string), "HelpResultMainCat%i", j);
  423. SetPVarInt(playerid, string, 13);
  424. ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  425. }
  426. case DIALOG_HELPSEARCH0: ShowPlayerDialogEx(playerid, DIALOG_HELPSEARCH1, DIALOG_STYLE_LIST, "Help System - Search", "Search by Command & Description\nSearch by Command Only\nSearch by Description Only", "Select", "Go Back");
  427. case DIALOG_HELPSEARCH1:
  428. {
  429. SetPVarInt(playerid, "HelpSearchType", listitem);
  430. switch(listitem)
  431. {
  432. case 0: ShowPlayerDialogEx(playerid, DIALOG_HELPSEARCH2, DIALOG_STYLE_INPUT, "Help System - Search (Command & Description)", "Search:", "Search", "Go Back");
  433. case 1: ShowPlayerDialogEx(playerid, DIALOG_HELPSEARCH2, DIALOG_STYLE_INPUT, "Help System - Search (Command)", "Search:", "Search", "Go Back");
  434. case 2: ShowPlayerDialogEx(playerid, DIALOG_HELPSEARCH2, DIALOG_STYLE_INPUT, "Help System - Search (Description)", "Search:", "Search", "Go Back");
  435. }
  436. }
  437. case DIALOG_HELPSEARCH2:
  438. {
  439. Help_GenerateCMDList(playerid, GetPVarInt(playerid, "HelpSearchType"), -1, 0, 0, inputtext);
  440. DeletePVar(playerid, "HelpSearchType");
  441. format(string, sizeof(string), "Help System - Search Results for '%s'", inputtext);
  442. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPSEARCH3, DIALOG_STYLE_LIST, string, szMiscArray, "Select", "Go Back");
  443. else ShowPlayerDialogEx(playerid, DIALOG_HELPSEARCH0, DIALOG_STYLE_MSGBOX, string, "No results found! Please try another search term.", "Go Back", "");
  444. }
  445. case DIALOG_HELPSEARCH3:
  446. {
  447. format(string, sizeof(string), "HelpResult%i", listitem);
  448. SetPVarInt(playerid, "HelpCancelCopy", 0);
  449. Help_ShowCMD(playerid, GetPVarInt(playerid, string), DIALOG_HELPSEARCH4);
  450. }
  451. case DIALOG_HELPSEARCH4:
  452. {
  453. Help_SendToChat(playerid, response, GetPVarInt(playerid, "TmpCMD"));
  454. DeletePVar(playerid, "TmpCMD");
  455. }
  456. case DIALOG_HELPSEARCH_INPUTLIMIT:
  457. {
  458. ShowPlayerDialogEx(playerid, DIALOG_HELPSEARCH_INPUTLIMIT, DIALOG_STYLE_MSGBOX, "Help System - Search", "Minimum of 2 characters required to search!", "Go Back", "");
  459. }
  460. case DIALOG_HELPCATADMIN:
  461. {
  462. new j = 0;
  463. if(Help_Perm(playerid, 1, 1, 1))
  464. {
  465. format(string, sizeof(string), "HelpResultCat%i", j);
  466. SetPVarInt(playerid, string, 1);
  467. j++;
  468. format(szMiscArray, sizeof(szMiscArray), "Retired Administrator\n");
  469. }
  470. if(Help_Perm(playerid, 1, 2, 1))
  471. {
  472. format(string, sizeof(string), "HelpResultCat%i", j);
  473. SetPVarInt(playerid, string, 2);
  474. j++;
  475. format(szMiscArray, sizeof(szMiscArray), "%sServer Moderator\n", szMiscArray);
  476. }
  477. if(Help_Perm(playerid, 1, 3, 1))
  478. {
  479. format(string, sizeof(string), "HelpResultCat%i", j);
  480. SetPVarInt(playerid, string, 3);
  481. j++;
  482. format(szMiscArray, sizeof(szMiscArray), "%sWatchdog\n", szMiscArray);
  483. }
  484. if(Help_Perm(playerid, 1, 4, 1))
  485. {
  486. format(string, sizeof(string), "HelpResultCat%i", j);
  487. SetPVarInt(playerid, string, 4);
  488. j++;
  489. format(szMiscArray, sizeof(szMiscArray), "%sJunior Administrator\n", szMiscArray);
  490. }
  491. if(Help_Perm(playerid, 1, 5, 1))
  492. {
  493. format(string, sizeof(string), "HelpResultCat%i", j);
  494. SetPVarInt(playerid, string, 5);
  495. j++;
  496. format(szMiscArray, sizeof(szMiscArray), "%sGeneral Administrator\n", szMiscArray);
  497. }
  498. if(Help_Perm(playerid, 1, 6, 1))
  499. {
  500. format(string, sizeof(string), "HelpResultCat%i", j);
  501. SetPVarInt(playerid, string, 6);
  502. j++;
  503. format(szMiscArray, sizeof(szMiscArray), "%sAssistant Shift Manager\n", szMiscArray);
  504. }
  505. if(Help_Perm(playerid, 1, 7, 1))
  506. {
  507. format(string, sizeof(string), "HelpResultCat%i", j);
  508. SetPVarInt(playerid, string, 7);
  509. j++;
  510. format(szMiscArray, sizeof(szMiscArray), "%sSenior Administrator\n", szMiscArray);
  511. }
  512. if(Help_Perm(playerid, 1, 8, 1))
  513. {
  514. format(string, sizeof(string), "HelpResultCat%i", j);
  515. SetPVarInt(playerid, string, 8);
  516. j++;
  517. format(szMiscArray, sizeof(szMiscArray), "%sHead Administrator\n", szMiscArray);
  518. }
  519. if(Help_Perm(playerid, 1, 9, 1))
  520. {
  521. format(string, sizeof(string), "HelpResultCat%i", j);
  522. SetPVarInt(playerid, string, 9);
  523. j++;
  524. format(szMiscArray, sizeof(szMiscArray), "%sExecutive Administrator\n", szMiscArray);
  525. }
  526. if(Help_Perm(playerid, 1, 10, 1))
  527. {
  528. format(string, sizeof(string), "HelpResultCat%i", j);
  529. SetPVarInt(playerid, string, 10);
  530. j++;
  531. format(szMiscArray, sizeof(szMiscArray), "%sSA-MP Operations\n", szMiscArray);
  532. }
  533. if(Help_Perm(playerid, 1, 11, 1))
  534. {
  535. format(string, sizeof(string), "HelpResultCat%i", j);
  536. SetPVarInt(playerid, string, 11);
  537. j++;
  538. format(szMiscArray, sizeof(szMiscArray), "%sHuman Resources\n", szMiscArray);
  539. }
  540. if(Help_Perm(playerid, 1, 12, 1))
  541. {
  542. format(string, sizeof(string), "HelpResultCat%i", j);
  543. SetPVarInt(playerid, string, 12);
  544. j++;
  545. format(szMiscArray, sizeof(szMiscArray), "%sFaction Moderator\n", szMiscArray);
  546. }
  547. if(Help_Perm(playerid, 1, 13, 1))
  548. {
  549. format(string, sizeof(string), "HelpResultCat%i", j);
  550. SetPVarInt(playerid, string, 13);
  551. j++;
  552. format(szMiscArray, sizeof(szMiscArray), "%sGang Moderator\n", szMiscArray);
  553. }
  554. if(Help_Perm(playerid, 1, 14, 1))
  555. {
  556. format(string, sizeof(string), "HelpResultCat%i", j);
  557. SetPVarInt(playerid, string, 14);
  558. j++;
  559. format(szMiscArray, sizeof(szMiscArray), "%sBusiness Moderator\n", szMiscArray);
  560. }
  561. if(Help_Perm(playerid, 1, 15, 1))
  562. {
  563. format(string, sizeof(string), "HelpResultCat%i", j);
  564. SetPVarInt(playerid, string, 15);
  565. j++;
  566. format(szMiscArray, sizeof(szMiscArray), "%sSpecial Operations\n", szMiscArray);
  567. }
  568. if(Help_Perm(playerid, 1, 16, 1))
  569. {
  570. format(string, sizeof(string), "HelpResultCat%i", j);
  571. SetPVarInt(playerid, string, 16);
  572. j++;
  573. format(szMiscArray, sizeof(szMiscArray), "%sShop Technician\n", szMiscArray);
  574. }
  575. if(Help_Perm(playerid, 1, 17, 1))
  576. {
  577. format(string, sizeof(string), "HelpResultCat%i", j);
  578. SetPVarInt(playerid, string, 17);
  579. j++;
  580. format(szMiscArray, sizeof(szMiscArray), "%sPublic Relations\n", szMiscArray);
  581. }
  582. if(Help_Perm(playerid, 1, 18, 1))
  583. {
  584. format(string, sizeof(string), "HelpResultCat%i", j);
  585. SetPVarInt(playerid, string, 18);
  586. j++;
  587. format(szMiscArray, sizeof(szMiscArray), "%sBan Appealer\n", szMiscArray);
  588. }
  589. Help_GenerateCMDList(playerid, 3, j, 1, 0);
  590. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATADMIN, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  591. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  592. }
  593. case DIALOG_HELPCATADMIN1:
  594. {
  595. format(string, sizeof(string), "HelpResultCat%i", listitem);
  596. if(GetPVarInt(playerid, string))
  597. {
  598. Help_GenerateCMDList(playerid, 3, -1, 1, GetPVarInt(playerid, string));
  599. ClearHelpSearch(playerid, 0, 1);
  600. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATADMIN, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  601. else
  602. {
  603. SetPVarInt(playerid, "HelpResultMainCat0", 1);
  604. ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  605. }
  606. }
  607. else
  608. {
  609. format(string, sizeof(string), "HelpResult%i", listitem);
  610. SetPVarInt(playerid, "HelpCancelCopy", 1);
  611. Help_ShowCMD(playerid, GetPVarInt(playerid, string), DIALOG_HELPSEARCH4);
  612. ClearHelpSearch(playerid);
  613. }
  614. }
  615. case DIALOG_HELPCATADVISOR:
  616. {
  617. new j = 0;
  618. if(Help_Perm(playerid, 2, 1, 1))
  619. {
  620. format(string, sizeof(string), "HelpResultCat%i", j);
  621. SetPVarInt(playerid, string, 1);
  622. j++;
  623. format(szMiscArray, sizeof(szMiscArray), "Helper\n");
  624. }
  625. if(Help_Perm(playerid, 2, 2, 2))
  626. {
  627. format(string, sizeof(string), "HelpResultCat%i", j);
  628. SetPVarInt(playerid, string, 2);
  629. j++;
  630. format(szMiscArray, sizeof(szMiscArray), "%Community Advisor\n", szMiscArray);
  631. }
  632. if(Help_Perm(playerid, 2, 3, 3))
  633. {
  634. format(string, sizeof(string), "HelpResultCat%i", j);
  635. SetPVarInt(playerid, string, 3);
  636. j++;
  637. format(szMiscArray, sizeof(szMiscArray), "%Senior Advisor\n", szMiscArray);
  638. }
  639. if(Help_Perm(playerid, 2, 4, 4))
  640. {
  641. format(string, sizeof(string), "HelpResultCat%i", j);
  642. SetPVarInt(playerid, string, 4);
  643. j++;
  644. format(szMiscArray, sizeof(szMiscArray), "%sChief Advisor\n", szMiscArray);
  645. }
  646. Help_GenerateCMDList(playerid, 3, j, 2, 0);
  647. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATADVISOR, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  648. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  649. }
  650. case DIALOG_HELPCATADVISOR1:
  651. {
  652. format(string, sizeof(string), "HelpResultCat%i", listitem);
  653. if(GetPVarInt(playerid, string))
  654. {
  655. Help_GenerateCMDList(playerid, 3, -1, 2, GetPVarInt(playerid, string));
  656. ClearHelpSearch(playerid, 0, 1);
  657. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATADVISOR, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  658. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  659. }
  660. else
  661. {
  662. format(string, sizeof(string), "HelpResult%i", listitem);
  663. SetPVarInt(playerid, "HelpCancelCopy", 2);
  664. Help_ShowCMD(playerid, GetPVarInt(playerid, string), DIALOG_HELPSEARCH4);
  665. ClearHelpSearch(playerid);
  666. }
  667. }
  668. case DIALOG_HELPCATFAMED:
  669. {
  670. new j = 0;
  671. if(Help_Perm(playerid, 3, 1, 1))
  672. {
  673. format(string, sizeof(string), "HelpResultCat%i", j);
  674. SetPVarInt(playerid, string, 1);
  675. j++;
  676. format(szMiscArray, sizeof(szMiscArray), "Old-School\n");
  677. }
  678. if(Help_Perm(playerid, 3, 2, 2))
  679. {
  680. format(string, sizeof(string), "HelpResultCat%i", j);
  681. SetPVarInt(playerid, string, 2);
  682. j++;
  683. format(szMiscArray, sizeof(szMiscArray), "%sChartered Old-School\n", szMiscArray);
  684. }
  685. if(Help_Perm(playerid, 3, 3, 3))
  686. {
  687. format(string, sizeof(string), "HelpResultCat%i", j);
  688. SetPVarInt(playerid, string, 3);
  689. j++;
  690. format(szMiscArray, sizeof(szMiscArray), "%Famed\n", szMiscArray);
  691. }
  692. if(Help_Perm(playerid, 3, 4, 4))
  693. {
  694. format(string, sizeof(string), "HelpResultCat%i", j);
  695. SetPVarInt(playerid, string, 4);
  696. j++;
  697. format(szMiscArray, sizeof(szMiscArray), "%sFamed Commissioner\n", szMiscArray);
  698. }
  699. if(Help_Perm(playerid, 3, 6, 6))
  700. {
  701. format(string, sizeof(string), "HelpResultCat%i", j);
  702. SetPVarInt(playerid, string, 6);
  703. j++;
  704. format(szMiscArray, sizeof(szMiscArray), "%sFamed Vice-Chairman\n", szMiscArray);
  705. }
  706. Help_GenerateCMDList(playerid, 3, j, 3, 0);
  707. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATFAMED, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  708. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  709. }
  710. case DIALOG_HELPCATFAMED1:
  711. {
  712. format(string, sizeof(string), "HelpResultCat%i", listitem);
  713. if(GetPVarInt(playerid, string))
  714. {
  715. Help_GenerateCMDList(playerid, 3, -1, 3, GetPVarInt(playerid, string));
  716. ClearHelpSearch(playerid, 0, 1);
  717. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATFAMED, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  718. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  719. }
  720. else
  721. {
  722. format(string, sizeof(string), "HelpResult%i", listitem);
  723. SetPVarInt(playerid, "HelpCancelCopy", 3);
  724. Help_ShowCMD(playerid, GetPVarInt(playerid, string), DIALOG_HELPSEARCH4);
  725. ClearHelpSearch(playerid);
  726. }
  727. }
  728. case DIALOG_HELPCATNEWB:
  729. {
  730. Help_GenerateCMDList(playerid, 3, -1, 4, 0);
  731. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATNEWB, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  732. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  733. }
  734. case DIALOG_HELPCATNEWB1:
  735. {
  736. format(string, sizeof(string), "HelpResult%i", listitem);
  737. SetPVarInt(playerid, "HelpCancelCopy", 4);
  738. Help_ShowCMD(playerid, GetPVarInt(playerid, string), DIALOG_HELPSEARCH4);
  739. ClearHelpSearch(playerid);
  740. }
  741. case DIALOG_HELPCATGENERAL:
  742. {
  743. Help_GenerateCMDList(playerid, 3, -1, 5, 0);
  744. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATGENERAL, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  745. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  746. }
  747. case DIALOG_HELPCATGENERAL1:
  748. {
  749. format(string, sizeof(string), "HelpResult%i", listitem);
  750. SetPVarInt(playerid, "HelpCancelCopy", 5);
  751. Help_ShowCMD(playerid, GetPVarInt(playerid, string), DIALOG_HELPSEARCH4);
  752. ClearHelpSearch(playerid);
  753. }
  754. case DIALOG_HELPCATACCOUNT:
  755. {
  756. Help_GenerateCMDList(playerid, 3, -1, 6, 0);
  757. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATACCOUNT, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  758. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  759. }
  760. case DIALOG_HELPCATACCOUNT1:
  761. {
  762. format(string, sizeof(string), "HelpResult%i", listitem);
  763. SetPVarInt(playerid, "HelpCancelCopy", 6);
  764. Help_ShowCMD(playerid, GetPVarInt(playerid, string), DIALOG_HELPSEARCH4);
  765. ClearHelpSearch(playerid);
  766. }
  767. case DIALOG_HELPCATCHAT:
  768. {
  769. Help_GenerateCMDList(playerid, 3, -1, 7, 0);
  770. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATCHAT, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  771. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  772. }
  773. case DIALOG_HELPCATCHAT1:
  774. {
  775. format(string, sizeof(string), "HelpResult%i", listitem);
  776. SetPVarInt(playerid, "HelpCancelCopy", 7);
  777. Help_ShowCMD(playerid, GetPVarInt(playerid, string), DIALOG_HELPSEARCH4);
  778. ClearHelpSearch(playerid);
  779. }
  780. case DIALOG_HELPCATSHOP:
  781. {
  782. Help_GenerateCMDList(playerid, 3, -1, 8, 0);
  783. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATSHOP, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  784. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  785. }
  786. case DIALOG_HELPCATSHOP1:
  787. {
  788. format(string, sizeof(string), "HelpResult%i", listitem);
  789. SetPVarInt(playerid, "HelpCancelCopy", 8);
  790. Help_ShowCMD(playerid, GetPVarInt(playerid, string), DIALOG_HELPSEARCH4);
  791. ClearHelpSearch(playerid);
  792. }
  793. case DIALOG_HELPCATJOB:
  794. {
  795. new j = 0;
  796. if(Help_Perm(playerid, 9, 1, 0))
  797. {
  798. format(string, sizeof(string), "HelpResultCat%i", j);
  799. SetPVarInt(playerid, string, 1);
  800. j++;
  801. format(szMiscArray, sizeof(szMiscArray), "Detective\n");
  802. }
  803. if(Help_Perm(playerid, 9, 2, 0))
  804. {
  805. format(string, sizeof(string), "HelpResultCat%i", j);
  806. SetPVarInt(playerid, string, 2);
  807. j++;
  808. format(szMiscArray, sizeof(szMiscArray), "%sLawyer\n", szMiscArray);
  809. }
  810. if(Help_Perm(playerid, 9, 3, 0))
  811. {
  812. format(string, sizeof(string), "HelpResultCat%i", j);
  813. SetPVarInt(playerid, string, 3);
  814. j++;
  815. format(szMiscArray, sizeof(szMiscArray), "%sWhore\n", szMiscArray);
  816. }
  817. if(Help_Perm(playerid, 9, 4, 0))
  818. {
  819. format(string, sizeof(string), "HelpResultCat%i", j);
  820. SetPVarInt(playerid, string, 4);
  821. j++;
  822. format(szMiscArray, sizeof(szMiscArray), "%sDrug Dealer\n", szMiscArray);
  823. }
  824. if(Help_Perm(playerid, 9, 5, 0))
  825. {
  826. // Job 5 is undefined; Modify if one is added!
  827. format(string, sizeof(string), "HelpResultCat%i", j);
  828. SetPVarInt(playerid, string, 5);
  829. j++;
  830. format(szMiscArray, sizeof(szMiscArray), "%s[PLACEHOLDER]\n", szMiscArray);
  831. }
  832. if(Help_Perm(playerid, 9, 6, 0))
  833. {
  834. // Job 6 is undefined; Modify if one is added!
  835. format(string, sizeof(string), "HelpResultCat%i", j);
  836. SetPVarInt(playerid, string, 6);
  837. j++;
  838. format(szMiscArray, sizeof(szMiscArray), "%s[PLACEHOLDER]\n");
  839. }
  840. if(Help_Perm(playerid, 9, 7, 0))
  841. {
  842. format(string, sizeof(string), "HelpResultCat%i", j);
  843. SetPVarInt(playerid, string, 7);
  844. j++;
  845. format(szMiscArray, sizeof(szMiscArray), "%sMechanic\n", szMiscArray);
  846. }
  847. if(Help_Perm(playerid, 9, 8, 0))
  848. {
  849. format(string, sizeof(string), "HelpResultCat%i", j);
  850. SetPVarInt(playerid, string, 8);
  851. j++;
  852. format(szMiscArray, sizeof(szMiscArray), "%sBodyguard\n", szMiscArray);
  853. }
  854. if(Help_Perm(playerid, 9, 9, 0))
  855. {
  856. format(string, sizeof(string), "HelpResultCat%i", j);
  857. SetPVarInt(playerid, string, 9);
  858. j++;
  859. format(szMiscArray, sizeof(szMiscArray), "%sArms Dealer\n", szMiscArray);
  860. }
  861. if(Help_Perm(playerid, 9, 10, 0))
  862. {
  863. format(string, sizeof(string), "HelpResultCat%i", j);
  864. SetPVarInt(playerid, string, 10);
  865. j++;
  866. format(szMiscArray, sizeof(szMiscArray), "%sCar Dealer\n", szMiscArray);
  867. }
  868. if(Help_Perm(playerid, 9, 11, 0))
  869. {
  870. // Job 11 is undefined; Modify if one is added!
  871. format(string, sizeof(string), "HelpResultCat%i", j);
  872. SetPVarInt(playerid, string, 11);
  873. j++;
  874. format(szMiscArray, sizeof(szMiscArray), "%s[PLACEHOLDER]\n");
  875. }
  876. if(Help_Perm(playerid, 9, 12, 0))
  877. {
  878. format(string, sizeof(string), "HelpResultCat%i", j);
  879. SetPVarInt(playerid, string, 12);
  880. j++;
  881. format(szMiscArray, sizeof(szMiscArray), "%sBoxer\n", szMiscArray);
  882. }
  883. if(Help_Perm(playerid, 9, 13, 0))
  884. {
  885. // Job 13 is undefined; Modify if one is added!
  886. format(string, sizeof(string), "HelpResultCat%i", j);
  887. SetPVarInt(playerid, string, 13);
  888. j++;
  889. format(szMiscArray, sizeof(szMiscArray), "%s[PLACEHOLDER]\n", szMiscArray);
  890. }
  891. if(Help_Perm(playerid, 9, 14, 0))
  892. {
  893. format(string, sizeof(string), "HelpResultCat%i", j);
  894. SetPVarInt(playerid, string, 14);
  895. j++;
  896. format(szMiscArray, sizeof(szMiscArray), "%sDrug Smuggler\n", szMiscArray);
  897. }
  898. if(Help_Perm(playerid, 9, 15, 0))
  899. {
  900. format(string, sizeof(string), "HelpResultCat%i", j);
  901. SetPVarInt(playerid, string, 15);
  902. j++;
  903. format(szMiscArray, sizeof(szMiscArray), "%sPaper Boy\n", szMiscArray);
  904. }
  905. if(Help_Perm(playerid, 9, 16, 0))
  906. {
  907. format(string, sizeof(string), "HelpResultCat%i", j);
  908. SetPVarInt(playerid, string, 16);
  909. j++;
  910. format(szMiscArray, sizeof(szMiscArray), "%sTrucker\n");
  911. }
  912. if(Help_Perm(playerid, 9, 17, 0))
  913. {
  914. format(string, sizeof(string), "HelpResultCat%i", j);
  915. SetPVarInt(playerid, string, 17);
  916. j++;
  917. format(szMiscArray, sizeof(szMiscArray), "%sTaxi Driver\n", szMiscArray);
  918. }
  919. if(Help_Perm(playerid, 9, 18, 0))
  920. {
  921. format(string, sizeof(string), "HelpResultCat%i", j);
  922. SetPVarInt(playerid, string, 18);
  923. j++;
  924. format(szMiscArray, sizeof(szMiscArray), "%sCraftsman\n", szMiscArray);
  925. }
  926. if(Help_Perm(playerid, 9, 19, 0))
  927. {
  928. format(string, sizeof(string), "HelpResultCat%i", j);
  929. SetPVarInt(playerid, string, 19);
  930. j++;
  931. format(szMiscArray, sizeof(szMiscArray), "%sBartender\n", szMiscArray);
  932. }
  933. if(Help_Perm(playerid, 9, 20, 0))
  934. {
  935. format(string, sizeof(string), "HelpResultCat%i", j);
  936. SetPVarInt(playerid, string, 20);
  937. j++;
  938. format(szMiscArray, sizeof(szMiscArray), "%sShipment Contractor\n", szMiscArray);
  939. }
  940. if(Help_Perm(playerid, 9, 21, 0))
  941. {
  942. format(string, sizeof(string), "HelpResultCat%i", j);
  943. SetPVarInt(playerid, string, 21);
  944. j++;
  945. format(szMiscArray, sizeof(szMiscArray), "%sPizza Boy\n", szMiscArray);
  946. }
  947. Help_GenerateCMDList(playerid, 3, -1, 9, 0);
  948. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATJOB, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  949. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  950. }
  951. case DIALOG_HELPCATJOB1:
  952. {
  953. format(string, sizeof(string), "HelpResultCat%i", listitem);
  954. if(GetPVarInt(playerid, string))
  955. {
  956. Help_GenerateCMDList(playerid, 3, -1, 9, GetPVarInt(playerid, string));
  957. ClearHelpSearch(playerid, 0, 1);
  958. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATJOB, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  959. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  960. }
  961. else
  962. {
  963. format(string, sizeof(string), "HelpResult%i", listitem);
  964. SetPVarInt(playerid, "HelpCancelCopy", 9);
  965. Help_ShowCMD(playerid, GetPVarInt(playerid, string), DIALOG_HELPSEARCH4);
  966. ClearHelpSearch(playerid);
  967. }
  968. }
  969. case DIALOG_HELPCATGROUP:
  970. {
  971. new j = 0;
  972. if(Help_Perm(playerid, 11, arrGroupData[PlayerInfo[playerid][pMember]][g_iGroupType], 1))
  973. {
  974. format(string, sizeof(string), "HelpResultCat%i", j);
  975. SetPVarInt(playerid, string, 1);
  976. j++;
  977. format(szMiscArray, sizeof(szMiscArray), "Leadership\n");
  978. }
  979. Help_GenerateCMDList(playerid, 3, j, 10, arrGroupData[PlayerInfo[playerid][pMember]][g_iGroupType]);
  980. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATGROUP, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  981. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  982. }
  983. case DIALOG_HELPCATGROUP1:
  984. {
  985. format(string, sizeof(string), "HelpResultCat%i", listitem);
  986. if(GetPVarInt(playerid, string))
  987. {
  988. Help_GenerateCMDList(playerid, 3, -1, 11, arrGroupData[PlayerInfo[playerid][pMember]][g_iGroupType]);
  989. ClearHelpSearch(playerid, 0, 1);
  990. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATGROUP, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  991. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  992. }
  993. else
  994. {
  995. format(string, sizeof(string), "HelpResult%i", listitem);
  996. SetPVarInt(playerid, "HelpCancelCopy", 10);
  997. Help_ShowCMD(playerid, GetPVarInt(playerid, string), DIALOG_HELPSEARCH4);
  998. ClearHelpSearch(playerid);
  999. }
  1000. }
  1001. case DIALOG_HELPCATBUSINESS:
  1002. {
  1003. Help_GenerateCMDList(playerid, 3, -1, 12, 0);
  1004. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATBUSINESS, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  1005. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  1006. }
  1007. case DIALOG_HELPCATBUSINESS1:
  1008. {
  1009. format(string, sizeof(string), "HelpResult%i", listitem);
  1010. SetPVarInt(playerid, "HelpCancelCopy", 12);
  1011. Help_ShowCMD(playerid, GetPVarInt(playerid, string), DIALOG_HELPSEARCH4);
  1012. ClearHelpSearch(playerid);
  1013. }
  1014. case DIALOG_HELPCATVIP:
  1015. {
  1016. new j = 0;
  1017. if(Help_Perm(playerid, 13, 5, 1))
  1018. {
  1019. format(string, sizeof(string), "HelpResultCat%i", j);
  1020. SetPVarInt(playerid, string, 5);
  1021. j++;
  1022. format(szMiscArray, sizeof(szMiscArray), "VIP Moderator\n");
  1023. }
  1024. if(Help_Perm(playerid, 13, 2, 1))
  1025. {
  1026. format(string, sizeof(string), "HelpResultCat%i", j);
  1027. SetPVarInt(playerid, string, 2);
  1028. j++;
  1029. format(szMiscArray, sizeof(szMiscArray), "%sSilver VIP\n", szMiscArray);
  1030. }
  1031. if(Help_Perm(playerid, 13, 3, 1))
  1032. {
  1033. format(string, sizeof(string), "HelpResultCat%i", j);
  1034. SetPVarInt(playerid, string, 3);
  1035. j++;
  1036. format(szMiscArray, sizeof(szMiscArray), "%sGold VIP\n", szMiscArray);
  1037. }
  1038. if(Help_Perm(playerid, 13, 4, 1))
  1039. {
  1040. format(string, sizeof(string), "HelpResultCat%i", j);
  1041. SetPVarInt(playerid, string, 4);
  1042. j++;
  1043. format(szMiscArray, sizeof(szMiscArray), "%sPlatinum VIP\n", szMiscArray);
  1044. }
  1045. Help_GenerateCMDList(playerid, 3, -1, 13, 0);
  1046. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATVIP, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  1047. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  1048. }
  1049. case DIALOG_HELPCATVIP1:
  1050. {
  1051. format(string, sizeof(string), "HelpResultCat%i", listitem);
  1052. if(GetPVarInt(playerid, string))
  1053. {
  1054. Help_GenerateCMDList(playerid, 3, -1, 13, GetPVarInt(playerid, string));
  1055. ClearHelpSearch(playerid, 0, 1);
  1056. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATVIP, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  1057. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  1058. }
  1059. else
  1060. {
  1061. format(string, sizeof(string), "HelpResult%i", listitem);
  1062. SetPVarInt(playerid, "HelpCancelCopy", 13);
  1063. Help_ShowCMD(playerid, GetPVarInt(playerid, string), DIALOG_HELPSEARCH4);
  1064. ClearHelpSearch(playerid);
  1065. }
  1066. }
  1067. case DIALOG_HELPCATOTHER:
  1068. {
  1069. new j = 0;
  1070. if(Help_Perm(playerid, 14, 1, 1))
  1071. {
  1072. format(string, sizeof(string), "HelpResultCat%i", j);
  1073. SetPVarInt(playerid, string, 1);
  1074. j++;
  1075. format(szMiscArray, sizeof(szMiscArray), "Animation\n");
  1076. }
  1077. if(Help_Perm(playerid, 14, 2, 1))
  1078. {
  1079. format(string, sizeof(string), "HelpResultCat%i", j);
  1080. SetPVarInt(playerid, string, 2);
  1081. j++;
  1082. format(szMiscArray, sizeof(szMiscArray), "%sBackpack\n", szMiscArray);
  1083. }
  1084. if(Help_Perm(playerid, 14, 3, 1))
  1085. {
  1086. format(string, sizeof(string), "HelpResultCat%i", j);
  1087. SetPVarInt(playerid, string, 3);
  1088. j++;
  1089. format(szMiscArray, sizeof(szMiscArray), "%sCar\n", szMiscArray);
  1090. }
  1091. if(Help_Perm(playerid, 14, 4, 1))
  1092. {
  1093. format(string, sizeof(string), "HelpResultCat%i", j);
  1094. SetPVarInt(playerid, string, 4);
  1095. j++;
  1096. format(szMiscArray, sizeof(szMiscArray), "%sCellphone\n", szMiscArray);
  1097. }
  1098. if(Help_Perm(playerid, 14, 5, 1))
  1099. {
  1100. format(string, sizeof(string), "HelpResultCat%i", j);
  1101. SetPVarInt(playerid, string, 5);
  1102. j++;
  1103. format(szMiscArray, sizeof(szMiscArray), "%sFish\n", szMiscArray);
  1104. }
  1105. if(Help_Perm(playerid, 14, 6, 1))
  1106. {
  1107. format(string, sizeof(string), "HelpResultCat%i", j);
  1108. SetPVarInt(playerid, string, 6);
  1109. j++;
  1110. format(szMiscArray, sizeof(szMiscArray), "%sHouse\n", szMiscArray);
  1111. }
  1112. if(Help_Perm(playerid, 14, 7, 1))
  1113. {
  1114. format(string, sizeof(string), "HelpResultCat%i", j);
  1115. SetPVarInt(playerid, string, 7);
  1116. j++;
  1117. format(szMiscArray, sizeof(szMiscArray), "%sMail\n", szMiscArray);
  1118. }
  1119. if(Help_Perm(playerid, 14, 8, 1))
  1120. {
  1121. format(string, sizeof(string), "HelpResultCat%i", j);
  1122. SetPVarInt(playerid, string, 8);
  1123. j++;
  1124. format(szMiscArray, sizeof(szMiscArray), "%sRent\n", szMiscArray);
  1125. }
  1126. if(Help_Perm(playerid, 14, 9, 1))
  1127. {
  1128. format(string, sizeof(string), "HelpResultCat%i", j);
  1129. SetPVarInt(playerid, string, 9);
  1130. j++;
  1131. format(szMiscArray, sizeof(szMiscArray), "%sToy\n", szMiscArray);
  1132. }
  1133. if(Help_Perm(playerid, 14, 10, 1))
  1134. {
  1135. format(string, sizeof(string), "HelpResultCat%i", j);
  1136. SetPVarInt(playerid, string, 10);
  1137. j++;
  1138. format(szMiscArray, sizeof(szMiscArray), "%sVoucher\n", szMiscArray);
  1139. }
  1140. Help_GenerateCMDList(playerid, 3, -1, 14, 0);
  1141. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATOTHER, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  1142. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  1143. }
  1144. case DIALOG_HELPCATOTHER1:
  1145. {
  1146. format(string, sizeof(string), "HelpResultCat%i", listitem);
  1147. if(GetPVarInt(playerid, string))
  1148. {
  1149. Help_GenerateCMDList(playerid, 3, -1, 14, GetPVarInt(playerid, string));
  1150. ClearHelpSearch(playerid, 0, 1);
  1151. if(!isnull(szMiscArray)) ShowPlayerDialogEx(playerid, DIALOG_HELPCATOTHER, DIALOG_STYLE_LIST, "Help System", szMiscArray, "Select", "Cancel");
  1152. else ShowPlayerDialogEx(playerid, DIALOG_HELPCATMAIN, DIALOG_STYLE_MSGBOX, "Help System", "No commands found for this category.", "Go Back", "");
  1153. }
  1154. else
  1155. {
  1156. format(string, sizeof(string), "HelpResult%i", listitem);
  1157. SetPVarInt(playerid, "HelpCancelCopy", 13);
  1158. Help_ShowCMD(playerid, GetPVarInt(playerid, string), DIALOG_HELPSEARCH4);
  1159. ClearHelpSearch(playerid);
  1160. }
  1161. }
  1162. }
  1163. return 1;
  1164. }
  1165. stock Help_GenerateCMDList(playerid, listtype, listitem = -1, type = 0, subtype = 0, param[] = 0)
  1166. {
  1167. new string[256], j = 0;
  1168. for(new i = 0; i < sizeof(Help); i++)
  1169. {
  1170. switch(listtype)
  1171. {
  1172. case 0:
  1173. {
  1174. if((strfind(Help[i][HelpName], param, true) != -1 || strfind(Help[i][HelpDesc], param, true) != -1) && Help_Perm(playerid, Help[i][HelpType], Help[i][HelpSubtype], Help[i][HelpLevel]))
  1175. {
  1176. if(listitem >= 0)
  1177. {
  1178. format(string, sizeof(string), "HelpResult%i", listitem);
  1179. listitem++;
  1180. }
  1181. else
  1182. {
  1183. format(string, sizeof(string), "HelpResult%i", j);
  1184. j++;
  1185. }
  1186. SetPVarInt(playerid, string, i);
  1187. format(szMiscArray, sizeof(szMiscArray), "%s%s\n", szMiscArray, Help[i][HelpName]);
  1188. }
  1189. }
  1190. case 1:
  1191. {
  1192. if(strfind(Help[i][HelpName], param, true) != -1 && Help_Perm(playerid, Help[i][HelpType], Help[i][HelpSubtype], Help[i][HelpLevel]))
  1193. {
  1194. if(listitem >= 0)
  1195. {
  1196. format(string, sizeof(string), "HelpResult%i", listitem);
  1197. listitem++;
  1198. }
  1199. else
  1200. {
  1201. format(string, sizeof(string), "HelpResult%i", j);
  1202. j++;
  1203. }
  1204. SetPVarInt(playerid, string, i);
  1205. format(szMiscArray, sizeof(szMiscArray), "%s%s\n", szMiscArray, Help[i][HelpName]);
  1206. }
  1207. }
  1208. case 2:
  1209. {
  1210. if(strfind(Help[i][HelpDesc], param, true) != -1 && Help_Perm(playerid, Help[i][HelpType], Help[i][HelpSubtype], Help[i][HelpLevel]))
  1211. {
  1212. if(listitem >= 0)
  1213. {
  1214. format(string, sizeof(string), "HelpResult%i", listitem);
  1215. listitem++;
  1216. }
  1217. else
  1218. {
  1219. format(string, sizeof(string), "HelpResult%i", j);
  1220. j++;
  1221. }
  1222. SetPVarInt(playerid, string, i);
  1223. format(szMiscArray, sizeof(szMiscArray), "%s%s\n", szMiscArray, Help[i][HelpName]);
  1224. }
  1225. }
  1226. case 3:
  1227. {
  1228. if(Help[i][HelpType] == type && Help[i][HelpSubtype] == subtype && Help_Perm(playerid, Help[i][HelpType], Help[i][HelpSubtype], Help[i][HelpLevel]))
  1229. {
  1230. if(listitem >= 0)
  1231. {
  1232. format(string, sizeof(string), "HelpResult%i", listitem);
  1233. listitem++;
  1234. }
  1235. else
  1236. {
  1237. format(string, sizeof(string), "HelpResult%i", j);
  1238. j++;
  1239. }
  1240. SetPVarInt(playerid, string, i);
  1241. format(szMiscArray, sizeof(szMiscArray), "%s%s\n", szMiscArray, Help[i][HelpName]);
  1242. }
  1243. }
  1244. }
  1245. }
  1246. return 1;
  1247. }
  1248. stock Help_ShowCMD(playerid, cmd, dialog)
  1249. {
  1250. new string[256];
  1251. SetPVarInt(playerid, "TmpCMD", cmd);
  1252. format(string, sizeof(string), "Command Help for %s", Help[cmd][HelpName]);
  1253. format(szMiscArray, sizeof(szMiscArray), "{FFFFFF}Usage: {AFAFAF}%s %s\n\n{FFFFFF}Description: {AFAFAF}%s\n\t\t\t\t\t", Help[cmd][HelpName], Help[cmd][HelpParam], Help[cmd][HelpDesc]);
  1254. return ShowPlayerDialogEx(playerid, dialog, DIALOG_STYLE_MSGBOX, string, szMiscArray, "Copy", "Exit");
  1255. }
  1256. stock Help_SendToChat(playerid, response, cmd)
  1257. {
  1258. if(response)
  1259. {
  1260. format(szMiscArray, sizeof(szMiscArray), "USAGE: %s %s", Help[cmd][HelpName], Help[cmd][HelpParam]);
  1261. SendClientMessageEx(playerid, COLOR_GREY, szMiscArray);
  1262. }
  1263. }
  1264. // Function to determine if player has permission to view/use command
  1265. stock Help_Perm(playerid, type, subtype, level)
  1266. {
  1267. // Administrator
  1268. if(type == 1 && PlayerInfo[playerid][pAdmin] >= 1)
  1269. {
  1270. // Undefined Admin Commands? (May Remove Later)
  1271. if(subtype == 0 && PlayerInfo[playerid][pAdmin] >= level) return 1;
  1272. // Retired Administrator/Senior Server Moderator
  1273. if(subtype == 1 && PlayerInfo[playerid][pSMod] > 0) return 1;
  1274. // Server Moderator
  1275. else if(subtype == 2 && PlayerInfo[playerid][pSMod] == 0) return 1;
  1276. // Watchdog
  1277. else if(subtype == 3 && PlayerInfo[playerid][pWatchdog] >= level) return 1;
  1278. // Junior Administrator
  1279. else if(subtype == 4 && PlayerInfo[playerid][pAdmin] >= level) return 1;
  1280. // General Administrator
  1281. else if(subtype == 5 && PlayerInfo[playerid][pAdmin] >= level) return 1;
  1282. // Assistant Shift Manager
  1283. else if(subtype == 6 && PlayerInfo[playerid][pASM] >= level) return 1;
  1284. // Senior Administrator
  1285. else if(subtype == 7 && PlayerInfo[playerid][pAdmin] >= level) return 1;
  1286. // Head Administrator
  1287. else if(subtype == 8 && PlayerInfo[playerid][pAdmin] >= level) return 1;
  1288. // Executive Administrator
  1289. else if(subtype == 9 && PlayerInfo[playerid][pAdmin] >= level) return 1;
  1290. // SA-MP Operations
  1291. else if(subtype == 10 && PlayerInfo[playerid][pAP] >= level) return 1;
  1292. // Human Resources
  1293. else if(subtype == 11 && PlayerInfo[playerid][pHR] >= level) return 1;
  1294. // Faction Moderator
  1295. else if(subtype == 12 && PlayerInfo[playerid][pFactionModerator] >= level) return 1;
  1296. // Gang Moderator
  1297. else if(subtype == 13 && PlayerInfo[playerid][pGangModerator] >= level) return 1;
  1298. // Business Moderator
  1299. else if(subtype == 14 && PlayerInfo[playerid][pBM] >= level) return 1;
  1300. // Special Operations
  1301. else if(subtype == 15 && PlayerInfo[playerid][pUndercover] >= level) return 1;
  1302. // Shop Technician
  1303. else if(subtype == 16 && PlayerInfo[playerid][pShopTech] >= level) return 1;
  1304. // Public Relations
  1305. else if(subtype == 17 && PlayerInfo[playerid][pPR] >= level) return 1;
  1306. // Ban Appealer
  1307. else if(subtype == 18 && PlayerInfo[playerid][pBanAppealer] >= level) return 1;
  1308. }
  1309. // Player Advisor
  1310. else if(type == 2 && PlayerInfo[playerid][pHelper] >= 1)
  1311. {
  1312. if(subtype == 0 && PlayerInfo[playerid][pHelper] >= level) return 1;
  1313. // Helper
  1314. else if(subtype == 1 && PlayerInfo[playerid][pHelper] >= level) return 1;
  1315. // Community Advisor
  1316. else if(subtype == 2 && PlayerInfo[playerid][pHelper] >= level) return 1;
  1317. // Senior Advisor
  1318. else if(subtype == 3 && PlayerInfo[playerid][pHelper] >= level) return 1;
  1319. // Chief Advisor
  1320. else if(subtype == 4 && PlayerInfo[playerid][pHelper] >= level) return 1;
  1321. }
  1322. // Famed
  1323. else if(type == 3 && PlayerInfo[playerid][pFamed] >= 1)
  1324. {
  1325. if(subtype == 0 && PlayerInfo[playerid][pFamed] >= level) return 1;
  1326. // Old-School
  1327. else if(subtype == 1 && PlayerInfo[playerid][pFamed] >= level) return 1;
  1328. // Chartered Old-School
  1329. else if(subtype == 2 && PlayerInfo[playerid][pFamed] >= level) return 1;
  1330. // Famed
  1331. else if(subtype == 3 && PlayerInfo[playerid][pFamed] >= level) return 1;
  1332. // Famed Commissioner
  1333. else if(subtype == 4 && PlayerInfo[playerid][pFamed] >= level) return 1;
  1334. // Famed Vice-Chairman
  1335. else if(subtype == 6 && PlayerInfo[playerid][pFamed] >= level) return 1;
  1336. }
  1337. // Newbie
  1338. else if(type == 4)
  1339. {
  1340. if(subtype == 0 && PlayerInfo[playerid][pLevel] <= level) return 1;
  1341. }
  1342. // General
  1343. else if(type == 5)
  1344. {
  1345. return 1;
  1346. }
  1347. // Account
  1348. else if(type == 6)
  1349. {
  1350. return 1;
  1351. }
  1352. // Chat
  1353. else if(type == 7)
  1354. {
  1355. return 1;
  1356. }
  1357. // Shop
  1358. else if(type == 8)
  1359. {
  1360. return 1;
  1361. }
  1362. // Job
  1363. else if(type == 9)
  1364. {
  1365. if(PlayerInfo[playerid][pJob] == subtype || PlayerInfo[playerid][pJob2] == subtype || PlayerInfo[playerid][pJob3] == subtype) return 1;
  1366. }
  1367. // Group
  1368. else if(type == 10)
  1369. {
  1370. if(0 <= PlayerInfo[playerid][pMember] < MAX_GROUPS)
  1371. {
  1372. if(subtype > 0)
  1373. {
  1374. if(arrGroupData[PlayerInfo[playerid][pMember]][g_iGroupType] == subtype) return 1;
  1375. else return 0;
  1376. }
  1377. return 1;
  1378. }
  1379. }
  1380. // Group Leader
  1381. else if(type == 11)
  1382. {
  1383. if(0 <= PlayerInfo[playerid][pLeader] < MAX_GROUPS)
  1384. {
  1385. if(subtype > 0)
  1386. {
  1387. if(PlayerInfo[playerid][pLeader] == subtype) return 1;
  1388. else return 0;
  1389. }
  1390. return 1;
  1391. }
  1392. }
  1393. // Business
  1394. else if(type == 12)
  1395. {
  1396. if(subtype > 0)
  1397. {
  1398. if(Businesses[PlayerInfo[playerid][pBusiness]][bType] == subtype) return 1;
  1399. else return 0;
  1400. }
  1401. return 1;
  1402. }
  1403. // VIP
  1404. else if(type == 13)
  1405. {
  1406. if(subtype == 0 && PlayerInfo[playerid][pDonateRank] >= level) return 1;
  1407. // Bronze VIP
  1408. else if(subtype == 1 && PlayerInfo[playerid][pDonateRank] >= level) return 1;
  1409. // Silver VIP
  1410. else if(subtype == 2 && PlayerInfo[playerid][pDonateRank] >= level) return 1;
  1411. // Gold VIP
  1412. else if(subtype == 3 && PlayerInfo[playerid][pDonateRank] >= level) return 1;
  1413. // Platinum VIP
  1414. else if(subtype == 4 && PlayerInfo[playerid][pDonateRank] >= level) return 1;
  1415. // VIP Moderator
  1416. else if(subtype == 5 && PlayerInfo[playerid][pVIPMod] >= level) return 1;
  1417. }
  1418. // Other
  1419. else if(type == 14)
  1420. {
  1421. return 1;
  1422. }
  1423. return 0;
  1424. }
  1425. // Function to clear search list
  1426. stock ClearHelpSearch(playerid, Clear1 = 1, Clear2 = 1)
  1427. {
  1428. new string[16];
  1429. for(new i = 0; i < sizeof(Help); i++)
  1430. {
  1431. if(Clear1)
  1432. {
  1433. format(string, sizeof(string), "HelpResult%i", i);
  1434. if(GetPVarType(playerid, string))
  1435. {
  1436. DeletePVar(playerid, string);
  1437. }
  1438. }
  1439. if(Clear2)
  1440. {
  1441. format(string, sizeof(string), "HelpResultCat%i", i);
  1442. if(GetPVarType(playerid, string))
  1443. {
  1444. DeletePVar(playerid, string);
  1445. }
  1446. }
  1447. }
  1448. return 1;
  1449. }
  1450. CMD:rules(playerid, params[])
  1451. {
  1452. format(szMiscArray, sizeof(szMiscArray), "Death Matching: Attacking a player in any way without a proper in character reason.");
  1453. format(szMiscArray, sizeof(szMiscArray), "%s\n\nKilling on Sight: Attacking a player in any way with little/insufficient/no roleplay, even if you have RP reason to attack the player.", szMiscArray);
  1454. format(szMiscArray, sizeof(szMiscArray), "%s\n\nRevenge Killing: Attempting to kill the person who killed you or returning to the situation in which you died.", szMiscArray);
  1455. format(szMiscArray, sizeof(szMiscArray), "%s\n\nPowergaming: Forcing roleplay on another player or roleplaying impossible god-like/superhero abilities or the use of futuristic technologies.", szMiscArray);
  1456. format(szMiscArray, sizeof(szMiscArray), "%s\n\nMetagaming: Mixing of out of character and in character information. Using IC info oocly or using OOC info icly. Use of acronyms or smilies. (ex. 'wtf' or :)", szMiscArray);
  1457. format(szMiscArray, sizeof(szMiscArray), "%s\n\nNon-roleplay behavior: Acting in a manner that is deemed unrealstic or non-roleplay, including but not limited to: improper use of toys,\n ramming vehicles into players excessively, car surfing etc", szMiscArray);
  1458. format(szMiscArray, sizeof(szMiscArray), "%s\n\nAvoiding Roleplay: Disconnecting or using /kill to avoid roleplay/arrest etc.", szMiscArray);
  1459. ShowPlayerDialogEx(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "NG-RP: Server Offences", szMiscArray, "Okay", "");
  1460. return 1;
  1461. }
  1462. CMD:help(playerid, params[])
  1463. {
  1464. return Help_ListCat(playerid, DIALOG_HELPCATMAIN);
  1465. }
  1466. CMD:reloadhelp(playerid, params[])
  1467. {
  1468. if(PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
  1469. SendClientMessageEx(playerid, COLOR_WHITE, "Reloading all help entries...");
  1470. return RehashHelp();
  1471. }
  1472. CMD:ohelp(playerid, params[])
  1473. {
  1474. new string[512];
  1475. if(PlayerInfo[playerid][pLevel] <= 3)
  1476. {
  1477. SendClientMessageEx(playerid, TEAM_AZTECAS_COLOR,"*** HELP *** /report /requesthelp (/newb)ie /tog newbie");
  1478. }
  1479. SendClientMessageEx(playerid, COLOR_WHITE,"*** ACCOUNT *** /(net)stats /inventory /quickstats /myguns /buylevel /upgrade /changepass /killcheckpoint /resetupgrades(100k)");
  1480. SendClientMessageEx(playerid, COLOR_WHITE,"*** CHAT *** /w(hisper) /o(oc) /s(hout) /l(ow) /b /ad(vertisement)s /f(amily) /togooc /tognews /togfam /cancelcall");
  1481. SendClientMessageEx(playerid, COLOR_WHITE,"*** CHAT *** /me /ame /lme /do /ldo /se(texamine) /examine");
  1482. SendClientMessageEx(playerid, COLOR_WHITE,"*** GENERAL *** /pay /writecheck /charity /time /buy /(check)id /music /showlicenses /clothes /mywarrants");
  1483. SendClientMessageEx(playerid, COLOR_WHITE,"*** GENERAL *** /apply /skill /stopani /kill /buyclothes /droplicense /calculate /refuel /car /seatbelt /checkbelt, /defendtime");
  1484. SendClientMessageEx(playerid, COLOR_WHITE,"*** GENERAL *** /cancel /accept /eject /contract /service /families /joinevent /nextpaycheck, /nextgift, /pointtime");
  1485. SendClientMessageEx(playerid, COLOR_WHITE,"*** GENERAL *** /speedo /speedopos /viewmotd /pickveh /cracktrunk /backpackhelp /nextnamechange");
  1486. SendClientMessageEx(playerid, COLOR_WHITE,"*** SHOP *** /shophelp /credits /sellcredits /microshop /activeitems /cooldowns");
  1487. switch(PlayerInfo[playerid][pJob])
  1488. {
  1489. case 1: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /trace");
  1490. case 2: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /lawyerduty /free /defend /wanted /offerappeal /finishappeal");
  1491. case 3: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /sex");
  1492. case 4: cmd_odrughelp(playerid, "");
  1493. case 5: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /dropcar");
  1494. case 7: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /fix /nos /hyd /repair /refill /mechduty");
  1495. case 8: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /guard /frisk");
  1496. case 9: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /getmats /sell /sellgun");
  1497. case 10: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /sellnewcar");
  1498. case 12: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /fight");
  1499. case 14: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /getcrate");
  1500. // case 15: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /papers /bring /deliver");
  1501. case 17: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /fare");
  1502. case 18: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /getmats /sell /craft");
  1503. case 19: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /selldrink");
  1504. case 20: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /loadshipment /checkcargo /hijackcargo");
  1505. case 21: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /getpizza*");
  1506. case 27: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /garbagerun");
  1507. }
  1508. switch(PlayerInfo[playerid][pJob2])
  1509. {
  1510. case 1: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /trace");
  1511. case 2: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /lawyerduty /free /defend /wanted");
  1512. case 3: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /sex");
  1513. case 4: cmd_odrughelp(playerid, "");
  1514. case 5: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /dropcar");
  1515. case 7: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /fix /nos /hyd /repair /refill /mechduty");
  1516. case 8: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /guard /frisk");
  1517. case 9: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /getmats /sell /sellgun");
  1518. case 10: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /sellnewcar");
  1519. case 12: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /fight");
  1520. case 14: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /getcrate");
  1521. // case 15: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /papers /bring /deliver");
  1522. case 17: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /fare");
  1523. case 18: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /getmats /sell /craft");
  1524. case 19: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /selldrink");
  1525. case 20: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /loadshipment /checkcargo /hijackcargo");
  1526. case 21: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /getpizza");
  1527. case 27: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /garbagerun");
  1528. }
  1529. switch(PlayerInfo[playerid][pJob3])
  1530. {
  1531. case 1: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /trace");
  1532. case 2: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /lawyerduty /free /defend /wanted");
  1533. case 3: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /sex");
  1534. case 4: cmd_odrughelp(playerid, "");
  1535. case 5: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /dropcar");
  1536. case 7: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /fix /nos /hyd /repair /refill /mechduty");
  1537. case 8: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /guard /frisk");
  1538. case 9: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /getmats /sell /sellgun");
  1539. case 10: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /sellnewcar");
  1540. case 12: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /fight");
  1541. case 14: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /getcrate");
  1542. // case 15: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /papers /bring /deliver");
  1543. case 17: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /fare");
  1544. case 18: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /getmats /sell /craft");
  1545. case 19: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /selldrink");
  1546. case 20: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /loadshipment /checkcargo /hijackcargo");
  1547. case 21: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /getpizza");
  1548. case 27: SendClientMessageEx(playerid,COLOR_WHITE,"*** JOB *** /garbagerun");
  1549. }
  1550. new iGroupID = PlayerInfo[playerid][pMember];
  1551. if(iGroupID != INVALID_GROUP_ID)
  1552. {
  1553. switch(arrGroupData[iGroupID][g_iGroupType])
  1554. {
  1555. case 1:
  1556. {
  1557. format(string, sizeof(string), "*** %s *** (/r)adio /dept (/m)egaphone (/su)spect /locker /mdc /detain /arrest /warrantarrest /wanted /cuff /tazer", arrGroupData[PlayerInfo[playerid][pMember]][g_szGroupName]);
  1558. SendClientMessageEx(playerid, COLOR_WHITE, string);
  1559. format(string, sizeof(string), "*** %s *** /frisk /take /ticket (/gov)ernment /clothes /ram /invite /giverank /deploy /destroy", arrGroupData[PlayerInfo[playerid][pMember]][g_szGroupName]);
  1560. SendClientMessageEx(playerid, COLOR_WHITE, string);
  1561. format(string, sizeof(string), "*** %s *** /spikes /revokelicense /vcheck /vmdc /vticket /tow /untow /impound /gdonate /togradio /togdept", arrGroupData[PlayerInfo[playerid][pMember]][g_szGroupName]);
  1562. SendClientMessageEx(playerid, COLOR_WHITE, string);
  1563. format(string, sizeof(string), "*** %s *** /flares /cones /wants /docarrest /siren /destroyplant /radargun /searchcar /vradar /copdestroy (furniture)", arrGroupData[PlayerInfo[playerid][pMember]][g_szGroupName]);
  1564. if(PlayerInfo[playerid][pRank] >= arrGroupData[PlayerInfo[playerid][pMember]][g_iBugAccess]) format(string, sizeof(string), "%s /bug /listbugs /clearbugs",string);
  1565. if(PlayerInfo[playerid][pRank] >= arrGroupData[PlayerInfo[playerid][pMember]][g_iFindAccess]) format(string, sizeof(string), "%s /hfind",string);
  1566. SendClientMessageEx(playerid, COLOR_WHITE, string);
  1567. if(arrGroupData[PlayerInfo[playerid][pMember]][g_iCrateIsland] != INVALID_RANK) {
  1568. format(string, sizeof(string), "*** %s *** /cratelimit /viewcrateorders", arrGroupData[PlayerInfo[playerid][pMember]][g_szGroupName]);
  1569. SendClientMessageEx(playerid, COLOR_WHITE, string);
  1570. }
  1571. format(string, sizeof(string), "*** %s *** /placekit /usekit /backup (code2) /backupall /backupint /calls /a(ccept)c(all) /i(gnore)c(all) /wheelclamp", arrGroupData[PlayerInfo[playerid][pMember]][g_szGroupName]);
  1572. SendClientMessageEx(playerid, COLOR_WHITE, string);
  1573. }
  1574. case 2:
  1575. {
  1576. format(string, sizeof(string), "*** %s *** (/f)amily /r /contracts /givemehit /order /ranks /profile /h(show)badge /hfind /togbr /execute", arrGroupData[PlayerInfo[playerid][pMember]][g_szGroupName]);
  1577. SendClientMessageEx(playerid, COLOR_WHITE, string);
  1578. format(string, sizeof(string), "*** %s *** /plantbomb /plantcarbomb /pickupbomb /myc4 /invite /giverank /showmehq /showmehq2 /showmehq3", arrGroupData[PlayerInfo[playerid][pMember]][g_szGroupName]);
  1579. SendClientMessageEx(playerid, COLOR_WHITE, string);
  1580. }
  1581. case 3:
  1582. {
  1583. format(string, sizeof(string), "*** %s *** (/r)adio /dept (/m)egaphone /heal /clothes /invite /giverank /locker /gdonate", arrGroupData[PlayerInfo[playerid][pMember]][g_szGroupName]);
  1584. SendClientMessageEx(playerid, COLOR_WHITE, string);
  1585. format(string, sizeof(string), "*** %s *** /getpt /movept /loadpt /deliverpt /destroyplant /calls /a(ccept)c(all) /i(gnore)c(all)", arrGroupData[PlayerInfo[playerid][pMember]][g_szGroupName]);
  1586. SendClientMessageEx(playerid, COLOR_WHITE, string);
  1587. }
  1588. case 4:
  1589. {
  1590. SendClientMessageEx(playerid, COLOR_WHITE, "*** NEWS AGENCY *** /live /news [text] /broadcast /cameraangle /clothes /invite /giverank /liveban");
  1591. }
  1592. case 5:
  1593. {
  1594. if(PlayerInfo[playerid][pRank] < 3)
  1595. {
  1596. SendClientMessageEx(playerid, COLOR_WHITE, "*** GOVERNMENT *** (/r)adio /dept /locker /mdc /deploy /destroy /spikes /tazer /frisk /cuff");
  1597. }
  1598. else
  1599. {
  1600. SendClientMessageEx(playerid, COLOR_WHITE, "*** GOVERNMENT *** (/r)adio /dept /locker /settax /checktax /taxwithdraw /invite /giverank (/gov)ernment (/su)spect");
  1601. SendClientMessageEx(playerid, COLOR_WHITE, "*** GOVERNMENT *** /mdc /detain /arrest /wanted /cuff /tazer /frisk /take /ticket /clothes /ram /invite /giverank /setbudget");
  1602. SendClientMessageEx(playerid, COLOR_WHITE, "*** GOVERNMENT *** /spikes /destroyplant /radargun /warrantarrest /pardon /commute /wants /deploy /destroy");
  1603. }
  1604. }
  1605. case 6:
  1606. {
  1607. SendClientMessageEx(playerid, COLOR_WHITE, "*** JUDICIAL SYSTEM *** (/r)adio /dept /warrant /warrantwd /judgefine /judgejail /judgeprison /probation /wants /subpoena");
  1608. SendClientMessageEx(playerid, COLOR_WHITE, "*** JUDICIAL SYSTEM *** /invite /uninvite /giverank /trial /adjourn /sentence /reward /checkjudgements /reversejudgement");
  1609. SendClientMessageEx(playerid, COLOR_WHITE, "*** JUDICIAL SYSTEM *** /present /freezebank /freezeassets /probation /gdonate /viewassets");
  1610. }
  1611. case 7:
  1612. {
  1613. SendClientMessageEx(playerid, COLOR_WHITE, "*** TRANSPORT *** /fare /ataxi /r /invite /giverank /eba /gdonate");
  1614. }
  1615. case 8:
  1616. {
  1617. SendClientMessageEx(playerid, COLOR_WHITE, "*** TOWING *** (/r)adio /dept /locker /(un)tow /impound /vcheck /vmdc /vticket /gdonate /calls /a(ccept)c(all) /i(gnore)c(all)");
  1618. }
  1619. case 9:
  1620. {
  1621. SendClientMessageEx(playerid, COLOR_WHITE, "*** FAMILY *** (/f)amily /locker /gate /clothes /repfam /repcheck /myrivals /grouptoy /drughelp");
  1622. }
  1623. }
  1624. if(arrGroupData[iGroupID][g_iCrimeType] == GROUP_CRIMINAL_TYPE_RACE) SendClientMessageEx(playerid, COLOR_WHITE, "*** URL *** /countdown");
  1625. if (0 <= PlayerInfo[playerid][pLeader] < MAX_GROUPS)
  1626. {
  1627. SendClientMessageEx(playerid, COLOR_WHITE, "*** GROUP LEADER *** /invite /uninvite /ouninvite /setdiv /giverank /online /setbadge /setdivname /dvadjust");
  1628. if(arrGroupData[iGroupID][g_iGroupType] == GROUP_TYPE_LEA || arrGroupData[iGroupID][g_iGroupType] == GROUP_TYPE_MEDIC || arrGroupData[iGroupID][g_iGroupType] == GROUP_TYPE_JUDICIAL || arrGroupData[iGroupID][g_iGroupType] == GROUP_TYPE_TAXI || arrGroupData[iGroupID][g_iGroupType] == GROUP_TYPE_GOV || arrGroupData[iGroupID][g_iGroupType] == GROUP_TYPE_NEWS || arrGroupData[iGroupID][g_iGroupType] == GROUP_TYPE_TOWING)
  1629. {
  1630. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "*** GROUP LEADER *** /viewbudget /grepocars /gvbuyback /gdonate /ordercrates /dvtrackcar /gwithdraw /dvstorage");
  1631. }
  1632. else if(arrGroupData[iGroupID][g_iGroupType] == GROUP_TYPE_GOV)
  1633. {
  1634. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "*** GROUP LEADER *** /checkapps /deport");
  1635. }
  1636. else if(arrGroupData[iGroupID][g_iGroupType] == GROUP_TYPE_CRIMINAL)
  1637. {
  1638. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "*** GROUP LEADER *** /adjustwithdrawrank /myrivals");
  1639. }
  1640. }
  1641. }
  1642. if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
  1643. {
  1644. SendClientMessageEx(playerid, COLOR_WHITE, "*** ADMIN *** (/a)dmin (/ah)elp");
  1645. }
  1646. if(PlayerInfo[playerid][pDonateRank] >= 1)
  1647. {
  1648. SendClientMessageEx(playerid, COLOR_PURPLE, "*** VIP *** /travel /viplocker /tokenhelp /buddyinvite /phoneprivacy /setautoreply");
  1649. }
  1650. if(PlayerInfo[playerid][pDonateRank] >= 2)
  1651. {
  1652. format(string, sizeof(string), "*** VIP *** /spawnatvip (%s credits) /vipgunsleft", number_format(ShopItems[30][sItemPrice]));
  1653. SendClientMessageEx(playerid, COLOR_PURPLE, string);
  1654. }
  1655. if(PlayerInfo[playerid][pDonateRank] >= 4)
  1656. {
  1657. SendClientMessageEx(playerid, COLOR_PURPLE, "*** VIP *** /freeads /pvipjob /vipplate");
  1658. }
  1659. if(PlayerInfo[playerid][pVIPMod])
  1660. {
  1661. SendClientMessageEx(playerid, COLOR_PURPLE, "*** VIP Moderator *** /vipparty /vto /vtoreset /vmute /vsuspend /vipm");
  1662. }
  1663. SendClientMessageEx(playerid, COLOR_WHITE,"*** OTHER *** /cellphonehelp /carhelp /househelp /toyhelp /renthelp /jobhelp /animhelp /fishhelp");
  1664. SendClientMessageEx(playerid, COLOR_WHITE,"*** OTHER *** /mailhelp /businesshelp /voucherhelp /backpackhelp");
  1665. //Start of Famed Commands
  1666. if(PlayerInfo[playerid][pFamed] >= 1)
  1667. {
  1668. SendClientMessageEx(playerid, COLOR_WHITE, "*** Old-School *** /fc /famedlocker /togfamed /famedplate [os/removed] /travel famed");
  1669. }
  1670. if(PlayerInfo[playerid][pFamed] >= 2)
  1671. {
  1672. SendClientMessageEx(playerid, COLOR_WHITE, "*** Chartered Old-School *** /famedplate [os/cos/removed]");
  1673. }
  1674. if(PlayerInfo[playerid][pFamed] >= 3)
  1675. {
  1676. SendClientMessageEx(playerid, COLOR_WHITE, "*** Famed *** /buyinsurance /famedplate [os/cos/famed/removed]");
  1677. }
  1678. if(PlayerInfo[playerid][pFamed] >= 4)
  1679. {
  1680. SendClientMessageEx(playerid, COLOR_WHITE, "*** Famed Commissioner *** /fmute /funmute, /fmembers");
  1681. }
  1682. if(PlayerInfo[playerid][pFamed] >= 6)
  1683. {
  1684. SendClientMessageEx(playerid, COLOR_WHITE, "*** Famed Vice-Chairman *** /osetfamed /setfamed");
  1685. }
  1686. //end of famed commands
  1687. return 1;
  1688. }