OnDialogResponse_old.inc 536 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492
  1. Timer:BPLgateclose(playerid)
  2. {
  3. SetDynamicObjectRot(BPLG1, 0, 270, -295);
  4. SetDynamicObjectRot(BPLG2, 0, 90, 0);
  5. return 1;
  6. }
  7. Timer:UseBM(playerid)
  8. {
  9. if(!IsPlayerConnected(playerid)) return 0;
  10. if(UseBMTimer[playerid])
  11. {
  12. UseBMTimer[playerid] = 0;
  13. BMPurchased[playerid] = 0;
  14. }
  15. return 1;
  16. }
  17. /*==============================================================================
  18. This needs converting to y_dialogs, and CLEANING THE FUCK UP -- dy1zan
  19. ==============================================================================*/
  20. static str[144], sendername[MAX_PLAYER_NAME+1], giveplayer[MAX_PLAYER_NAME+1];
  21. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  22. {
  23. if(dialogid == DIALOG_MDC_MAIN)
  24. {
  25. if(!response) {
  26. LogOffMDC(playerid);
  27. return 1;
  28. }
  29. if(GetMDCAccessType(playerid) == MDC_ACCESS_NONE)
  30. return SendMDCMessage(playerid, "This function is not available to you.");
  31. switch(listitem)
  32. {
  33. case 0: return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+1, DIALOG_STYLE_INPUT, "{2641FE}Mobile Data Computer - Lookup function", "{FFFFFF}Enter a name to run a search.\nPlease note that this will only display people who are registered on the police database.\n((Please not that you will have to use underscores '_' while searching for names.", "Search", "Return");
  34. case 1: {
  35. if(GetMDCAccessType(playerid) != MDC_ACCESS_FULL)
  36. return SendMDCMessage(playerid, "This function is not available to you.");
  37. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+6, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - BOLO", "View BOLOs\nAdd BOLO\nRemove BOLO", "Okay", "Close");
  38. }
  39. case 2:
  40. {
  41. if(GetMDCAccessType(playerid) != MDC_ACCESS_FULL)
  42. return SendMDCMessage(playerid, "This function is not available to you.");
  43. if(PlayerInfo[playerid][pMember] == 5)
  44. {
  45. AdmErrorMsg;
  46. return MDC_MAIN;
  47. }
  48. new query[128], Name[26], GivenBy[26], rows, fields, cstr[5000], Date[50], Cache:result, IsTaken;
  49. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `weaponslog` ORDER BY `ID` DESC LIMIT 50");
  50. result = mysql_query(sqlGameConnection, query);
  51. cache_get_data(rows, fields, sqlGameConnection);
  52. if(!rows) return SendMDCMessage(playerid, "No logs on record.");
  53. format(cstr, sizeof(cstr), "Date\t\tName\t\tGiven By\t\tTaken/Given\n");
  54. for(new i = 0; i < rows; i++)
  55. {
  56. cache_get_field_content(i, "Name", Name);
  57. cache_get_field_content(i, "GivenBy", GivenBy);
  58. cache_get_field_content(i, "Date", Date);
  59. IsTaken = cache_get_field_content_int(i, "Taken");
  60. if(IsTaken) format(cstr, sizeof(cstr), "%s{FF5F5F}(%s)\t{FF5F5F}%s\t{FF5F5F}%s\t{FF5F5F}Taken\n", cstr, Date, Name, GivenBy);
  61. else format(cstr, sizeof(cstr), "%s{1CC343}(%s)\t{1CC343}%s\t{1CC343}%s\t{1CC343}Given\n", cstr, Date, Name, GivenBy);
  62. }
  63. ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+7, DIALOG_STYLE_TABLIST_HEADERS, "Weapon License Record", cstr, "Ok", "");
  64. cache_delete(Cache:result, sqlGameConnection);
  65. }
  66. case 3:
  67. {
  68. if(GetMDCAccessType(playerid) != MDC_ACCESS_FULL)
  69. return SendMDCMessage(playerid, "This function is not available to you.");
  70. new wantedstr[1000], wantedAmount = 0;
  71. for(new i = 0; i <= GetPlayerPoolSize(); i++)
  72. {
  73. if(PlayerInfo[i][pWantedLevel] > 0)
  74. {
  75. wantedAmount++;
  76. format(wantedstr, sizeof(wantedstr), "%s%s\tWanted %i times.\n", wantedstr, PlayerICName(i), PlayerInfo[i][pWantedLevel]);
  77. }
  78. }
  79. if(wantedAmount) return ShowPlayerDialog(playerid, DIALOG_MDC_WANTED, DIALOG_STYLE_LIST, "Wanted", wantedstr, "Okay", "");
  80. else return SendMDCMessage(playerid, "No wanted people were found.");
  81. }
  82. case 4:
  83. {
  84. LogOffMDC(playerid);
  85. return 1;
  86. }
  87. }
  88. return 1;
  89. }
  90. if(dialogid == DIALOG_MDC_MAIN+1)
  91. {
  92. if(!response) return MDC_MAIN;
  93. else
  94. {
  95. new query[128], rows, fields, Cache:result, SearchName[26], MDCID;
  96. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE name = '%e'", inputtext);
  97. result = mysql_query(sqlGameConnection, query);
  98. cache_get_data(rows, fields, sqlGameConnection);
  99. new bool:nofind;
  100. if(!rows) nofind = true;
  101. if(!nofind)
  102. {
  103. for(new i = 0; i < rows; i++)
  104. {
  105. cache_get_field_content(i, "Name", SearchName);
  106. MDCID = cache_get_field_content_int(i, "ID");
  107. }
  108. }
  109. if(nofind)
  110. {
  111. format(mdcstr, sizeof(mdcstr), "Your search query for '%s' has returned no results.", inputtext);
  112. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+2, DIALOG_STYLE_MSGBOX, "{2641FE}Mobile Data Computer - Lookup function", mdcstr, "Search", "Return");
  113. }
  114. format(str, sizeof(str), "%s", (SearchName));
  115. strmid(PlayerInfo[playerid][pMDCSearchName], str, 0, strlen(str), 255);
  116. PlayerInfo[playerid][pMDCSearchID] = MDCID;
  117. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  118. ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+3, DIALOG_STYLE_LIST, mdcstr, "Profile\nView History\n{FF6347}Add Warrant{FFFFFF}\nTrack Cellphone\nView Active Tickets\nRemove Ticket\nView Old Tickets\nAppearance", "Select", "Close");
  119. cache_delete(Cache:result, sqlGameConnection);
  120. }
  121. return 1;
  122. }
  123. if(dialogid == DIALOG_MDC_MAIN+2)
  124. {
  125. if(!response) return MDC_MAIN;
  126. else return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+1, DIALOG_STYLE_INPUT, "{2641FE}Mobile Data Computer - Lookup function", "{FFFFFF}Enter a name to run a search.\nPlease note that this will only display people who are registered on the police database.\n((Please not that you will have to use underscores '_' while searching for names.", "Search", "Return");
  127. }
  128. if(dialogid == DIALOG_MDC_MAIN+3)
  129. {
  130. if(!response) return MDC_MAIN;
  131. switch(listitem)
  132. {
  133. case 0://Profile
  134. {
  135. new query[128], profile[2000], rows, fields, Cache:result;
  136. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE name = '%e'", PlayerInfo[playerid][pMDCSearchName]);
  137. result = mysql_query(sqlGameConnection, query);
  138. cache_get_data(rows, fields, sqlGameConnection);
  139. if(!rows) return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+2, DIALOG_STYLE_MSGBOX, "{2641FE}Mobile Data Computer - Lookup function", "{FFFFFF}An error has occured.", "Search", "Return");
  140. new level,// int
  141. Sex, //int
  142. Age,//int
  143. HouseID,//int
  144. BizKey,//int
  145. Pnumber,//int
  146. DriverPoints//int
  147. ;
  148. for(new i = 0; i < rows; i++)
  149. {
  150. //cache_get_field_content(i, "Name", SearchName);
  151. cache_get_field_content_int(i, "Level", level);
  152. cache_get_field_content_int(i, "Sex", Sex);
  153. cache_get_field_content_int(i, "Age", Age);
  154. cache_get_field_content_int(i, "pHouseID", HouseID);
  155. cache_get_field_content_int(i, "BizKey", BizKey);
  156. cache_get_field_content_int(i, "PhoneNr", Pnumber);
  157. cache_get_field_content_int(i, "DriverPoints", DriverPoints);
  158. }
  159. format(str, sizeof(str), "{FFFF00}Name: %s\n", PlayerInfo[playerid][pMDCSearchName]);
  160. strcat(profile, str);
  161. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])))
  162. {
  163. format(str, sizeof(str), "{FFFF00}Activity Status: {1CC343}Online\n");
  164. }
  165. else format(str, sizeof(str), "{FFFF00}Activity Status: {FF5F5F}Offline\n");
  166. strcat(profile, str);
  167. new genstr[15];
  168. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]))) Sex = PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pSex];
  169. switch(Sex)
  170. {
  171. case 1: genstr = "Male";
  172. case 2: genstr = "Female";
  173. default: genstr = "Not defined";
  174. }
  175. format(str, sizeof(str), "{FFFF00}Gender: %s\n", genstr);
  176. strcat(profile, str);
  177. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]))) Age = PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pAge];
  178. if(Age == 0) format(str, sizeof(str), "{FFFF00}Age: Not defined\n");
  179. else format(str, sizeof(str), "{FFFF00}Age: %d\n", Age);
  180. strcat(profile, str);
  181. new htext[40], location[MAX_ZONE_NAME];
  182. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])))
  183. {
  184. if(PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pHouseID] != 0)
  185. {
  186. Get2DZone(location, MAX_ZONE_NAME, HouseInfo[PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pHouseID]][hOutsideX], HouseInfo[PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pHouseID]][hOutsideY], HouseInfo[PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pHouseID]][hOutsideZ]);
  187. format(htext, sizeof(htext), "%d %s", PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pHouseID], location);
  188. }
  189. else htext = "Homeless";
  190. }
  191. else//sql
  192. {
  193. if(HouseID != 0)
  194. {
  195. Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseID][hOutsideX], HouseInfo[HouseID][hOutsideY], HouseInfo[HouseID][hOutsideZ]);
  196. format(htext, sizeof(htext), "%d %s", HouseID, location);
  197. }
  198. else htext = "Homeless";
  199. }
  200. format(str, sizeof(str), "{FFFF00}Address: %s\n", htext);
  201. strcat(profile, str);
  202. new btext[128];
  203. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]))) BizKey = PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pBizKey];
  204. if(BizKey == 0) BizKey = -1;//fix for bizid 0
  205. if(BizKey != -1) format(btext, sizeof(btext), "%s", BizInfo[BizKey][bName]);
  206. else btext = "None";
  207. format(str, sizeof(str), "{FFFF00}Business: %s\n", btext);
  208. strcat(profile, str);
  209. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]))) Pnumber = PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pPnumber];
  210. format(str, sizeof(str), "{FFFF00}Phoner Number: %d\n", Pnumber);
  211. strcat(profile, str);
  212. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]))) DriverPoints = PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pDriverPoints];
  213. format(str, sizeof(str), "{FFFF00}Driver Points: %d\n", DriverPoints);
  214. strcat(profile, str);
  215. cache_delete(Cache:result, sqlGameConnection);
  216. // select * from playervehicles
  217. format(str, sizeof(str), "{FFFF00}Registered Vehicles:\nAn error has occured while searching the database ((Disabled - pending Jacob))");
  218. strcat(profile, str);
  219. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  220. ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+4, DIALOG_STYLE_MSGBOX, mdcstr, profile, "Close", "");
  221. }
  222. case 1://History
  223. {
  224. new query[128], rows, fields, CrimeType, CrimeReason[128], cstr[5000], Date[50], copname[28], isEnabled, Cache:result;
  225. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `newcrimes` WHERE `CrimePID` = %d ORDER BY `CrimeID` DESC LIMIT 20", PlayerInfo[playerid][pMDCSearchID]);
  226. result = mysql_query(sqlGameConnection, query);
  227. printf(query);
  228. cache_get_data(rows, fields, sqlGameConnection);
  229. // Get the player if they're online
  230. new mdcPlayer = GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]);
  231. if(!rows || (IsPlayerConnected(mdcPlayer) && hitmanUndercover[mdcPlayer]))
  232. {
  233. format(mdcstr, sizeof(mdcstr), "Your search for '%s' has returned no warrants.", PlayerInfo[playerid][pMDCSearchName]);
  234. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+2, DIALOG_STYLE_MSGBOX, "{2641FE}Mobile Data Computer - Lookup function", mdcstr, "Search", "Return");
  235. }
  236. format(cstr, sizeof(cstr), "Date\tType\tIssuer\tReason\n");
  237. for(new i = 0; i < rows; i++)
  238. {
  239. cache_get_field_content(i, "CrimeReason", CrimeReason);
  240. cache_get_field_content(i, "RealName", copname);
  241. cache_get_field_content(i, "Date", Date);
  242. CrimeType = cache_get_field_content_int(i, "CrimeType");
  243. isEnabled = cache_get_field_content_int(i, "CrimeEnabled");
  244. if(isEnabled) format(cstr, sizeof(cstr), "%s{1CC343}(%s)\t{1CC343}%s\t{1CC343}%s\t{1CC343}%s\n", cstr, Date, GetCrimeType(CrimeType), copname, CrimeReason);
  245. else format(cstr, sizeof(cstr), "%s{FF5F5F}(%s)\t{FF5F5F}%s\t{FF5F5F}%s\t{FF5F5F}%s{FFFFFF}\n", cstr, Date, GetCrimeType(CrimeType), copname, CrimeReason);
  246. }
  247. ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+4, DIALOG_STYLE_TABLIST_HEADERS, "{2641FE}Mobile Data Computer - Lookup Function", cstr, "Close", "");
  248. cache_delete(Cache:result, sqlGameConnection);
  249. }
  250. case 2:// Add Warrant
  251. {
  252. if(GetMDCAccessType(playerid) != MDC_ACCESS_FULL)
  253. return SendMDCMessage(playerid, "This function is not available to you.");
  254. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  255. ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+5, DIALOG_STYLE_INPUT, mdcstr, "Please enter the warrant reason\t\t\t\t\t\t", "Confirm", "Close");
  256. }
  257. case 3://Track Cellhpone
  258. {
  259. if(GetMDCAccessType(playerid) != MDC_ACCESS_FULL)
  260. return SendMDCMessage(playerid, "This function is not available to you.");
  261. if(!IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])))
  262. {
  263. format(mdcstr, sizeof(mdcstr), "Unable to Track Cellphone (( %s is not online ))", PlayerInfo[playerid][pMDCSearchName]);
  264. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+4, DIALOG_STYLE_MSGBOX, "{2641FE}Mobile Data Computer - Lookup function", mdcstr, "Search", "Return");
  265. }
  266. if(PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pPnumber] != 0 && PhoneOffline[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])] == 0)
  267. {
  268. new plZone[MAX_ZONE_NAME];
  269. GetPlayer2DZone(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]), plZone, sizeof(plZone));
  270. format(str, sizeof(str), "That person was last seen in %s.", plZone);
  271. SendClientMessage(playerid, -1, str);
  272. }
  273. else
  274. {
  275. format(mdcstr, sizeof(mdcstr), "Track Cellphone - Unavailable", PlayerInfo[playerid][pMDCSearchName]);
  276. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+4, DIALOG_STYLE_MSGBOX, "{2641FE}Mobile Data Computer - Lookup function", mdcstr, "Close", "");
  277. }
  278. }
  279. case 4://view tickets
  280. {
  281. new query[128], rows, fields, TicketReason[128], Amount, RealName[128], TicketID, cstr[5000], Cache:result;
  282. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `tickets` WHERE `TicketPID` = %d AND `Active` = 1 ORDER BY `TicketID` DESC", PlayerInfo[playerid][pMDCSearchID]);
  283. result = mysql_query(sqlGameConnection, query);
  284. cache_get_data(rows, fields, sqlGameConnection);
  285. if(!rows)
  286. {
  287. format(str, sizeof(str), "%s has no active tickets.", PlayerInfo[playerid][pMDCSearchName]);
  288. SendMDCMessage(playerid, str);
  289. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+3, DIALOG_STYLE_LIST, mdcstr, "Profile\nView History\n{FF6347}Add Warrant{FFFFFF}\nTrack Cellphone\nView Active Tickets\nRemove Ticket\nView Old Tickets\nAppearance", "Select", "Close");
  290. }
  291. format(cstr, sizeof(cstr), "Ticket ID\tIssuer\tAmount\tReason\n");
  292. for(new i = 0; i < rows; i++)
  293. {
  294. cache_get_field_content(i, "TicketReason", TicketReason);
  295. cache_get_field_content(i, "IssuerName", RealName);
  296. Amount = cache_get_field_content_int(i, "Amount");
  297. TicketID = cache_get_field_content_int(i, "TicketID");
  298. format(cstr, sizeof(cstr), "%s#%d\t%s\t$%d\t%s\n", cstr, TicketID, RealName, Amount, TicketReason);
  299. }
  300. cache_delete(Cache:result, sqlGameConnection);
  301. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+4, DIALOG_STYLE_TABLIST_HEADERS, "{2641FE}Mobile Data Computer - Unpaid Tickets", cstr, "Close", "");
  302. }
  303. case 5://remove ticket
  304. {
  305. if(GetMDCAccessType(playerid) != MDC_ACCESS_FULL)
  306. return SendMDCMessage(playerid, "This function is not available to you.");
  307. format(str, sizeof(str), "Please type the ticket ID you would like to remove from %s.", PlayerInfo[playerid][pMDCSearchName]);
  308. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+12, DIALOG_STYLE_INPUT, "{2641FE}Mobile Data Computer - Remove Ticket", str, "Remove", "Return");
  309. }
  310. case 6://old tickets
  311. {
  312. new query[128], rows, fields, TicketReason[128], Amount, RealName[128], TicketID, cstr[5000], Cache:result;
  313. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `tickets` WHERE `TicketPID` = %d AND `Active` = 0 ORDER BY `TicketID` DESC", PlayerInfo[playerid][pMDCSearchID]);
  314. result = mysql_query(sqlGameConnection, query);
  315. cache_get_data(rows, fields, sqlGameConnection);
  316. if(!rows)
  317. {
  318. format(str, sizeof(str), "%s has no paid tickets.", PlayerInfo[playerid][pMDCSearchName]);
  319. SendMDCMessage(playerid, str);
  320. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+3, DIALOG_STYLE_LIST, mdcstr, "Profile\nView History\n{FF6347}Add Warrant{FFFFFF}\nTrack Cellphone\nView Active Tickets\nRemove Ticket\nView Old Tickets\nAppearance", "Select", "Close");
  321. }
  322. format(cstr, sizeof(cstr), "Ticket ID\tIssuer\tAmount\tReason\n");
  323. for(new i = 0; i < rows; i++)
  324. {
  325. cache_get_field_content(i, "TicketReason", TicketReason);
  326. cache_get_field_content(i, "IssuerName", RealName);
  327. Amount = cache_get_field_content_int(i, "Amount");
  328. TicketID = cache_get_field_content_int(i, "TicketID");
  329. format(cstr, sizeof(cstr), "%s#%d\t%s\t$%d\t%s\n", cstr, TicketID, RealName, Amount, TicketReason);
  330. }
  331. cache_delete(Cache:result, sqlGameConnection);
  332. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+4, DIALOG_STYLE_TABLIST_HEADERS, "{2641FE}Mobile Data Computer - Paid Tickets", cstr, "Close", "");
  333. }
  334. case 7: // Appearance
  335. {
  336. if(GetMDCAccessType(playerid) != MDC_ACCESS_FULL)
  337. return SendMDCMessage(playerid, "This function is not available to you.");
  338. new query[128], rows, fields, Cache:result;
  339. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE name = '%e'", PlayerInfo[playerid][pMDCSearchName]);
  340. result = mysql_query(sqlGameConnection, query);
  341. cache_get_data(rows, fields, sqlGameConnection);
  342. new appearance[64], build, height, eyecolour, ethnicity, gender, age;
  343. build = cache_get_field_content_int(0, "Build");
  344. gender = cache_get_field_content_int(0, "Sex");
  345. age = cache_get_field_content_int(0, "Age");
  346. height = cache_get_field_content_int(0, "Height");
  347. eyecolour = cache_get_field_content_int(0, "EyeColour");
  348. ethnicity = cache_get_field_content_int(0, "Ethnicity");
  349. cache_get_field_content(0, "Appearance", appearance, sqlGameConnection, 64);
  350. new bstr[16], cstr[8], dstr[8], estr[9];
  351. switch(ethnicity)
  352. {
  353. case 0: bstr = "White";
  354. case 1: bstr = "Black";
  355. case 2: bstr = "Asian";
  356. case 3: bstr = "Hispanic";
  357. case 4: bstr = "Latino";
  358. case 5: bstr = "Native American";
  359. default: bstr = "White";
  360. }
  361. switch(eyecolour)
  362. {
  363. case 0: cstr = "Blue";
  364. case 1: cstr = "Brown";
  365. case 2: cstr = "Green";
  366. default: cstr = "Blue";
  367. }
  368. switch(gender)
  369. {
  370. case 0: dstr = "Unknown";
  371. case 1: dstr = "Male";
  372. case 2: dstr = "Female";
  373. default: dstr = "Unknown";
  374. }
  375. switch(build)
  376. {
  377. case 0: estr = "Slim";
  378. case 1: estr = "Average";
  379. case 2: estr = "Muscular";
  380. default: estr = "Average";
  381. }
  382. new astr[512];
  383. format(astr, sizeof(astr), "Gender:\t\t%s\nAge:\t\t\t%d\nEthnicity\t\t%s\nEye Colour:\t\t%s\nBody Build:\t\t%s\nHeight:\t\t\t%dcm\nUnique Features:\t%s",
  384. dstr, age, bstr, cstr, estr, height, appearance);
  385. cache_delete(Cache:result, sqlGameConnection);
  386. ShowPlayerDialog(playerid, DIALOG_APPEARANCE_DISPLAYMDC, DIALOG_STYLE_LIST, "Character Appearance", astr, "Back", "");
  387. }
  388. }
  389. return 1;
  390. }
  391. if(dialogid == DIALOG_MDC_MAIN+4)
  392. {
  393. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  394. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+3, DIALOG_STYLE_LIST, mdcstr, "Profile\nView History\n{FF6347}Add Warrant{FFFFFF}\nTrack Cellphone\nView Active Tickets\nRemove Ticket\nView Old Tickets\nAppearance", "Select", "Close");
  395. }
  396. if(dialogid == DIALOG_MDC_MAIN+5)
  397. {
  398. if(!response)
  399. {
  400. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  401. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+3, DIALOG_STYLE_LIST, mdcstr, "Profile\nView History\n{FF6347}Add Warrant{FFFFFF}\nTrack Cellphone\nView Active Tickets\nRemove Ticket\nView Old Tickets\nAppearance", "Select", "Close");
  402. }
  403. else
  404. {
  405. if(!IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]))) return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+2, DIALOG_STYLE_MSGBOX, "{2641FE}Mobile Data Computer - Lookup function", "{FFFFFF}That player is not online.", "Search", "Return");
  406. if(UseAdmCmdTimer[playerid] > 8)
  407. {
  408. new reason[128];
  409. format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: (autoban) /su spam.", PlayerOOCName(playerid));
  410. SendClientMessageToAll(COLOR_WHITE, str);
  411. format(reason, sizeof(reason), "/su spam.");
  412. BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
  413. return 1;
  414. }
  415. PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pWantedLevel]++;
  416. SetPlayerCriminal(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]), playerid, inputtext);
  417. AddCrime(playerid, GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]), 2, inputtext);
  418. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  419. UseAdmCmdTimer[playerid]++;
  420. SetTimerEx("Timer_UseAdmCmd", 3 *1000, 0, "i", playerid); //3 seconds
  421. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  422. ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+3, DIALOG_STYLE_LIST, mdcstr, "Profile\nView History\n{FF6347}Add Warrant{FFFFFF}\nTrack Cellphone\nView Active Tickets\nRemove Ticket\nView Old Tickets\nAppearance", "Select", "Close");
  423. }
  424. return 1;
  425. }
  426. if(dialogid == DIALOG_MDC_MAIN+6)
  427. {
  428. if(!response) return MDC_MAIN;
  429. else
  430. {
  431. switch(listitem)
  432. {
  433. case 0:// ALL BOLO
  434. {
  435. new bstr[1500], count=0;
  436. for(new i = 0; i < MAX_PLAYERS; i++)
  437. {
  438. if(IsPlayerConnected(i))
  439. {
  440. if(isBOLO[i])
  441. {
  442. new query[128], CrimeReason[128], rows, fields, Cache:result;
  443. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `newcrimes` WHERE `CrimePID` = %d AND CrimeType = 3 ORDER BY `CrimeID` DESC LIMIT 1", PlayerInfo[i][pID]);
  444. result = mysql_query(sqlGameConnection, query);
  445. printf(query);
  446. cache_get_data(rows, fields, sqlGameConnection);
  447. if(!rows)
  448. {
  449. SendClientMessage(playerid, COLOR_RED, "(MDC): An error has occured.");
  450. return MDC_MAIN;
  451. }
  452. cache_get_field_content(0, "CrimeReason", CrimeReason);
  453. count++;
  454. format(bstr, sizeof(bstr), "%s%s - %s\n", bstr, PlayerOOCName(i), CrimeReason);
  455. cache_delete(Cache:result, sqlGameConnection);
  456. }
  457. }
  458. }
  459. if(count==0){ format(bstr, sizeof(bstr), "There are no BOLO notices.\t\t"); }
  460. ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+7, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - Be On Look Out", bstr, "Ok", "");
  461. }
  462. case 1:// ADD BOLO
  463. {
  464. ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+8, DIALOG_STYLE_INPUT, "{2641FE}Mobile Data Computer - Be On Look Out", "{FFFFFF}Please enter a name to {1CC343}CREATE{FFFFFF} a BOLO\n((Please not that you will have to use underscores '_' while searching for names.", "Add", "Return");
  465. }
  466. case 2:// DELETE BOLO
  467. {
  468. ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+9, DIALOG_STYLE_INPUT, "{2641FE}Mobile Data Computer - Be On Look Out", "{FFFFFF}Please enter a name to {FF5F5F}REMOVE{FFFFFF} a BOLO\n((Please not that you will have to use underscores '_' while searching for names.", "Add", "Return");
  469. }
  470. }
  471. }
  472. return 1;
  473. }
  474. if(dialogid == DIALOG_MDC_MAIN+7) return MDC_MAIN;
  475. if(dialogid == DIALOG_MDC_MAIN+8)// add name
  476. {
  477. if(!response) return MDC_MAIN;
  478. format(str, sizeof(str), "%s", inputtext);
  479. strmid(PlayerInfo[playerid][pMDCSearchName], str, 0, strlen(str), 255);
  480. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+10, DIALOG_STYLE_INPUT, "{2641FE}Mobile Data Computer - Be On Look Out", "{FFFFFF}Please add a BOLO reason\t\t\t\t\t\t\t", "Add", "Return");
  481. }
  482. if(dialogid == DIALOG_MDC_MAIN+10)//add reason
  483. {
  484. if(!response) return MDC_MAIN;
  485. new query[128], rows, fields, ISABOLO, realname[MAX_PLAYER_NAME+1], Cache:result;
  486. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE `name` = '%e' LIMIT 1", PlayerInfo[playerid][pMDCSearchName]);
  487. result = mysql_query(sqlGameConnection, query);
  488. cache_get_data(rows, fields, sqlGameConnection);
  489. cache_get_field_content(0, "Name", realname);
  490. ISABOLO = cache_get_field_content_int(0, "isBOLO");
  491. cache_delete(Cache:result, sqlGameConnection);
  492. format(str, sizeof(str), "%s", realname);
  493. strmid(PlayerInfo[playerid][pMDCSearchName], str, 0, strlen(str), 255);
  494. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])))
  495. {
  496. isBOLO[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])] = 1;
  497. format(str, sizeof(str), "DISPATCH: %s %s has placed a new B.O.L.O alert.", GetPlayerRank(playerid), PlayerOOCName(playerid));
  498. SendRadioMessage(PlayerInfo[playerid][pMember], TEAM_BLUE_COLOR, str);
  499. format(str, sizeof(str), "%s", inputtext);
  500. AddCrime(playerid, GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]), 3, str);
  501. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+6, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - BOLO", "View BOLOs\nAdd BOLO\nRemove BOLO", "Okay", "Close");
  502. }
  503. else
  504. {
  505. if(!rows)
  506. {
  507. format(mdcstr, sizeof(mdcstr), "Your BOLO query for '%s' has returned no results.\nPlease type another name adjust the BOLO\n((Please not that you will have to use underscores '_' while searching for names.", PlayerInfo[playerid][pMDCSearchName]);
  508. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+11, DIALOG_STYLE_MSGBOX, "{2641FE}Mobile Data Computer - Be On Look Out", mdcstr, "Search", "Return");
  509. }
  510. if(ISABOLO == 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "(MDC): That person already has a BOLO on them.");
  511. else
  512. {
  513. format(str, sizeof(str), "%s", inputtext);
  514. AddOfflineCrime(playerid, PlayerInfo[playerid][pMDCSearchName], 3, str);
  515. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `isBOLO` = 1 WHERE `name` = '%e'", PlayerInfo[playerid][pMDCSearchName]);
  516. mysql_pquery(sqlGameConnection, query);
  517. format(mdcstr, sizeof(mdcstr), "(MDC): A BOLO has been placed on %s.", PlayerInfo[playerid][pMDCSearchName]);
  518. SendClientMessage(playerid, COLOR_LIGHTRED, mdcstr);
  519. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+6, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - BOLO", "View BOLOs\nAdd BOLO\nRemove BOLO", "Okay", "Close");
  520. }
  521. }
  522. }
  523. if(dialogid == DIALOG_MDC_MAIN+9)//remove
  524. {
  525. if(!response) return MDC_MAIN;
  526. new query[128], rows, fields, ISABOLO, realname[MAX_PLAYER_NAME+1], Cache:result;
  527. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE name = '%e' LIMIT 1", inputtext);
  528. result = mysql_query(sqlGameConnection, query);
  529. cache_get_data(rows, fields);
  530. cache_get_field_content(0, "Name", realname);
  531. ISABOLO = cache_get_field_content_int(0, "isBOLO");
  532. cache_delete(Cache:result, sqlGameConnection);
  533. format(str, sizeof(str), "%s", (realname));
  534. strmid(PlayerInfo[playerid][pMDCSearchName], str, 0, strlen(str), 255);
  535. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])))
  536. {
  537. if(!isBOLO[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])])
  538. {
  539. SendClientMessage(playerid, COLOR_LIGHTRED, "(MDC): That person doesn't have a BOLO on them.");
  540. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+6, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - BOLO", "View BOLOs\nAdd BOLO\nRemove BOLO", "Okay", "Close");
  541. }
  542. isBOLO[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])] = 0;
  543. format(mdcstr, sizeof(mdcstr), "(MDC): You have removed the BOLO on %s.", inputtext);
  544. SendClientMessage(playerid, COLOR_LIGHTRED, mdcstr);
  545. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `newcrimes` SET `CrimeEnabled` = 0 WHERE (`CrimePID` = '%d' AND `CrimeType` = 3)", PlayerInfo[playerid][pMDCSearchID]);
  546. mysql_pquery(sqlGameConnection, query);
  547. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+6, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - BOLO", "View BOLOs\nAdd BOLO\nRemove BOLO", "Okay", "Close");
  548. }
  549. else
  550. {
  551. if(!rows)
  552. {
  553. format(mdcstr, sizeof(mdcstr), "Your BOLO query for '%s' has returned no results.\nPlease type another name adjust the BOLO\n((Please not that you will have to use underscores '_' while searching for names.", inputtext);
  554. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+11, DIALOG_STYLE_MSGBOX, "{2641FE}Mobile Data Computer - Be On Look Out", mdcstr, "Search", "Return");
  555. }
  556. if(ISABOLO == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "(MDC): That person doesn't have a BOLO on them.");
  557. else
  558. {
  559. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `isBOLO` = 0 WHERE `name` = '%e'", inputtext);
  560. mysql_pquery(sqlGameConnection, query);
  561. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `newcrimes` SET `CrimeEnabled` = 0 WHERE (`CrimePID` = '%d' AND `CrimeType` = 3)", PlayerInfo[playerid][pMDCSearchID]);
  562. mysql_pquery(sqlGameConnection, query);
  563. format(mdcstr, sizeof(mdcstr), "(MDC): You have removed the BOLO on %s.", inputtext);
  564. SendClientMessage(playerid, COLOR_LIGHTRED, mdcstr);
  565. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+6, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - BOLO", "View BOLOs\nAdd BOLO\nRemove BOLO", "Okay", "Close");
  566. }
  567. }
  568. }
  569. if(dialogid == DIALOG_MDC_MAIN+11) return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+6, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - BOLO", "View BOLOs\nAdd BOLO\nRemove BOLO", "Okay", "Close");
  570. if(dialogid == DIALOG_MDC_MAIN+12)//remove ticket
  571. {
  572. new realnum = strval(inputtext);
  573. if(!response)
  574. {
  575. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  576. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+3, DIALOG_STYLE_LIST, mdcstr, "Profile\nView History\n{FF6347}Add Warrant{FFFFFF}\nTrack Cellphone\nView Active Tickets\nRemove Ticket\nView Old Tickets\nAppearance", "Select", "Close");
  577. }
  578. if(!IsNumeric(inputtext))
  579. {
  580. SendClientMessage(playerid, COLOR_LIGHTRED, "(MDC): Invalid input.");
  581. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  582. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+3, DIALOG_STYLE_LIST, mdcstr, "Profile\nView History\n{FF6347}Add Warrant{FFFFFF}\nTrack Cellphone\nView Active Tickets\nRemove Ticket\nView Old Tickets\nAppearance", "Select", "Close");
  583. }
  584. if(!IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])))
  585. {
  586. SendClientMessage(playerid, COLOR_LIGHTRED, "(MDC): That player is not online.");
  587. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  588. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+3, DIALOG_STYLE_LIST, mdcstr, "Profile\nView History\n{FF6347}Add Warrant{FFFFFF}\nTrack Cellphone\nView Active Tickets\nRemove Ticket\nView Old Tickets\nAppearance", "Select", "Close");
  589. }
  590. new rows, fields, query[128], pid, date[128], crimeid, active, Cache:result;
  591. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `tickets` WHERE `TicketID` = %d LIMIT 1", realnum);
  592. result = mysql_query(sqlGameConnection, query);
  593. printf(query);
  594. cache_get_data(rows, fields, sqlGameConnection);
  595. if(!rows)
  596. {
  597. SendClientMessage(playerid, COLOR_LIGHTRED, "(MDC): Invalid ticket ID.");
  598. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  599. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+3, DIALOG_STYLE_LIST, mdcstr, "Profile\nView History\n{FF6347}Add Warrant{FFFFFF}\nTrack Cellphone\nView Active Tickets\nRemove Ticket\nView Old Tickets\nAppearance", "Select", "Close");
  600. }
  601. active = cache_get_field_content_int(0, "Active");
  602. pid = cache_get_field_content_int(0, "TicketPID");
  603. cache_get_field_content(0, "Date", date);
  604. if(pid != PlayerInfo[playerid][pMDCSearchID])
  605. {
  606. format(mdcstr, sizeof(mdcstr), "(MDC): That ticket number does not belong to %s.", PlayerInfo[playerid][pMDCSearchName]);
  607. SendClientMessage(playerid, COLOR_LIGHTRED, str);
  608. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  609. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+3, DIALOG_STYLE_LIST, mdcstr, "Profile\nView History\n{FF6347}Add Warrant{FFFFFF}\nTrack Cellphone\nView Active Tickets\nRemove Ticket\nView Old Tickets\nAppearance", "Select", "Close");
  610. }
  611. if(!active)
  612. {
  613. format(mdcstr, sizeof(mdcstr), "(MDC): That ticket number does not belong to %s.", PlayerInfo[playerid][pMDCSearchName]);
  614. SendClientMessage(playerid, COLOR_LIGHTRED, str);
  615. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  616. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+3, DIALOG_STYLE_LIST, mdcstr, "Profile\nView History\n{FF6347}Add Warrant{FFFFFF}\nTrack Cellphone\nView Active Tickets\nRemove Ticket\nView Old Tickets\nAppearance", "Select", "Close");
  617. }
  618. cache_delete(Cache:result, sqlGameConnection);
  619. new query2[128];
  620. mysql_format(sqlGameConnection, query2, sizeof(query2), "UPDATE `tickets` SET `Active` = 0 WHERE `TicketID` = '%d'", realnum);
  621. mysql_pquery(sqlGameConnection, query2);
  622. format(str, sizeof(str), "HQ: %s has deleted ticket number %d (%s).", PlayerICName(playerid), realnum, PlayerInfo[playerid][pMDCSearchName]);
  623. SendRadioMessage(1, TEAM_BLUE_COLOR, str);
  624. format(str, sizeof(str), "* %s has removed your ticket #%d", PlayerICName(playerid), realnum);
  625. SendClientMessage(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]), COLOR_LIGHTRED, str);
  626. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `newcrimes` WHERE `DATE` = '%e' LIMIT 1", date);
  627. result = mysql_query(sqlGameConnection, query);
  628. cache_get_data(rows, fields, sqlGameConnection);
  629. if(!rows) return SendClientMessage(playerid, COLOR_GREY, "An error has occured while updating the MDC.");
  630. crimeid = cache_get_field_content_int(0, "CrimeID");
  631. cache_delete(Cache:result, sqlGameConnection);
  632. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `newcrimes` SET `CrimeEnabled` = 0 WHERE `CrimeID` = '%d'", crimeid);
  633. mysql_pquery(sqlGameConnection, query);
  634. }
  635. if(dialogid == DIALOG_NAMECHANGES)
  636. {
  637. if(!response) return 1;
  638. switch(listitem)
  639. {
  640. case 0://recent
  641. {
  642. new query[128], OldName[26], NewName[26], ChangedBy[26], rows, fields, cstr[5000], Date[50], Cache:result;
  643. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `namechanges` ORDER BY `ID` DESC");
  644. result = mysql_query(sqlGameConnection, query);
  645. cache_get_data(rows, fields, sqlGameConnection);
  646. if(!rows) return SendClientMessage(playerid, COLOR_WHITE, "No namechanges on record.");
  647. format(cstr, sizeof(cstr), "Date\t\tOld Name\t\tNew Name\t\tAdmin\n");
  648. for(new i = 0; i < rows; i++)
  649. {
  650. cache_get_field_content(i, "OldName", OldName);
  651. cache_get_field_content(i, "NewName", NewName);
  652. cache_get_field_content(i, "ApprovedBy", ChangedBy);
  653. cache_get_field_content(i, "Date", Date);
  654. format(cstr, sizeof(cstr), "%s%s\t\t%s\t\t%s\t\t%s\n", cstr, Date, OldName, NewName, ChangedBy);
  655. }
  656. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Namechange Record", cstr, "Ok", "");
  657. cache_delete(Cache:result, sqlGameConnection);
  658. }
  659. case 1: ShowPlayerDialog(playerid, DIALOG_NAMECHANGES_OLD, DIALOG_STYLE_INPUT, "Old Name Records", "Search By Old Name", "Ok", "");
  660. case 2: ShowPlayerDialog(playerid, DIALOG_NAMECHANGES_NEW, DIALOG_STYLE_INPUT, "New Name Records", "Search By New Name", "Ok", "");
  661. case 3: ShowPlayerDialog(playerid, DIALOG_NAMECHANGES_ADMIN, DIALOG_STYLE_INPUT, "Admin Name Record", "Search Changes By A Specific Admin", "Ok", "");
  662. case 4: ShowPlayerDialog(playerid, DIALOG_NAMECHANGES_ID, DIALOG_STYLE_INPUT, "Namechange Records", "Search By Account ID", "Ok", "");
  663. }
  664. return 1;
  665. }
  666. if(dialogid == DIALOG_NAMECHANGES_OLD)
  667. {
  668. if(!response) return 1;
  669. else
  670. {
  671. new query[128], OldName[26], NewName[26], ChangedBy[26], rows, fields, cstr[5000], Date[50], Cache:result;
  672. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `namechanges` WHERE `OldName`='%e' ORDER BY `ID` DESC", inputtext);
  673. result = mysql_query(sqlGameConnection, query);
  674. cache_get_data(rows, fields, sqlGameConnection);
  675. if(!rows) return SendClientMessage(playerid, COLOR_WHITE, "No namechanges on record.");
  676. format(cstr, sizeof(cstr), "Date\t\tOld Name\t\tNew Name\t\tAdmin\n");
  677. for(new i = 0; i < rows; i++)
  678. {
  679. cache_get_field_content(i, "OldName", OldName);
  680. cache_get_field_content(i, "NewName", NewName);
  681. cache_get_field_content(i, "ApprovedBy", ChangedBy);
  682. cache_get_field_content(i, "Date", Date);
  683. format(cstr, sizeof(cstr), "%s%s\t\t%s\t\t%s\t\t%s\n", cstr, Date, OldName, NewName, ChangedBy);
  684. }
  685. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Namechange Record", cstr, "Ok", "");
  686. cache_delete(Cache:result, sqlGameConnection);
  687. }
  688. return 1;
  689. }
  690. if(dialogid == DIALOG_NAMECHANGES_NEW)
  691. {
  692. if(!response) return 1;
  693. else
  694. {
  695. new query[128], OldName[26], NewName[26], ChangedBy[26], rows, fields, cstr[5000], Date[50], Cache:result;
  696. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `namechanges` WHERE `NewName`='%e' ORDER BY `ID` DESC", inputtext);
  697. result = mysql_query(sqlGameConnection, query);
  698. cache_get_data(rows, fields, sqlGameConnection);
  699. if(!rows) return SendClientMessage(playerid, COLOR_WHITE, "No namechanges on record.");
  700. format(cstr, sizeof(cstr), "Date\t\tOld Name\t\tNew Name\t\tAdmin\n");
  701. for(new i = 0; i < rows; i++)
  702. {
  703. cache_get_field_content(i, "OldName", OldName);
  704. cache_get_field_content(i, "NewName", NewName);
  705. cache_get_field_content(i, "ApprovedBy", ChangedBy);
  706. cache_get_field_content(i, "Date", Date);
  707. format(cstr, sizeof(cstr), "%s%s\t\t%s\t\t%s\t\t%s\n", cstr, Date, OldName, NewName, ChangedBy);
  708. }
  709. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Namechange Record", cstr, "Ok", "");
  710. cache_delete(Cache:result, sqlGameConnection);
  711. }
  712. return 1;
  713. }
  714. if(dialogid == DIALOG_NAMECHANGES_ADMIN)
  715. {
  716. if(!response) return 1;
  717. else
  718. {
  719. new query[128], OldName[26], NewName[26], ChangedBy[26], rows, fields, cstr[5000], Date[50], Cache:result;
  720. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `namechanges` WHERE `ApprovedBy`='%e' ORDER BY `ID` DESC", inputtext);
  721. result = mysql_query(sqlGameConnection, query);
  722. cache_get_data(rows, fields, sqlGameConnection);
  723. if(!rows) return SendClientMessage(playerid, COLOR_WHITE, "No namechanges on record.");
  724. format(cstr, sizeof(cstr), "Date\t\tOld Name\t\tNew Name\t\tAdmin\n");
  725. for(new i = 0; i < rows; i++)
  726. {
  727. cache_get_field_content(i, "OldName", OldName);
  728. cache_get_field_content(i, "NewName", NewName);
  729. cache_get_field_content(i, "ApprovedBy", ChangedBy);
  730. cache_get_field_content(i, "Date", Date);
  731. format(cstr, sizeof(cstr), "%s%s\t\t%s\t\t%s\t\t%s\n", cstr, Date, OldName, NewName, ChangedBy);
  732. }
  733. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Namechange Record", cstr, "Ok", "");
  734. cache_delete(Cache:result, sqlGameConnection);
  735. }
  736. return 1;
  737. }
  738. if(dialogid == DIALOG_NAMECHANGES_ID)
  739. {
  740. if(!response) return 1;
  741. else
  742. {
  743. new query[128], OldName[26], NewName[26], ChangedBy[26], rows, fields, cstr[5000], Date[50], Cache:result;
  744. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `namechanges` WHERE `pID`='%e' ORDER BY `ID` DESC", inputtext);
  745. result = mysql_query(sqlGameConnection, query);
  746. cache_get_data(rows, fields, sqlGameConnection);
  747. if(!rows) return SendClientMessage(playerid, COLOR_WHITE, "No namechanges on record.");
  748. format(cstr, sizeof(cstr), "Date\t\tOld Name\t\tNew Name\t\tAdmin\n");
  749. for(new i = 0; i < rows; i++)
  750. {
  751. cache_get_field_content(i, "OldName", OldName);
  752. cache_get_field_content(i, "NewName", NewName);
  753. cache_get_field_content(i, "ApprovedBy", ChangedBy);
  754. cache_get_field_content(i, "Date", Date);
  755. format(cstr, sizeof(cstr), "%s%s\t\t%s\t\t%s\t\t%s\n", cstr, Date, OldName, NewName, ChangedBy);
  756. }
  757. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Namechange Record", cstr, "Ok", "");
  758. cache_delete(Cache:result, sqlGameConnection);
  759. }
  760. return 1;
  761. }
  762. if(dialogid == DIALOG_HOUSEUPGRADE)
  763. {
  764. if(!response) return 1;
  765. else
  766. {
  767. switch(listitem)
  768. {
  769. case 0:
  770. {
  771. if(HouseInfo[PlayerInfo[playerid][pHouseID]][hAlarm] == 0)
  772. {
  773. if(PlayerInfo[playerid][pCash] >= 30000)
  774. {
  775. new location[MAX_ZONE_NAME];
  776. Get2DZone(location, MAX_ZONE_NAME, HouseInfo[PlayerInfo[playerid][pHouseID]][hOutsideX], HouseInfo[PlayerInfo[playerid][pHouseID]][hOutsideY], HouseInfo[PlayerInfo[playerid][pHouseID]][hOutsideZ]);
  777. HouseInfo[PlayerInfo[playerid][pHouseID]][hAlarm] = 1;
  778. HouseInfo[PlayerInfo[playerid][pHouseID]][hModified] = 1;
  779. PlayerInfo[playerid][pCash] -= 30000;
  780. format(str, sizeof(str), "[House Upgrade] You have purchased an alarm for your house (%d %s) for $30,000.", PlayerInfo[playerid][pHouseID], location);
  781. SendClientMessage(playerid, COLOR_YELLOW, str);
  782. }
  783. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  784. }
  785. else return SendClientMessage(playerid, COLOR_GREY, "Your house already has an alarm fitted.");
  786. }
  787. }
  788. }
  789. }
  790. if(dialogid == TAXICALL_DIALOG)
  791. {
  792. if(response == 1)
  793. {
  794. if(strval(inputtext) > 0 && strval(inputtext) < 20)
  795. {
  796. new Float:X, Float:Y, Float:Z;
  797. GetPlayerPos(TaxiCInfoID[strval(inputtext)], X, Y, Z);
  798. SetPlayerCheckpointEx(playerid, X, Y, Z, 1.0);
  799. CP[playerid] = CHECKPOINT_TAXI_CALLER;
  800. new string[128];
  801. format(string, sizeof(string), "%s in %s, has been marked on your GPS.", TaxiCInfo[strval(inputtext)][taxiname], TaxiCInfo[strval(inputtext)][taxilocation]);
  802. SendClientMessage(playerid, -1, string);
  803. TaxiCID[playerid] = TaxiCInfoID[strval(inputtext)];
  804. TaxiCInfoID[strval(inputtext)] = -1;
  805. TaxiCInfo[strval(inputtext)][taxiname] = "0";
  806. } else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid caller ID.");
  807. return 1;
  808. }
  809. }
  810. if(dialogid == DIALOG_MOD_EDIT)
  811. {
  812. if(response)
  813. {
  814. new vid = GetPlayerVehicleID(playerid);
  815. if(listitem == 0)
  816. {
  817. if(GetVehicleComponentInSlot(vid, 0) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  818. removeSlotComponent(vid, 0);
  819. }
  820. if(listitem == 1)
  821. {
  822. if(GetVehicleComponentInSlot(vid, 1) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  823. removeSlotComponent(vid, 1);
  824. }
  825. if(listitem == 2)
  826. {
  827. if(GetVehicleComponentInSlot(vid, 2) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  828. removeSlotComponent(vid, 2);
  829. }
  830. if(listitem == 3)
  831. {
  832. if(GetVehicleComponentInSlot(vid, 3) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  833. removeSlotComponent(vid, 3);
  834. }
  835. if(listitem == 4)
  836. {
  837. if(GetVehicleComponentInSlot(vid, 4) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  838. removeSlotComponent(vid, 4);
  839. }
  840. if(listitem == 5)
  841. {
  842. if(GetVehicleComponentInSlot(vid, 5) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  843. removeSlotComponent(vid, 5);
  844. }
  845. if(listitem == 6)
  846. {
  847. if(GetVehicleComponentInSlot(vid, 6) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  848. removeSlotComponent(vid, 6);
  849. }
  850. if(listitem == 7)
  851. {
  852. if(GetVehicleComponentInSlot(vid, 7) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  853. removeSlotComponent(vid, 7);
  854. }
  855. if(listitem == 8)
  856. {
  857. if(GetVehicleComponentInSlot(vid, 8) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  858. removeSlotComponent(vid, 8);
  859. }
  860. if(listitem == 9)
  861. {
  862. if(GetVehicleComponentInSlot(vid, 9) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  863. removeSlotComponent(vid, 9);
  864. }
  865. if(listitem == 10)
  866. {
  867. if(GetVehicleComponentInSlot(vid, 10) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  868. removeSlotComponent(vid, 10);
  869. }
  870. if(listitem == 11)
  871. {
  872. if(GetVehicleComponentInSlot(vid, 11) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  873. removeSlotComponent(vid, 11);
  874. }
  875. if(listitem == 12)
  876. {
  877. if(GetVehicleComponentInSlot(vid, 12) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  878. removeSlotComponent(vid, 12);
  879. }
  880. if(listitem == 13)
  881. {
  882. if(GetVehicleComponentInSlot(vid, 13) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  883. removeSlotComponent(vid, 13);
  884. }
  885. }
  886. }
  887. if(dialogid == DIALOG_PAINTBALL_WEAPONS1) //handguns
  888. {
  889. if(!response)
  890. {
  891. ClearPaintballGuns(playerid);
  892. return 1;
  893. }
  894. if(listitem == 0)
  895. {
  896. pPaintGuns[playerid][1] = 22;
  897. format(PaintBall[playerid][pbWeaponName1], 32, "{FF0000}Colt 45{FFFFFF}");
  898. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS2, DIALOG_STYLE_LIST, "Shotgun Selection", "Shotgun\nSawnoff Shotgun\nSpas 12", "Select", "Quit");
  899. }
  900. if(listitem == 1)
  901. {
  902. format(PaintBall[playerid][pbWeaponName1], 32, "{FF0000}Desert Eagle{FFFFFF}");
  903. pPaintGuns[playerid][1] = 24;
  904. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS2, DIALOG_STYLE_LIST, "Shotgun Selection", "Shotgun\nSawnoff Shotgun\nSpas 12", "Select", "Quit");
  905. }
  906. }
  907. if(dialogid == DIALOG_MAP)
  908. {
  909. if(!response) return 1;
  910. else
  911. {
  912. switch(listitem)
  913. {
  914. case 0:
  915. {
  916. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Detective job.");
  917. goingJob[playerid] = true;
  918. SetPlayerCheckpointEx(playerid, 1553.5276, -1675.4719, 16.1953, 5.0);
  919. }
  920. case 1:
  921. {
  922. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Lawyer job.");
  923. goingJob[playerid] = true;
  924. SetPlayerCheckpointEx(playerid, 1381.0413, -1088.8511, 27.3906, 5.0);
  925. }
  926. case 2:
  927. {
  928. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Drug Dealer job.");
  929. goingJob[playerid] = true;
  930. SetPlayerCheckpointEx(playerid, 2166.3772, -1675.3829, 15.0859, 5.0);
  931. }
  932. case 3:
  933. {
  934. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Product Dealer job.");
  935. goingJob[playerid] = true;
  936. SetPlayerCheckpointEx(playerid, 972.0286, -1385.7682, 13.5477, 5.0);
  937. }
  938. case 4:
  939. {
  940. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Mechanic job.");
  941. goingJob[playerid] = true;
  942. SetPlayerCheckpointEx(playerid, 2329.4089, -2316.0996, 13.5469, 5.0);
  943. }
  944. case 5:
  945. {
  946. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Bodyguard job.");
  947. goingJob[playerid] = true;
  948. SetPlayerCheckpointEx(playerid, 2226.1716, -1718.1792, 13.5165, 5.0);
  949. }
  950. case 6:
  951. {
  952. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Arms Dealer job.");
  953. goingJob[playerid] = true;
  954. SetPlayerCheckpointEx(playerid, 1366.4325, -1275.2096, 13.5469, 5.0);
  955. }
  956. case 7:
  957. {
  958. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Boxer job.");
  959. goingJob[playerid] = true;
  960. SetPlayerCheckpointEx(playerid, 2227.9595, -1722.2257, 13.2633, 5.0);
  961. }
  962. case 8:
  963. {
  964. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Taxi Driver job.");
  965. goingJob[playerid] = true;
  966. SetPlayerCheckpointEx(playerid, 1741.7062, -1863.6664, 13.5748, 5.0);
  967. }
  968. case 9:
  969. {
  970. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Drug Smuggler job.");
  971. goingJob[playerid] = true;
  972. SetPlayerCheckpointEx(playerid, 2354.2703, -1169.3293, 28.0083, 5.0);
  973. }
  974. case 10:
  975. {
  976. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the San Andreas Police Department.");
  977. goingJob[playerid] = true;
  978. SetPlayerCheckpointEx(playerid, 1552.9044, -1675.5406, 16.1953, 5.0);
  979. }
  980. case 11:
  981. {
  982. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Los Santos Bank.");
  983. goingJob[playerid] = true;
  984. SetPlayerCheckpointEx(playerid, 1462.2672, -1012.0541, 26.8438, 5.0);
  985. }
  986. case 12:
  987. {
  988. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Los Santos Gym.");
  989. goingJob[playerid] = true;
  990. SetPlayerCheckpointEx(playerid, 2228.8279, -1721.8065, 13.5659, 5.0);
  991. }
  992. case 13:
  993. {
  994. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Fire & Medical Department.");
  995. goingJob[playerid] = true;
  996. SetPlayerCheckpointEx(playerid, 1108.6631, -1337.4138, 13.8500, 5.0);
  997. }
  998. case 14:
  999. {
  1000. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the SAN Station.");
  1001. goingJob[playerid] = true;
  1002. SetPlayerCheckpointEx(playerid, 648.2065, -1353.3262, 13.12, 5.0);
  1003. }
  1004. }
  1005. }
  1006. }
  1007. if(dialogid == DIALOG_PAINTBALL_WEAPONS2) //shotguns
  1008. {
  1009. if(!response)
  1010. {
  1011. ClearPaintballGuns(playerid);
  1012. return 1;
  1013. }
  1014. if(listitem == 0)
  1015. {
  1016. pPaintGuns[playerid][2] = 25;
  1017. format(PaintBall[playerid][pbWeaponName2], 32, "{FF0000}Shotgun{FFFFFF}");
  1018. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS3, DIALOG_STYLE_LIST, "SMG Selection", "Uzi\nMP5\nTec-9", "Select", "Quit");
  1019. }
  1020. if(listitem == 1)
  1021. {
  1022. pPaintGuns[playerid][2] = 26;
  1023. format(PaintBall[playerid][pbWeaponName2], 32, "{FF0000}Sawnoff Shotgun{FFFFFF}");
  1024. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS3, DIALOG_STYLE_LIST, "SMG Selection", "Uzi\nMP5\nTec-9", "Select", "Quit");
  1025. }
  1026. if(listitem == 2)
  1027. {
  1028. pPaintGuns[playerid][2] = 27;
  1029. format(PaintBall[playerid][pbWeaponName2], 32, "{FF0000}Spas 12{FFFFFF}");
  1030. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS3, DIALOG_STYLE_LIST, "SMG Selection", "Uzi\nMP5\nTec-9", "Select", "Quit");
  1031. }
  1032. }
  1033. if(dialogid == DIALOG_PAINTBALL_WEAPONS3)
  1034. {
  1035. if(!response)
  1036. {
  1037. ClearPaintballGuns(playerid);
  1038. return 1;
  1039. }
  1040. if(listitem == 0)
  1041. {
  1042. pPaintGuns[playerid][3] = 28;
  1043. format(PaintBall[playerid][pbWeaponName3], 32, "{FF0000}UZI{FFFFFF}");
  1044. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS4, DIALOG_STYLE_LIST, "Assault Selection", "AK-47\nM4", "Select", "Quit");
  1045. }
  1046. if(listitem == 1)
  1047. {
  1048. pPaintGuns[playerid][3] = 29;
  1049. format(PaintBall[playerid][pbWeaponName3], 32, "{FF0000}MP5{FFFFFF}");
  1050. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS4, DIALOG_STYLE_LIST, "Assault Selection", "AK-47\nM4", "Select", "Quit");
  1051. }
  1052. if(listitem == 2)
  1053. {
  1054. pPaintGuns[playerid][3] = 32;
  1055. format(PaintBall[playerid][pbWeaponName3], 32, "{FF0000}Tec-9{FFFFFF}");
  1056. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS4, DIALOG_STYLE_LIST, "Assault Selection", "AK-47\nM4", "Select", "Quit");
  1057. }
  1058. }
  1059. if(dialogid == DIALOG_PAINTBALL_WEAPONS4)
  1060. {
  1061. if(!response)
  1062. {
  1063. ClearPaintballGuns(playerid);
  1064. return 1;
  1065. }
  1066. if(listitem == 0)
  1067. {
  1068. pPaintGuns[playerid][4] = 30;
  1069. format(PaintBall[playerid][pbWeaponName4], 32, "{FF0000}AK-47{FFFFFF}");
  1070. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS5, DIALOG_STYLE_LIST, "Rifle Selection", "County Rifle\nSniper Rifle", "Select", "Quit");
  1071. }
  1072. if(listitem == 1)
  1073. {
  1074. pPaintGuns[playerid][4] = 31;
  1075. format(PaintBall[playerid][pbWeaponName4], 32, "{FF0000}M4{FFFFFF}");
  1076. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS5, DIALOG_STYLE_LIST, "Rifle Selection", "County Rifle\nSniper Rifle", "Select", "Quit");
  1077. }
  1078. }
  1079. if(dialogid == DIALOG_PAINTBALL_WEAPONS5)
  1080. {
  1081. if(!response)
  1082. {
  1083. ClearPaintballGuns(playerid);
  1084. return 1;
  1085. }
  1086. if(listitem == 0)
  1087. {
  1088. new pbjoinstr[1000];
  1089. pPaintGuns[playerid][5] = 33;
  1090. format(PaintBall[playerid][pbWeaponName5], 32, "{FF0000}County Rifle{FFFFFF}");
  1091. format(pbjoinstr, sizeof(pbjoinstr), "{FFFFFF}Handgun: %s\nShotgun: %s\nSMG: %s\nAssault Rifle: %s\nRifle: %s\n\n\n{FFFF00}If you're sure you want to join with these weapons, press 'Enter'.", PaintBall[playerid][pbWeaponName1], PaintBall[playerid][pbWeaponName2], PaintBall[playerid][pbWeaponName3], PaintBall[playerid][pbWeaponName4], PaintBall[playerid][pbWeaponName5]);
  1092. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS6, DIALOG_STYLE_MSGBOX, "Paintball Confirmation", pbjoinstr, "Enter", "Quit");
  1093. }
  1094. if(listitem == 1)
  1095. {
  1096. new pbjoinstr[1000];
  1097. pPaintGuns[playerid][5] = 34;
  1098. format(PaintBall[playerid][pbWeaponName5], 32, "{FF0000}Sniper Rifle{FFFFFF}");
  1099. format(pbjoinstr, sizeof(pbjoinstr), "{FFFFFF}Handgun: %s\nShotgun: %s\nSMG: %s\nAssault Rifle: %s\nRifle: %s\n\n\n{FFFF00}If you're sure you want to join with these weapons, press 'Enter'.", PaintBall[playerid][pbWeaponName1], PaintBall[playerid][pbWeaponName2], PaintBall[playerid][pbWeaponName3], PaintBall[playerid][pbWeaponName4], PaintBall[playerid][pbWeaponName5]);
  1100. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS6, DIALOG_STYLE_MSGBOX, "Paintball Confirmation", pbjoinstr, "Enter", "Quit");
  1101. }
  1102. }
  1103. if(dialogid == DIALOG_PAINTBALL_WEAPONS6)
  1104. {
  1105. if(!response)
  1106. {
  1107. ClearPaintballGuns(playerid);
  1108. return 1;
  1109. }
  1110. else
  1111. {
  1112. enter_pb(playerid);
  1113. }
  1114. }
  1115. if(dialogid == DIALOG_LOGIN)
  1116. {
  1117. if(response)
  1118. {
  1119. if(!gamemodeLoaded)
  1120. {
  1121. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "{FFFFFF}Welcome back to {FFFF00}Elite City Role Play{FFFFFF}.\n\nPlease enter your password below to login to your account:", "Login", "Quit");
  1122. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Please wait until the gamemode has finished loading.");
  1123. return 1;
  1124. }
  1125. if(!strlen(inputtext))
  1126. {
  1127. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "{FFFFFF}Welcome back to {FFFF00}Elite City Role Play{FFFFFF}.\n\nPlease enter your password below to login to your account:", "Login", "Quit");
  1128. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You must enter a password.");
  1129. return 1;
  1130. }
  1131. if(strlen(inputtext) > 64)
  1132. {
  1133. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "{FFFFFF}Welcome back to {FFFF00}Elite City Role Play{FFFFFF}.\n\nPlease enter your password below to login to your account:", "Login", "Quit");
  1134. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Password is too long.");
  1135. return 1;
  1136. }
  1137. if(gPlayerLogged[playerid])
  1138. {
  1139. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You are already logged in.");
  1140. return 1;
  1141. }
  1142. //\\// Password & Verification
  1143. //=============================
  1144. new bool: correctpass = false;
  1145. if(isnull(NewPassword[playerid])) {
  1146. //password in old shitty method
  1147. if(isnull(tempHash[playerid])) {
  1148. new encrypted_password[65];
  1149. strmid(encrypted_password, inputtext, 0, strlen(inputtext), 255);
  1150. Encrypt(encrypted_password);
  1151. if(strcmp(encrypted_password, tempPassword[playerid], true) == 0) { //password matches Key_ field
  1152. HashPassword(inputtext, playerid);
  1153. correctpass = true;
  1154. }
  1155. //password in buggy SHA_256 -- warning remove this on SA:MP 0.3.8 update, replace with error message for manual password change
  1156. //SHA_256 was buggy in SA:MP 0.3.7 RC-X and has been fixed hence will no longer match correct passwords
  1157. } else {
  1158. new password[65];
  1159. strmid(password, inputtext, 0, strlen(inputtext), 255);
  1160. SHA256_PassHash(password, tempSalt[playerid], password, sizeof(password));
  1161. //SHA_256 matches
  1162. if(strcmp(password, tempHash[playerid], true) == 0) {
  1163. HashPassword(inputtext, playerid);
  1164. correctpass = true;
  1165. }
  1166. }
  1167. }
  1168. //Use the new password method
  1169. else {
  1170. if(CheckPassword(inputtext, NewPassword[playerid], NewSalt[playerid], playerid)) {
  1171. correctpass = true;
  1172. }
  1173. }
  1174. //Correct password?
  1175. if(correctpass) {
  1176. new query[128];
  1177. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE `name` = '%e' LIMIT 1", PlayerName(playerid));
  1178. mysql_pquery(sqlGameConnection, query, "OnPlayerLoad", "dd", playerid, MySQLConnectionOrder[playerid]);
  1179. }
  1180. //If not, try again
  1181. else {
  1182. if(LoginAttempts[playerid] >= 2) {
  1183. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Incorrect password, you have been kicked as a result.");
  1184. KickEx(playerid);
  1185. return 1;
  1186. }
  1187. new msgstring[128];
  1188. format(msgstring, sizeof(msgstring), "{FFFFFF}Welcome back to {FFFF00}Elite City Role Play{FFFFFF}.\n\nPlease enter your password below to login to your account:", msgstring);
  1189. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", msgstring, "Login", "Quit");
  1190. displayCenterHUDInfo(playerid, "Incorrect password.", 8);
  1191. LoginAttempts[playerid]++;
  1192. }
  1193. return 1;
  1194. }
  1195. else
  1196. {
  1197. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You have left the server.");
  1198. KickEx(playerid);
  1199. }
  1200. return 1;
  1201. }
  1202. if(dialogid == DIALOG_TAXI)
  1203. {
  1204. if(response)
  1205. {
  1206. if(listitem == 0)
  1207. {
  1208. ShowPlayerDialog(playerid, DIALOG_TAXI_UNIFORMS, DIALOG_STYLE_LIST, "Taxi Uniforms", "Woman (ID 211)\nTrainee (ID 255)\nRookie (ID 261)\nTaxi Driver (ID 61)\nCabbie (ID 234)\nVeteran (ID 188)\nSupervisor (ID 253)\nCommissioner (ID 147)", "Select", "Cancel");
  1209. }
  1210. if(listitem == 1)
  1211. {
  1212. ShowPlayerDialog(playerid, DIALOG_TAXI_WEAPONS, DIALOG_STYLE_LIST, "Taxi Armory", "Colt 45 ($150)\nShotgun ($350)\nKevlar ($5,000)", "Select", "Cancel");
  1213. }
  1214. }
  1215. }
  1216. if(dialogid == DIALOG_TAXI_UNIFORMS)
  1217. {
  1218. if(!response) return 1;
  1219. PlayerInfo[playerid][pClothes] = 0;
  1220. if(listitem == 0)
  1221. {
  1222. PlayerInfo[playerid][pModel] = 211;
  1223. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1224. }
  1225. if(listitem == 1)
  1226. {
  1227. PlayerInfo[playerid][pModel] = 255;
  1228. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1229. }
  1230. if(listitem == 2)
  1231. {
  1232. PlayerInfo[playerid][pModel] = 261;
  1233. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1234. }
  1235. if(listitem == 3)
  1236. {
  1237. PlayerInfo[playerid][pModel] = 61;
  1238. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1239. }
  1240. if(listitem == 4)
  1241. {
  1242. PlayerInfo[playerid][pModel] = 234;
  1243. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1244. }
  1245. if(listitem == 5)
  1246. {
  1247. PlayerInfo[playerid][pModel] = 188;
  1248. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1249. }
  1250. if(listitem == 6)
  1251. {
  1252. PlayerInfo[playerid][pModel] = 253;
  1253. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1254. }
  1255. if(listitem == 7)
  1256. {
  1257. PlayerInfo[playerid][pModel] = 147;
  1258. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1259. }
  1260. }
  1261. if(dialogid == DIALOG_TAXI_WEAPONS)
  1262. {
  1263. if(!response) return 1;
  1264. if(listitem == 0)
  1265. {
  1266. if(PlayerInfo[playerid][pCash] >= 150)
  1267. {
  1268. GivePlayerGun(playerid, 22);
  1269. PlayerInfo[playerid][pCash] -= 150;
  1270. }
  1271. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  1272. }
  1273. if(listitem == 1)
  1274. {
  1275. if(PlayerInfo[playerid][pCash] >= 350)
  1276. {
  1277. GivePlayerGun(playerid, 25);
  1278. PlayerInfo[playerid][pCash] -= 350;
  1279. }
  1280. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  1281. }
  1282. if(listitem == 2)
  1283. {
  1284. if(PlayerInfo[playerid][pCash] >= 5000)
  1285. {
  1286. SetPlayerArmour(playerid, 100.0);
  1287. PlayerInfo[playerid][pCash] -= 5000;
  1288. }
  1289. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  1290. }
  1291. }
  1292. if(dialogid == DIALOG_CRIME)
  1293. {
  1294. if(response)
  1295. {
  1296. new money = PlayerInfo[playerid][pCash];
  1297. switch(listitem)
  1298. {
  1299. case 0: // Desert Eagle
  1300. {
  1301. if(money >= 2500) {
  1302. GiveMoney(playerid, -2500);
  1303. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1304. GivePlayerGun(playerid, WEAPON_DEAGLE);
  1305. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a Desert Eagle for $2,500.");
  1306. } else {
  1307. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1308. }
  1309. }
  1310. case 1: // SD Pistol
  1311. {
  1312. if(money >= 5000) {
  1313. GiveMoney(playerid, -5000);
  1314. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1315. GivePlayerGun(playerid, WEAPON_SILENCED);
  1316. SendClientMessage(playerid, COLOR_CRIME, "You have purchased an SD Pistol for $5,000.");
  1317. } else {
  1318. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1319. }
  1320. }
  1321. case 2: // Break
  1322. {
  1323. showCrimeDialog(playerid);
  1324. }
  1325. case 3: // M4
  1326. {
  1327. if(money >= 12500) {
  1328. GiveMoney(playerid, -12500);
  1329. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1330. GivePlayerGun(playerid, WEAPON_M4);
  1331. SendClientMessage(playerid, COLOR_CRIME, "You have purchased an M4 for $12,500.");
  1332. } else {
  1333. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1334. }
  1335. }
  1336. case 4: // AK47
  1337. {
  1338. if(money >= 7500) {
  1339. GiveMoney(playerid, -7500);
  1340. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1341. GivePlayerGun(playerid, WEAPON_AK47);
  1342. SendClientMessage(playerid, COLOR_CRIME, "You have purchased an AK47 for $7,500.");
  1343. } else {
  1344. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1345. }
  1346. }
  1347. case 5: // Break
  1348. {
  1349. showCrimeDialog(playerid);
  1350. }
  1351. case 6: // Spas12
  1352. {
  1353. if(money >= 25000) {
  1354. GiveMoney(playerid, -25000);
  1355. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1356. GivePlayerGun(playerid, WEAPON_SHOTGSPA);
  1357. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a combat shotgun for $25,000.");
  1358. } else {
  1359. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1360. }
  1361. }
  1362. case 7: // Shotgun
  1363. {
  1364. if(money >= 2000) {
  1365. GiveMoney(playerid, -2000);
  1366. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1367. GivePlayerGun(playerid, WEAPON_SHOTGUN);
  1368. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a shotgun for $2,000.");
  1369. } else {
  1370. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1371. }
  1372. }
  1373. case 8: // Sawn off
  1374. {
  1375. if(money >= 7500) {
  1376. GiveMoney(playerid, -7500);
  1377. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1378. GivePlayerGun(playerid, WEAPON_SAWEDOFF);
  1379. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a sawn-off shotgun for $7,500.");
  1380. } else {
  1381. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1382. }
  1383. }
  1384. case 9: // Break
  1385. {
  1386. showCrimeDialog(playerid);
  1387. }
  1388. case 10: // MP5
  1389. {
  1390. if(money >= 1000) {
  1391. GiveMoney(playerid, -1000);
  1392. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1393. GivePlayerGun(playerid, WEAPON_MP5);
  1394. SendClientMessage(playerid, COLOR_CRIME, "You have purchased an MP5 for $1,000.");
  1395. } else {
  1396. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1397. }
  1398. }
  1399. case 11: // TEC9
  1400. {
  1401. if(money >= 2500) {
  1402. GiveMoney(playerid, -2500);
  1403. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1404. GivePlayerGun(playerid, WEAPON_TEC9);
  1405. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a TEC9 for $2,500.");
  1406. } else {
  1407. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1408. }
  1409. }
  1410. case 12: // Uzi
  1411. {
  1412. if(money >= 2500) {
  1413. GiveMoney(playerid, -2500);
  1414. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1415. GivePlayerGun(playerid, WEAPON_UZI);
  1416. SendClientMessage(playerid, COLOR_CRIME, "You have purchased an Uzi for $2,500.");
  1417. } else {
  1418. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1419. }
  1420. }
  1421. case 13: // Break
  1422. {
  1423. showCrimeDialog(playerid);
  1424. }
  1425. case 14: // Rifle
  1426. {
  1427. if(money >= 2500) {
  1428. GiveMoney(playerid, -2500);
  1429. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1430. GivePlayerGun(playerid, WEAPON_RIFLE);
  1431. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a country rifle for $2,500.");
  1432. } else {
  1433. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1434. }
  1435. }
  1436. case 15: // Sniper Rifle
  1437. {
  1438. if(money >= 15000) {
  1439. GiveMoney(playerid, -15000);
  1440. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1441. GivePlayerGun(playerid, WEAPON_SNIPER);
  1442. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a sniper rifle for $15,000.");
  1443. } else {
  1444. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1445. }
  1446. }
  1447. case 16: // Break
  1448. {
  1449. showCrimeDialog(playerid);
  1450. }
  1451. case 17: // Flamethrower
  1452. {
  1453. if(PlayerInfo[playerid][pGroupRank] < 3)
  1454. return SendClientMessage(playerid, COLOR_CRIME, "You need to be R3+ to use this.");
  1455. if(money >= 20000) {
  1456. GiveMoney(playerid, -20000);
  1457. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1458. GivePlayerGun(playerid, WEAPON_FLAMETHROWER);
  1459. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a flamethrower for $20,000.");
  1460. } else {
  1461. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1462. }
  1463. }
  1464. case 18: // C4
  1465. {
  1466. if(PlayerInfo[playerid][pGroupRank] < 2)
  1467. return SendClientMessage(playerid, COLOR_GREY, "You aren't high enough rank.");
  1468. if(money >= 10000) {
  1469. GiveMoney(playerid, -25000);
  1470. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1471. PlayerInfo[playerid][pBombs] += 1;
  1472. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a block of plastic explosive for $10,000.");
  1473. } else {
  1474. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1475. }
  1476. }
  1477. case 19: // Break
  1478. {
  1479. showCrimeDialog(playerid);
  1480. }
  1481. case 20: // Chainsaw
  1482. {
  1483. if(PlayerInfo[playerid][pGroupRank] < 3)
  1484. return SendClientMessage(playerid, COLOR_GREY, "You aren't high enough rank.");
  1485. if(money >= 5000) {
  1486. GiveMoney(playerid, -5000);
  1487. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1488. GivePlayerGun(playerid, WEAPON_CHAINSAW);
  1489. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a chainsaw for $5,000.");
  1490. } else {
  1491. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1492. }
  1493. }
  1494. case 21: // Knife
  1495. {
  1496. if(money >= 1000) {
  1497. GiveMoney(playerid, -1000);
  1498. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1499. GivePlayerGun(playerid, WEAPON_KNIFE);
  1500. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a knife for $1,000.");
  1501. } else {
  1502. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1503. }
  1504. }
  1505. case 22: // Break
  1506. {
  1507. showCrimeDialog(playerid);
  1508. }
  1509. case 23: // Tear Gas
  1510. {
  1511. if(money >= 2500) {
  1512. GiveMoney(playerid, -2500);
  1513. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1514. GivePlayerGun(playerid, WEAPON_TEARGAS);
  1515. SendClientMessage(playerid, COLOR_CRIME, "You have purchased two canisters of tear gas for $2,500.");
  1516. } else {
  1517. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1518. }
  1519. }
  1520. case 24: // Grenades
  1521. {
  1522. SendClientMessage(playerid, COLOR_GREY, "Grenades have been disabled.");
  1523. /*if(money >= 2500) {
  1524. GiveMoney(playerid, -2500);
  1525. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1526. GivePlayerGun(playerid, WEAPON_GRENADE);
  1527. } else {
  1528. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1529. }*/
  1530. }
  1531. case 25: // Molotov Cocktail
  1532. {
  1533. if(PlayerInfo[playerid][pGroupRank] < 3)
  1534. return SendClientMessage(playerid, COLOR_GREY, "You aren't high enough rank.");
  1535. if(money >= 2500) {
  1536. GiveMoney(playerid, -2500);
  1537. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1538. GivePlayerGun(playerid, WEAPON_MOLTOV);
  1539. } else {
  1540. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1541. }
  1542. }
  1543. case 26: // Break
  1544. {
  1545. showCrimeDialog(playerid);
  1546. }
  1547. case 27: // Health and Armour
  1548. {
  1549. if(money >= 1000) {
  1550. GiveMoney(playerid, -1000);
  1551. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1552. SetPlayerHealth(playerid, 100.0);
  1553. SetPlayerArmour(playerid, 100.0);
  1554. } else {
  1555. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1556. }
  1557. }
  1558. case 28: // Half Vest
  1559. {
  1560. if(money >= 1000) {
  1561. GiveMoney(playerid, -1000);
  1562. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1563. SetPlayerArmour(playerid, 50.0);
  1564. } else {
  1565. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1566. }
  1567. }
  1568. case 29: // Break
  1569. {
  1570. showCrimeDialog(playerid);
  1571. }
  1572. case 30: // Jammer
  1573. {
  1574. if(money >= 1000)
  1575. {
  1576. GiveMoney(playerid, -1000);
  1577. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1578. PlayerInfo[playerid][pJammer] += 1;
  1579. SendClientMessage(playerid, COLOR_CRIME, "* You have purchased a signal jammer for $1,000.");
  1580. }
  1581. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  1582. }
  1583. case 31: // Dufflebag
  1584. {
  1585. SendClientMessage(playerid, COLOR_CRIME, "TODO: Script Dufflebags");
  1586. }
  1587. case 32: // Namechange
  1588. {
  1589. ShowPlayerDialog(playerid, DIALOG_SYNDICATE_NAMECHANGE, DIALOG_STYLE_INPUT, "{646495}Name Change", "Abuse will result in a ban and removal.\n{FF0000}Remember to use an underscore to seperate fore and surnames. Spaces will bug your account!", "Accept", "Back");
  1590. }
  1591. case 33: // Break
  1592. {
  1593. showCrimeDialog(playerid);
  1594. }
  1595. case 34: // Fully Armed
  1596. {
  1597. if(money >= 58000)
  1598. {
  1599. GiveMoney(playerid, -58000);
  1600. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1601. SetPlayerArmour(playerid, 100.0);
  1602. SetPlayerHealth(playerid, 100.0);
  1603. GivePlayerGun(playerid, WEAPON_DEAGLE);
  1604. GivePlayerGun(playerid, WEAPON_M4);
  1605. GivePlayerGun(playerid, WEAPON_SHOTGSPA);
  1606. GivePlayerGun(playerid, WEAPON_MP5);
  1607. GivePlayerGun(playerid, WEAPON_SNIPER);
  1608. GivePlayerGun(playerid, WEAPON_KNIFE);
  1609. SendClientMessage(playerid, COLOR_CRIME, "* You have purchased a full kit for $58,000.");
  1610. }
  1611. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  1612. }
  1613. }
  1614. }
  1615. }
  1616. if(dialogid == DIALOG_ARMORY) {
  1617. if(!response)
  1618. return 1;
  1619. switch(listitem) {
  1620. case 0: {
  1621. if(GetMoney(playerid) < 500)
  1622. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1623. GivePlayerGun(playerid, WEAPON_COLT45);
  1624. GiveMoney(playerid, -500);
  1625. }
  1626. case 1: {
  1627. if(GetMoney(playerid) < 1000)
  1628. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1629. GivePlayerGun(playerid, WEAPON_MP5);
  1630. GiveMoney(playerid, -1000);
  1631. }
  1632. case 2: {
  1633. if(GetMoney(playerid) < 1000)
  1634. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1635. GivePlayerGun(playerid, WEAPON_SHOTGUN);
  1636. GiveMoney(playerid, -1000);
  1637. }
  1638. case 3: {
  1639. if(GetMoney(playerid) < 10000)
  1640. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1641. GivePlayerGun(playerid, WEAPON_DEAGLE);
  1642. GiveMoney(playerid, -10000);
  1643. }
  1644. case 4: {
  1645. if(GetMoney(playerid) < 10000)
  1646. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1647. GivePlayerGun(playerid, WEAPON_RIFLE);
  1648. GiveMoney(playerid, -10000);
  1649. }
  1650. case 5: {
  1651. if(GetMoney(playerid) < 25000)
  1652. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1653. GivePlayerGun(playerid, WEAPON_M4);
  1654. GiveMoney(playerid, -25000);
  1655. }
  1656. case 6: {
  1657. if(GetMoney(playerid) < 15000)
  1658. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1659. GivePlayerGun(playerid, WEAPON_AK47);
  1660. GiveMoney(playerid, -15000);
  1661. }
  1662. case 7: {
  1663. if(GetMoney(playerid) < 35000)
  1664. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1665. GivePlayerGun(playerid, WEAPON_SNIPER);
  1666. GiveMoney(playerid, -35000);
  1667. }
  1668. case 8: {
  1669. if(GetMoney(playerid) < 35000)
  1670. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1671. GivePlayerGun(playerid, WEAPON_SHOTGSPA);
  1672. GiveMoney(playerid, -35000);
  1673. }
  1674. case 9: {
  1675. if(GetMoney(playerid) < 40000)
  1676. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1677. GivePlayerGun(playerid, WEAPON_CHAINSAW);
  1678. GiveMoney(playerid, -40000);
  1679. }
  1680. case 10: {
  1681. if(GetMoney(playerid) < 10000)
  1682. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1683. SetPlayerArmour(playerid, 100);
  1684. GiveMoney(playerid, -10000);
  1685. }
  1686. case 11: {
  1687. if(GetMoney(playerid) < 15)
  1688. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1689. SetPlayerHealth(playerid, 100);
  1690. GiveMoney(playerid, -15);
  1691. }
  1692. case 12: {
  1693. if(GetMoney(playerid) < 10000)
  1694. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1695. GivePlayerGun(playerid, WEAPON_SAWEDOFF);
  1696. GiveMoney(playerid, -10000);
  1697. }
  1698. case 13: {
  1699. if(GetMoney(playerid) < 10000)
  1700. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1701. GivePlayerGun(playerid, WEAPON_SILENCED);
  1702. GiveMoney(playerid, -10000);
  1703. }
  1704. case 14: {
  1705. if(GetMoney(playerid) < 15000)
  1706. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1707. GivePlayerGun(playerid, WEAPON_MOLTOV);
  1708. GiveMoney(playerid, -15000);
  1709. }
  1710. case 15: {
  1711. if(GetMoney(playerid) < 25000)
  1712. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1713. GivePlayerGun(playerid, WEAPON_UZI);
  1714. GiveMoney(playerid, -25000);
  1715. }
  1716. case 16: {
  1717. if(GetMoney(playerid) < 25000)
  1718. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1719. GivePlayerGun(playerid, WEAPON_TEC9);
  1720. GiveMoney(playerid, -25000);
  1721. }
  1722. case 17: {
  1723. if(GetMoney(playerid) < 10000)
  1724. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1725. PlayerInfo[playerid][pJammer] = 1;
  1726. GiveMoney(playerid, -10000);
  1727. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Signal jammer acquired.");
  1728. }
  1729. case 18: {
  1730. if(GetMoney(playerid) < 10000)
  1731. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1732. GivePlayerGun(playerid, WEAPON_TEARGAS);
  1733. GiveMoney(playerid, -10000);
  1734. }
  1735. case 19: {
  1736. SendClientMessage(playerid, COLOR_GREY, "Grenades have been disabled");
  1737. /*
  1738. if(GetMoney(playerid) < 10000)
  1739. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1740. GivePlayerGun(playerid, WEAPON_GRENADE);
  1741. GiveMoney(playerid, -10000);*/
  1742. }
  1743. }
  1744. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1745. }
  1746. if(dialogid == DIALOG_SYNDICATE_NAMECHANGE)
  1747. {
  1748. if(!response || !strlen(inputtext))
  1749. return showCrimeDialog(playerid);
  1750. new query[128];
  1751. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name` FROM `players` WHERE `Name` = '%e'", inputtext);
  1752. mysql_pquery(sqlGameConnection, query, "OnSetName", "iis", playerid, playerid, inputtext);
  1753. }
  1754. if(dialogid == DIALOG_HITMAN)
  1755. {
  1756. if(response)
  1757. {
  1758. if(!IsPlayerNearHitmenHQ(playerid))
  1759. return SendClientMessage(playerid, COLOR_GREY, "You are not at your headquarters.");
  1760. new money = PlayerInfo[playerid][pCash];
  1761. switch(listitem)
  1762. {
  1763. case 0: // Desert Eagle
  1764. {
  1765. if(money >= 2500) {
  1766. GiveMoney(playerid, -2500);
  1767. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1768. GivePlayerGun(playerid, WEAPON_DEAGLE);
  1769. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a Desert Eagle for $2,500.");
  1770. } else {
  1771. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1772. }
  1773. }
  1774. case 1: // SD Pistol
  1775. {
  1776. if(money >= 5000) {
  1777. GiveMoney(playerid, -5000);
  1778. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1779. GivePlayerGun(playerid, WEAPON_SILENCED);
  1780. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased an SD Pistol for $5,000.");
  1781. } else {
  1782. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1783. }
  1784. }
  1785. case 2: // Break
  1786. {
  1787. showHitmanDialog(playerid);
  1788. }
  1789. case 3: // M4
  1790. {
  1791. if(money >= 12500) {
  1792. GiveMoney(playerid, -12500);
  1793. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1794. GivePlayerGun(playerid, WEAPON_M4);
  1795. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased an M4 for $12,500.");
  1796. } else {
  1797. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1798. }
  1799. }
  1800. case 4: // AK47
  1801. {
  1802. if(money >= 7500) {
  1803. GiveMoney(playerid, -7500);
  1804. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1805. GivePlayerGun(playerid, WEAPON_AK47);
  1806. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased an AK47 for $7,500.");
  1807. } else {
  1808. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1809. }
  1810. }
  1811. case 5: // Break
  1812. {
  1813. showHitmanDialog(playerid);
  1814. }
  1815. case 6: // Spas12
  1816. {
  1817. if(money >= 25000) {
  1818. GiveMoney(playerid, -25000);
  1819. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1820. GivePlayerGun(playerid, WEAPON_SHOTGSPA);
  1821. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a combat shotgun for $25,000.");
  1822. } else {
  1823. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1824. }
  1825. }
  1826. case 7: // Shotgun
  1827. {
  1828. if(money >= 2000) {
  1829. GiveMoney(playerid, -2000);
  1830. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1831. GivePlayerGun(playerid, WEAPON_SHOTGUN);
  1832. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a shotgun for $2,000.");
  1833. } else {
  1834. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1835. }
  1836. }
  1837. case 8: // Sawn off
  1838. {
  1839. if(money >= 7500) {
  1840. GiveMoney(playerid, -7500);
  1841. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1842. GivePlayerGun(playerid, WEAPON_SAWEDOFF);
  1843. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a sawn-off shotgun for $7,500.");
  1844. } else {
  1845. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1846. }
  1847. }
  1848. case 9: // Break
  1849. {
  1850. showHitmanDialog(playerid);
  1851. }
  1852. case 10: // MP5
  1853. {
  1854. if(money >= 1000) {
  1855. GiveMoney(playerid, -1000);
  1856. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1857. GivePlayerGun(playerid, WEAPON_MP5);
  1858. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased an MP5 for $1,000.");
  1859. } else {
  1860. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1861. }
  1862. }
  1863. case 11: // TEC9
  1864. {
  1865. if(money >= 2500) {
  1866. GiveMoney(playerid, -2500);
  1867. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1868. GivePlayerGun(playerid, WEAPON_TEC9);
  1869. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a TEC9 for $2,500.");
  1870. } else {
  1871. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1872. }
  1873. }
  1874. case 12: // Uzi
  1875. {
  1876. if(money >= 2500) {
  1877. GiveMoney(playerid, -2500);
  1878. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1879. GivePlayerGun(playerid, WEAPON_UZI);
  1880. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased an Uzi for $2,500.");
  1881. } else {
  1882. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1883. }
  1884. }
  1885. case 13: // Break
  1886. {
  1887. showHitmanDialog(playerid);
  1888. }
  1889. case 14: // Rifle
  1890. {
  1891. if(money >= 2500) {
  1892. GiveMoney(playerid, -2500);
  1893. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1894. GivePlayerGun(playerid, WEAPON_RIFLE);
  1895. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a country rifle for $2,500.");
  1896. } else {
  1897. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1898. }
  1899. }
  1900. case 15: // Sniper Rifle
  1901. {
  1902. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to purchase this.");
  1903. if(money >= 15000) {
  1904. GiveMoney(playerid, -15000);
  1905. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1906. GivePlayerGun(playerid, WEAPON_SNIPER);
  1907. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a sniper rifle for $15,000.");
  1908. } else {
  1909. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1910. }
  1911. }
  1912. case 16: // Break
  1913. {
  1914. showHitmanDialog(playerid);
  1915. }
  1916. case 17: // Flamethrower
  1917. {
  1918. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to purchase this.");
  1919. if(PlayerInfo[playerid][pGroupRank] < 3)
  1920. return SendClientMessage(playerid, COLOR_HITMAN, "You need to be R3+ to use this.");
  1921. if(money >= 20000) {
  1922. GiveMoney(playerid, -20000);
  1923. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1924. GivePlayerGun(playerid, WEAPON_FLAMETHROWER);
  1925. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a flamethrower for $20,000.");
  1926. } else {
  1927. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1928. }
  1929. }
  1930. case 18: // C4
  1931. {
  1932. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to purchase this.");
  1933. if(money >= 10000) {
  1934. GiveMoney(playerid, -25000);
  1935. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1936. PlayerInfo[playerid][pBombs] += 1;
  1937. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a block of plastic explosive for $10,000.");
  1938. } else {
  1939. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1940. }
  1941. }
  1942. case 19: // Break
  1943. {
  1944. showHitmanDialog(playerid);
  1945. }
  1946. case 20: // Chainsaw
  1947. {
  1948. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to purchase this.");
  1949. if(money >= 5000) {
  1950. GiveMoney(playerid, -5000);
  1951. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1952. GivePlayerGun(playerid, WEAPON_CHAINSAW);
  1953. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a chainsaw for $5,000.");
  1954. } else {
  1955. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1956. }
  1957. }
  1958. case 21: // Knife
  1959. {
  1960. if(money >= 1000) {
  1961. GiveMoney(playerid, -1000);
  1962. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1963. GivePlayerGun(playerid, WEAPON_KNIFE);
  1964. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a knife for $1,000.");
  1965. } else {
  1966. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1967. }
  1968. }
  1969. case 22: // Break
  1970. {
  1971. showHitmanDialog(playerid);
  1972. }
  1973. case 23: // Tear Gas
  1974. {
  1975. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to purchase this.");
  1976. if(money >= 2500) {
  1977. GiveMoney(playerid, -2500);
  1978. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1979. GivePlayerGun(playerid, WEAPON_TEARGAS);
  1980. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased two canisters of tear gas for $2,500.");
  1981. } else {
  1982. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1983. }
  1984. }
  1985. case 24: // Grenades
  1986. {
  1987. SendClientMessage(playerid, COLOR_GREY, "Grenades have been disabled.");
  1988. /*
  1989. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to purchase this.");
  1990. if(money >= 2500) {
  1991. GiveMoney(playerid, -2500);
  1992. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1993. GivePlayerGun(playerid, WEAPON_GRENADE);
  1994. } else {
  1995. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1996. }*/
  1997. }
  1998. case 25: // Molotov Cocktail
  1999. {
  2000. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to purchase this.");
  2001. if(money >= 2500) {
  2002. GiveMoney(playerid, -2500);
  2003. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2004. GivePlayerGun(playerid, WEAPON_MOLTOV);
  2005. } else {
  2006. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  2007. }
  2008. }
  2009. case 26: // Break
  2010. {
  2011. showHitmanDialog(playerid);
  2012. }
  2013. case 27: // Health and Armour
  2014. {
  2015. if(money >= 1000) {
  2016. GiveMoney(playerid, -1000);
  2017. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2018. SetPlayerHealth(playerid, 100.0);
  2019. SetPlayerArmour(playerid, 100.0);
  2020. } else {
  2021. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  2022. }
  2023. }
  2024. case 28: // First Aid Kit
  2025. {
  2026. if(money >= 200) {
  2027. GiveMoney(playerid, -200);
  2028. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2029. SetPlayerHealth(playerid, 100.0);
  2030. } else {
  2031. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  2032. }
  2033. }
  2034. case 29: // Half Vest
  2035. {
  2036. if(money >= 500) {
  2037. GiveMoney(playerid, -500);
  2038. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2039. SetPlayerArmour(playerid, 50.0);
  2040. } else {
  2041. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  2042. }
  2043. }
  2044. case 30: // Full Vest
  2045. {
  2046. if(money >= 1000) {
  2047. GiveMoney(playerid, -1000);
  2048. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2049. SetPlayerArmour(playerid, 100.0);
  2050. } else {
  2051. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  2052. }
  2053. }
  2054. case 31: // Break
  2055. {
  2056. showHitmanDialog(playerid);
  2057. }
  2058. case 32: // Jammer
  2059. {
  2060. if(money >= 1000)
  2061. {
  2062. GiveMoney(playerid, -1000);
  2063. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2064. PlayerInfo[playerid][pJammer] += 1;
  2065. SendClientMessage(playerid, COLOR_HITMAN, "* You have purchased a signal jammer for $1,000.");
  2066. }
  2067. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  2068. }
  2069. case 33: // Poison
  2070. {
  2071. if(money >= 5000)
  2072. {
  2073. PlayerInfo[playerid][pPoison] += 1;
  2074. GiveMoney(playerid, -5000);
  2075. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased some cyanide.");
  2076. } else {
  2077. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  2078. }
  2079. }
  2080. case 34: // Fake Badge
  2081. {
  2082. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to use fake badges.");
  2083. new dialogstring[128];
  2084. format(dialogstring, sizeof(dialogstring), "[%d] SAPD\n[%d] DEA\n[%d] SASD\n[%d] SAFMD\n[%d] NG\n[%d] Government\n[%d] Judicial Department\n[%d] DEA\n[%d] ATF", HitmanBadgeSAPD, HitmanBadgeFBI, HitmanBadgeRCSD, HitmanBadgeLSFMD, HitmanBadgeNG, HitmanBadgeGOV, HitmanBadgeSCOTUS, HitmanBadgeDEA, HitmanBadgeATF);
  2085. ShowPlayerDialog(playerid, 6493, DIALOG_STYLE_LIST, "Fake Badges", dialogstring, "Choose", "Cancel");
  2086. }
  2087. case 35: // Lock pick
  2088. {
  2089. if(money >= 5000)
  2090. {
  2091. if(PlayerInfo[playerid][pHasLockPick] == 1)
  2092. return SendClientMessage(playerid, COLOR_GREY, "You already have a lock pick kit.");
  2093. GiveMoney(playerid, -5000);
  2094. PlayerInfo[playerid][pHasLockPick] = 1;
  2095. SendClientMessage(playerid, COLOR_HITMAN, "* You have purchased a lock pick kit for $5,000.");
  2096. }
  2097. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  2098. }
  2099. }
  2100. }
  2101. }
  2102. if(dialogid == 9082)
  2103. {
  2104. if(response)
  2105. {
  2106. new money = PlayerInfo[playerid][pCash];
  2107. if(listitem == 0) // Desert Eagle
  2108. {
  2109. if(money >= 500)
  2110. {
  2111. PlayerInfo[playerid][pCash] -= 10000;
  2112. GivePlayerGun(playerid, 24);
  2113. }
  2114. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  2115. }
  2116. if(listitem == 1) // M4
  2117. {
  2118. if(money >= 20000)
  2119. {
  2120. PlayerInfo[playerid][pCash] -= 20000;
  2121. GivePlayerGun(playerid, 31);
  2122. }
  2123. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  2124. }
  2125. if(listitem == 2) // AK47
  2126. {
  2127. if(money >= 20000)
  2128. {
  2129. PlayerInfo[playerid][pCash] -= 20000;
  2130. GivePlayerGun(playerid, 30);
  2131. }
  2132. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  2133. }
  2134. if(listitem == 3) // Sniper Rifle
  2135. {
  2136. if(money >= 50000)
  2137. {
  2138. PlayerInfo[playerid][pCash] -= 50000;
  2139. GivePlayerGun(playerid, 34);
  2140. }
  2141. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  2142. }
  2143. if(listitem == 4) // Health
  2144. {
  2145. SetPlayerHealth(playerid, 100);
  2146. }
  2147. if(listitem == 4) // Armor
  2148. {
  2149. if(money >= 10000)
  2150. {
  2151. PlayerInfo[playerid][pCash] -= 10000;
  2152. SetPlayerArmour(playerid, 100);
  2153. }
  2154. }
  2155. }
  2156. }
  2157. if(dialogid == DIALOG_BAR_DYN)
  2158. {
  2159. if(response)
  2160. {
  2161. new Float:playerHP;
  2162. GetPlayerHealth(playerid, playerHP);
  2163. new string[128];
  2164. if(listitem == 0) //beer
  2165. {
  2166. if(GetPlayerMoney(playerid) > 59)
  2167. {
  2168. if(playerHP >=90)
  2169. {
  2170. SetPlayerHealth(playerid, 100.0);
  2171. }
  2172. else
  2173. {
  2174. SetPlayerHealth(playerid, playerHP + 10.0);
  2175. }
  2176. GivePlayerMoney(playerid, -60);
  2177. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  2178. format(string, sizeof(string), "~r~-$%d", 60);
  2179. GameTextForPlayer(playerid, string, 5000, 1);
  2180. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2181. SendClientMessage(playerid, 0xAFAFAFAA, "Beer purchased.");
  2182. return 1;
  2183. }
  2184. else SendClientMessage(playerid, 0xAFAFAFAA, "Life isn't free, soda too, get 3USD then come back.");
  2185. }
  2186. if(listitem == 1) //vodka
  2187. {
  2188. if(GetPlayerMoney(playerid) > 99)
  2189. {
  2190. if(playerHP >=80)
  2191. {
  2192. SetPlayerHealth(playerid, 100.0);
  2193. }
  2194. else
  2195. {
  2196. SetPlayerHealth(playerid, playerHP + 20.0);
  2197. }
  2198. GivePlayerMoney(playerid, -100);
  2199. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  2200. format(string, sizeof(string), "~r~-$%d", 100);
  2201. GameTextForPlayer(playerid, string, 5000, 1);
  2202. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2203. SendClientMessage(playerid, 0xAFAFAFAA, "Vodka purchased.");
  2204. return 1;
  2205. }
  2206. else SendClientMessage(playerid, 0xAFAFAFAA, "Life isn't free, soda too, get 3USD then come back.");
  2207. }
  2208. if(listitem == 2) //whiskey
  2209. {
  2210. if(GetPlayerMoney(playerid) > 99)
  2211. {
  2212. if(playerHP >=80)
  2213. {
  2214. SetPlayerHealth(playerid, 100.0);
  2215. }
  2216. else
  2217. {
  2218. SetPlayerHealth(playerid, playerHP + 20.0);
  2219. }
  2220. GivePlayerMoney(playerid, -100);
  2221. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  2222. format(string, sizeof(string), "~r~-$%d", 100);
  2223. GameTextForPlayer(playerid, string, 5000, 1);
  2224. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2225. SendClientMessage(playerid, 0xAFAFAFAA, "Whiskey purchased.");
  2226. return 1;
  2227. }
  2228. else SendClientMessage(playerid, 0xAFAFAFAA, "Life isn't free, soda too, get 3USD then come back.");
  2229. }
  2230. if(listitem == 3) //wine
  2231. {
  2232. if(GetPlayerMoney(playerid) > 99)
  2233. {
  2234. if(playerHP >=80)
  2235. {
  2236. SetPlayerHealth(playerid, 100.0);
  2237. }
  2238. else
  2239. {
  2240. SetPlayerHealth(playerid, playerHP + 20.0);
  2241. }
  2242. GivePlayerMoney(playerid, -100);
  2243. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  2244. format(string, sizeof(string), "~r~-$%d", 100);
  2245. GameTextForPlayer(playerid, string, 5000, 1);
  2246. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2247. SendClientMessage(playerid, 0xAFAFAFAA, "Wine purchased.");
  2248. return 1;
  2249. }
  2250. else SendClientMessage(playerid, 0xAFAFAFAA, "Life isn't free, soda too, get 3USD then come back.");
  2251. }
  2252. if(listitem == 4) //soda
  2253. {
  2254. if(GetPlayerMoney(playerid) > 49)
  2255. {
  2256. if(playerHP >=80)
  2257. {
  2258. SetPlayerHealth(playerid, 100.0);
  2259. }
  2260. else
  2261. {
  2262. SetPlayerHealth(playerid, playerHP + 20.0);
  2263. }
  2264. GivePlayerMoney(playerid, -50);
  2265. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  2266. format(string, sizeof(string), "~r~-$%d", 50);
  2267. GameTextForPlayer(playerid, string, 5000, 1);
  2268. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2269. SendClientMessage(playerid, 0xAFAFAFAA, "Soda purchased.");
  2270. return 1;
  2271. }
  2272. else SendClientMessage(playerid, 0xAFAFAFAA, "Life isn't free, soda too, get 3USD then come back.");
  2273. }
  2274. }
  2275. }
  2276. if(dialogid == DIALOG_REGISTER) //REGISTER
  2277. {
  2278. if(response)
  2279. {
  2280. if(!gamemodeLoaded)
  2281. {
  2282. format(str, sizeof(str), "{FFFFFF}Welcome to {FFFF00}Elite City Role Play{FFFFFF}.\n\nPlease register your account by typing the password below:", str);
  2283. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", str, "Register", "Quit");
  2284. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Please wait until the gamemode has finished loading.");
  2285. return 1;
  2286. }
  2287. if(strlen(inputtext) >= 50)
  2288. {
  2289. format(str, sizeof(str), "{FFFFFF}Welcome to {FFFF00}Elite City Role Play{FFFFFF}.\n\nPlease register your account by typing the password below:", str);
  2290. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", str, "Register", "Quit");
  2291. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Password is too long.");
  2292. return 1;
  2293. }
  2294. if(!strlen(inputtext))
  2295. {
  2296. format(str, sizeof(str), "{FFFFFF}Welcome to {FFFF00}Elite City Role Play{FFFFFF}.\n\nPlease register your account by typing the password below:", str);
  2297. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", str, "Register", "Quit");
  2298. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You must enter a password.");
  2299. return 1;
  2300. }
  2301. if(gPlayerLogged[playerid])
  2302. {
  2303. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You are already logged in.");
  2304. return 1;
  2305. }
  2306. //surname is restricted
  2307. for(new i = 0; i < sizeof(SurnameInfo); i++)
  2308. {
  2309. if(strcmp(SurnameInfo[i][Surname], GetPlayerSurname(playerid)) == 0 && SurnameInfo[i][Taken] == 1)
  2310. {
  2311. new string4[128];
  2312. new pNames[24];
  2313. GetPlayerICName(playerid, pNames, sizeof(pNames));
  2314. format(string4, sizeof(string4), "{FF6347}SERVER: %s is a restricted surname. Please change your surname and come back.", GetPlayerSurname(playerid));
  2315. SendClientMessage(playerid, COLOR_WHITE, string4);
  2316. /*format(string4, sizeof(string4), "SERVER: %s has been kicked, reason: Restricted Surname.", pNames);
  2317. SendClientMessageToAll(COLOR_LIGHTRED, string4);*/
  2318. KickEx(playerid);
  2319. return 1;
  2320. }
  2321. }
  2322. if(!AlphaNumericName(PlayerName(playerid)) && strlen(PlayerName(playerid)) > 4 && strlen(PlayerName(playerid)) <= MAX_PLAYER_NAME)
  2323. {
  2324. SendClientMessage(playerid, COLOR_WHITE, "{FF6347}SERVER: You have been kicked for having a non-rp name, pick a roleplay name (eg. John_Smith).");
  2325. KickEx(playerid);
  2326. return 1;
  2327. }
  2328. new tmppass[64];
  2329. strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
  2330. OnPlayerRegister(playerid, tmppass);
  2331. }
  2332. else
  2333. {
  2334. SendClientMessage(playerid, COLOR_RED, "You chose to leave the server.");
  2335. KickEx(playerid);
  2336. }
  2337. return 1;
  2338. }
  2339. // Doors
  2340. if(dialogid == DIALOG_EDITDOOR_MAIN)
  2341. {
  2342. if(!response) return 1;
  2343. else
  2344. {
  2345. if(listitem == 0)
  2346. {
  2347. new unusedid = -1;
  2348. for(new i = 0; i < sizeof(Entrances); i++)
  2349. {
  2350. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[i][outside_x], Entrances[i][outside_y], Entrances[i][outside_z]);
  2351. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2352. {
  2353. unusedid = i;
  2354. break;
  2355. }
  2356. }
  2357. if(unusedid == -1) return SendClientMessage(playerid, COLOR_GRAD1, "All of the door ID's are already in use.");
  2358. new longstring[256];
  2359. format(longstring, sizeof(longstring), "Please enter the door ID you would like to create.\n\n{FF0000}NOTE #1:{FFFFFF} The next unused door ID is %d.\n{FF0000}NOTE #2:{FFFFFF} This will create an entrance door at your current position and rotation.\n", unusedid);
  2360. ShowPlayerDialog(playerid,
  2361. DIALOG_EDITDOOR_CREATE,
  2362. DIALOG_STYLE_INPUT,
  2363. "Edit Door - Create Door",
  2364. longstring,
  2365. "Create",
  2366. "Cancel");
  2367. return 1;
  2368. }
  2369. else if(listitem == 1)
  2370. {
  2371. ShowPlayerDialog(playerid,
  2372. DIALOG_EDITDOOR_NAME1,
  2373. DIALOG_STYLE_INPUT,
  2374. "Edit Door - Change Name Step 1",
  2375. "Please enter the ID of the door you would like to change the name of.\n",
  2376. "Done",
  2377. "Cancel");
  2378. return 1;
  2379. }
  2380. else if(listitem == 2)
  2381. {
  2382. ShowPlayerDialog(playerid,
  2383. DIALOG_EDITDOOR_EPOS,
  2384. DIALOG_STYLE_INPUT,
  2385. "Edit Door - Change Entrance Position Step 1",
  2386. "Please enter the door ID you would like to change the entrance position of.\n",
  2387. "Done",
  2388. "Cancel");
  2389. return 1;
  2390. }
  2391. else if(listitem == 3)
  2392. {
  2393. ShowPlayerDialog(playerid,
  2394. DIALOG_EDITDOOR_IPOS,
  2395. DIALOG_STYLE_INPUT,
  2396. "Edit Door - Change Interior Position Step 1",
  2397. "Please enter the door ID you would like to change the interior position of.\n",
  2398. "Done",
  2399. "Cancel");
  2400. return 1;
  2401. }
  2402. else if(listitem == 4)
  2403. {
  2404. ShowPlayerDialog(playerid,
  2405. DIALOG_EDITDOOR_ICON1,
  2406. DIALOG_STYLE_INPUT,
  2407. "Edit Door - Change Icon Step 1",
  2408. "Please enter the door ID you would like to change the icon of.\n",
  2409. "Done",
  2410. "Cancel");
  2411. return 1;
  2412. }
  2413. else if(listitem == 5)
  2414. {
  2415. ShowPlayerDialog(playerid,
  2416. DIALOG_EDITDOOR_PASS1,
  2417. DIALOG_STYLE_INPUT,
  2418. "Edit Door - Change Password Step 1",
  2419. "Please enter the door ID you would like to change the password on.\n",
  2420. "Done",
  2421. "Cancel");
  2422. return 1;
  2423. }
  2424. else if(listitem == 6)
  2425. {
  2426. ShowPlayerDialog(playerid,
  2427. DIALOG_EDITDOOR_FREEZE,
  2428. DIALOG_STYLE_INPUT,
  2429. "Edit Door - Freeze On Enter/Exit",
  2430. "Please enter the door ID you would like to toggle the freezing on.\n",
  2431. "Done",
  2432. "Cancel");
  2433. return 1;
  2434. }
  2435. else if(listitem == 7)
  2436. {
  2437. ShowPlayerDialog(playerid,
  2438. DIALOG_EDITDOOR_OWNER1,
  2439. DIALOG_STYLE_INPUT,
  2440. "Edit Door - Owner",
  2441. "Please enter the ID of the door you want to change the owner for.\n",
  2442. "Done",
  2443. "Cancel");
  2444. return 1;
  2445. }
  2446. else if(listitem == 8)
  2447. {
  2448. ShowPlayerDialog(playerid,
  2449. DIALOG_EDITDOOR_REM1,
  2450. DIALOG_STYLE_INPUT,
  2451. "Edit Door - Remove Door Step 1",
  2452. "Please enter the door ID you would like to remove.\n",
  2453. "Done",
  2454. "Cancel");
  2455. return 1;
  2456. }
  2457. return 1;
  2458. }
  2459. }
  2460. if(dialogid == DIALOG_EDITDOOR_CREATE)
  2461. {
  2462. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this.");
  2463. if(!response) return 1;
  2464. else
  2465. {
  2466. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2467. new ident = strval(inputtext);
  2468. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2469. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2470. if(strcmp(str, "0.00,0.00,0.00", true) != 0)
  2471. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID is already in use.");
  2472. new Float:dpX, Float:dpY, Float:dpZ, Float:dpA;
  2473. GetPlayerPos(playerid, dpX, dpY, dpZ);
  2474. GetPlayerFacingAngle(playerid, dpA);
  2475. new intid = GetPlayerInterior(playerid);
  2476. new worldid = GetPlayerVirtualWorld(playerid);
  2477. Entrances[ident][outside_x] = dpX;
  2478. Entrances[ident][outside_y] = dpY;
  2479. Entrances[ident][outside_z] = dpZ;
  2480. Entrances[ident][outside_a] = dpA;
  2481. Entrances[ident][outside_i] = intid;
  2482. Entrances[ident][outside_w] = worldid;
  2483. strdel(Entrances[ident][createdby], 0, 50);
  2484. format(str, sizeof(str), "%s", PlayerICName(playerid));
  2485. strins(Entrances[ident][createdby], str, 0);
  2486. if( Entrances[ident][outside_icon] == 0 ) {
  2487. EntranceRef[ident] = CreateDynamicPickup(19198, 23, Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]+0.4, Entrances[ident][outside_w]);
  2488. EntranceRefInt[ident] = CreateDynamicPickup(19198, 23, Entrances[ident][inside_x], Entrances[ident][inside_y], Entrances[ident][inside_z]+0.4, Entrances[ident][inside_w]);
  2489. } else {
  2490. EntranceRef[ident] = CreateDynamicPickup(19198, 23, Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z], Entrances[ident][outside_w]);
  2491. EntranceRefInt[ident] = CreateDynamicPickup(19198, 23, Entrances[ident][inside_x], Entrances[ident][inside_y], Entrances[ident][inside_z], Entrances[ident][inside_w]);
  2492. }
  2493. new doornametext[128];
  2494. format(doornametext, sizeof(doornametext), "{43527D}%s{FFFFFF}\n\nType /enter to go inside.", Entrances[ident][doorname]);
  2495. EntranceRefText[ident] = CreateDynamic3DTextLabel(doornametext, COLOR_ENTRANCE, Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z] +0.75, 5.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, Entrances[ident][outside_w], Entrances[ident][outside_i]);
  2496. format(str, sizeof(str), "You have created door id %d.", ident);
  2497. SendClientMessage(playerid, COLOR_GRAD1, str);
  2498. format(str, sizeof(str), "%s has created door ID %d.", PlayerName(playerid), ident);
  2499. printf(str);
  2500. }
  2501. return 1;
  2502. }
  2503. if(dialogid == DIALOG_GAMBLE_1)
  2504. {
  2505. if(response)
  2506. {
  2507. new string[450];
  2508. if(listitem == 0)
  2509. {
  2510. format(string, sizeof(string), "Current President: Jennifer Blake\nJobs\nFactions\nFamilies");
  2511. ShowPlayerDialog(playerid, DIALOG_GAMBLE_1, DIALOG_STYLE_LIST, "Computer", string, "Select", "Close");
  2512. return 1;
  2513. }
  2514. if(listitem == 1)
  2515. {
  2516. ShowPlayerDialog(playerid, DIALOG_JOBHELP, DIALOG_STYLE_LIST, "Job Help", "Detective\nLawyer\nDrug Dealer\nMechanic\nBodyguard\nArms Dealer\nBoxer\nTaxi Driver\nDrug Smuggler\nProduct Dealer\nWaste Collector\nPizza Deliver\nFarmer", "Select", "Cancel");
  2517. return 1;
  2518. }
  2519. if(listitem == 2)
  2520. {
  2521. new count[MAX_FACTIONS] = 0, facStr[1024];
  2522. foreach(new i:Player) {
  2523. new playerFac = PlayerInfo[i][pMember];
  2524. if(playerFac != 0 && playerFac < sizeof(count))
  2525. count[playerFac]++;
  2526. }
  2527. format(facStr, sizeof(facStr), "{FFFFFF}San Andreas Police Department ({FF0000}%i{FFFFFF})", count[FACTION_SAPD]);
  2528. format(facStr, sizeof(facStr), "%s\n{FFFFFF}Federal Bureau of Investigtion ({FF0000}%i{FFFFFF})", facStr, count[FACTION_FBI]);
  2529. format(facStr, sizeof(facStr), "%s\n{FFFFFF}San Andreas Fire & Medical Dept. ({FF0000}%i{FFFFFF})", facStr, count[FACTION_FMD]);
  2530. format(facStr, sizeof(facStr), "%s\n{FFFFFF}Government ({FF0000}%i{FFFFFF})", facStr, count[FACTION_GOV]);
  2531. format(facStr, sizeof(facStr), "%s\n{FFFFFF}San Andreas Network ({FF0000}%i{FFFFFF})", facStr, count[FACTION_NEWS]);
  2532. format(facStr, sizeof(facStr), "%s\n{FFFFFF}Judicial Department ({FF0000}%i{FFFFFF})", facStr, count[FACTION_JD]);
  2533. format(facStr, sizeof(facStr), "%s\n{FFFFFF}San Andreas National Guard ({FF0000}%i{FFFFFF})", facStr, count[FACTION_SANG]);
  2534. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Factions", facStr, "Close", "");
  2535. for(new i = 0; i < 12; i++)count[i] = 0;
  2536. return 1;
  2537. }
  2538. if(listitem == 3)
  2539. {
  2540. if(PlayerInfo[playerid][pMember] < 1 && PlayerInfo[playerid][pGroup] < 10)
  2541. {
  2542. new famstr[2048];
  2543. for(new i = 0; i < sizeof(FamilyInfo); i++)
  2544. {
  2545. format(famstr, sizeof(famstr), "%s\n%d\t%s", famstr, i +1, FamilyInfo[i][FamilyName]);
  2546. }
  2547. ShowPlayerDialog(playerid, FAMILY_DIALOG, DIALOG_STYLE_LIST, "Families", famstr, "Ok", "Cancel");
  2548. format(str, sizeof(str), "* %s logs into deep web and checks list of current gangs.", PlayerICName(playerid));
  2549. SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 20.0, 15000);
  2550. format(str, sizeof(str), "%s logs into deep web and checks list of current gangs", PlayerICName(playerid));
  2551. SendClientMessage(playerid, COLOR_PURPLE, str);
  2552. }
  2553. else if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pGroup] == 10)
  2554. {
  2555. SendClientMessage(playerid, COLOR_GREY, "You tried to log into deep web and check all available gangs, but failed, your face is pictured!");
  2556. }
  2557. return 1;
  2558. }
  2559. }
  2560. return 1;
  2561. }
  2562. if(dialogid == DIALOG_EDITDOOR_NAME1)
  2563. {
  2564. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this.");
  2565. if(!response) return 1;
  2566. else
  2567. {
  2568. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2569. new ident = strval(inputtext);
  2570. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2571. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2572. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2573. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2574. SetPVarInt(playerid, "door_editing_name", ident);
  2575. ShowPlayerDialog(playerid,
  2576. DIALOG_EDITDOOR_NAME2,
  2577. DIALOG_STYLE_INPUT,
  2578. "Edit Door - Change Name Step 2",
  2579. "Please enter the new name for the door.",
  2580. "Done",
  2581. "Cancel");
  2582. }
  2583. return 1;
  2584. }
  2585. if(dialogid == DIALOG_EDITDOOR_NAME2)
  2586. {
  2587. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this.");
  2588. new ident = GetPVarInt(playerid, "door_editing_name");
  2589. if(ident < 0 || ident > MAX_DOORS) return 1;
  2590. if(!response) return 1;
  2591. else
  2592. {
  2593. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2594. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2595. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2596. if(strlen(inputtext) > 50) return SendClientMessage(playerid, COLOR_GRAD1, "Name can not be longer than 50 characters!");
  2597. strdel(Entrances[ident][doorname], 0, 50);
  2598. strins(Entrances[ident][doorname], inputtext, 0);
  2599. format(str, sizeof(str), "{43527D}%s{FFFFFF}\n\nType /enter to go inside.", Entrances[ident][doorname]);
  2600. UpdateDynamic3DTextLabelText(EntranceRefText[ident], COLOR_ENTRANCE, str);
  2601. format(str, sizeof(str), "You have edited door id %d's name to \"%s\".", ident, Entrances[ident][doorname]);
  2602. SendClientMessage(playerid, COLOR_GRAD1, str);
  2603. SetPVarInt(playerid, "door_editing_name", -1);
  2604. format(str, sizeof(str), "%s has changed the name of door ID %d.", PlayerName(playerid), ident);
  2605. printf(str);
  2606. }
  2607. return 1;
  2608. }
  2609. if(dialogid == DIALOG_EDITDOOR_EPOS)
  2610. {
  2611. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this.");
  2612. if(!response) return 1;
  2613. else
  2614. {
  2615. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2616. new ident = strval(inputtext);
  2617. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2618. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2619. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2620. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2621. SetPVarInt(playerid, "door_editing_id", ident);
  2622. SetPVarInt(playerid, "door_editing_type", 1);
  2623. SendClientMessage(playerid, COLOR_YELLOW, "You can now do /ddone in the position you want to move this door.");
  2624. }
  2625. return 1;
  2626. }
  2627. if(dialogid == DIALOG_EDITDOOR_IPOS)
  2628. {
  2629. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this.");
  2630. if(!response) return 1;
  2631. else
  2632. {
  2633. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2634. new ident = strval(inputtext);
  2635. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2636. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2637. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2638. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2639. SetPVarInt(playerid, "door_editing_id", ident);
  2640. SetPVarInt(playerid, "door_editing_type", 2);
  2641. SendClientMessage(playerid, COLOR_YELLOW, "You can now do /ddone in the position you want to move this door's interior.");
  2642. }
  2643. return 1;
  2644. }
  2645. if(dialogid == DIALOG_EDITDOOR_ICON1)
  2646. {
  2647. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2648. if(!response) return SetPVarInt(playerid, "door_editing_icon", -1);
  2649. else
  2650. {
  2651. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2652. new ident = strval(inputtext);
  2653. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2654. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2655. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2656. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2657. SetPVarInt(playerid, "door_editing_icon", ident);
  2658. ShowPlayerDialog(playerid,
  2659. DIALOG_EDITDOOR_ICON2,
  2660. DIALOG_STYLE_LIST,
  2661. "Edit Door - Change Icon Step 2",
  2662. "Entrance (\"i\" icon)\nInformation\nArrow #2\nArrow #3\nArrow #4\nArrow #5\nEnter/Exit Marker",
  2663. "Done",
  2664. "Cancel");
  2665. }
  2666. return 1;
  2667. }
  2668. if(dialogid == DIALOG_EDITDOOR_ICON2)
  2669. {
  2670. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2671. if(!response) return SetPVarInt(playerid, "door_editing_icon", -1);
  2672. else
  2673. {
  2674. new did = GetPVarInt(playerid, "door_editing_icon");
  2675. if(did < 1) return SetPVarInt(playerid, "door_editing_icon", -1);
  2676. if(did > MAX_DOORS || did < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2677. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z]);
  2678. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2679. return SetPVarInt(playerid, "door_editing_icon", -1);
  2680. Entrances[did][outside_icon] = listitem;
  2681. new actualpickupid = 0;
  2682. if(Entrances[did][outside_icon] == 0) actualpickupid = 19198;
  2683. else if(Entrances[did][outside_icon] == 1) actualpickupid = 1239;
  2684. else if(Entrances[did][outside_icon] == 2) actualpickupid = 19131;
  2685. else if(Entrances[did][outside_icon] == 3) actualpickupid = 19132;
  2686. else if(Entrances[did][outside_icon] == 4) actualpickupid = 19133;
  2687. else if(Entrances[did][outside_icon] == 5) actualpickupid = 19134;
  2688. else if(Entrances[did][outside_icon] == 6) actualpickupid = 19135;
  2689. if(EntranceRef[did]) DestroyDynamicPickup(EntranceRef[did]);
  2690. if(EntranceRefInt[did]) DestroyDynamicPickup(EntranceRefInt[did]);
  2691. if(EntranceRefText[did]) DestroyDynamic3DTextLabel(EntranceRefText[did]);
  2692. if( Entrances[did][outside_icon] == 0 ) {
  2693. EntranceRef[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z]+0.4, Entrances[did][outside_w]);
  2694. EntranceRefInt[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][inside_x], Entrances[did][inside_y], Entrances[did][inside_z]+0.4, Entrances[did][inside_w]);
  2695. } else {
  2696. EntranceRef[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z], Entrances[did][outside_w]);
  2697. EntranceRefInt[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][inside_x], Entrances[did][inside_y], Entrances[did][inside_z], Entrances[did][inside_w]);
  2698. }
  2699. new doornametext[128];
  2700. format(doornametext, sizeof(doornametext), "{43527D}%s{FFFFFF}\n\nType /enter to go inside.", Entrances[did][doorname]);
  2701. EntranceRefText[did] = CreateDynamic3DTextLabel(doornametext, COLOR_ENTRANCE, Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z] +0.75, 5.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, Entrances[did][outside_w], Entrances[did][outside_i]);
  2702. SaveEntrances();
  2703. SendClientMessage(playerid, COLOR_YELLOW, "You have updated that door's icon.");
  2704. format(str, sizeof(str), "%s has edited the icon of door ID %d.", PlayerName(playerid), did);
  2705. printf(str);
  2706. }
  2707. return 1;
  2708. }
  2709. if(dialogid == DIALOG_EDITDOOR_PASS1)
  2710. {
  2711. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2712. if(!response) return SetPVarInt(playerid, "door_editing_pass", -1);
  2713. else
  2714. {
  2715. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2716. new ident = strval(inputtext);
  2717. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2718. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2719. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2720. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2721. SetPVarInt(playerid, "door_editing_pass", ident);
  2722. ShowPlayerDialog(playerid,
  2723. DIALOG_EDITDOOR_PASS2,
  2724. DIALOG_STYLE_INPUT,
  2725. "Edit Door - Change Password Step 2",
  2726. "Please enter the new password for the door, just enter \"none\" to remove the password.",
  2727. "Change",
  2728. "Cancel");
  2729. }
  2730. return 1;
  2731. }
  2732. if(dialogid == DIALOG_EDITDOOR_PASS2)
  2733. {
  2734. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2735. if(!response) return SetPVarInt(playerid, "door_editing_pass", -1);
  2736. else
  2737. {
  2738. new did = GetPVarInt(playerid, "door_editing_pass");
  2739. if(did > MAX_DOORS || did < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2740. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z]);
  2741. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2742. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2743. if(strlen(inputtext) > 50) return SendClientMessage(playerid, COLOR_GRAD1, "That password is too long! Must be under 50 characters!");
  2744. strdel(Entrances[did][dpassword], 0, 128);
  2745. if(strcmp(inputtext, "none", true) != 0)
  2746. strins(Entrances[did][dpassword], inputtext, 0);
  2747. if(strcmp(inputtext, "none", true) != 0)
  2748. format(str, sizeof(str), "You have changed door %d's password to %s.", did, inputtext);
  2749. else
  2750. format(str, sizeof(str), "You have removed door %d's password.", did);
  2751. SendClientMessage(playerid, COLOR_GRAD1, str);
  2752. SetPVarInt(playerid, "door_editing_pass", -1);
  2753. format(str, sizeof(str), "%s has updated the password of door ID %d.", PlayerName(playerid), did);
  2754. printf(str);
  2755. }
  2756. return 1;
  2757. }
  2758. if(dialogid == DIALOG_EDITDOOR_FREEZE)
  2759. {
  2760. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2761. if(!response) return 1;
  2762. else
  2763. {
  2764. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2765. new ident = strval(inputtext);
  2766. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2767. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2768. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2769. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2770. Entrances[ident][freeze] = !Entrances[ident][freeze]; // Toggle, works in C++ not sure about PAWN.
  2771. if(Entrances[ident][freeze])
  2772. format(str, sizeof(str), "Players are now frozen when they enter or exit this door.");
  2773. else
  2774. format(str, sizeof(str), "Players are now NOT frozen when they enter or exit this door.");
  2775. SendClientMessage(playerid, COLOR_YELLOW, str);
  2776. format(str, sizeof(str), "%s has updated the freeze option of door ID %d.", PlayerName(playerid), ident);
  2777. printf(str);
  2778. }
  2779. return 1;
  2780. }
  2781. if( dialogid == DIALOG_EDITDOOR_OWNER1 ) {
  2782. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2783. if(!response) return SetPVarInt(playerid, "door_editing_owner", -1);
  2784. else
  2785. {
  2786. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2787. new ident = strval(inputtext);
  2788. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2789. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2790. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2791. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2792. SetPVarInt(playerid, "door_editing_owner", ident);
  2793. ShowPlayerDialog(playerid,
  2794. DIALOG_EDITDOOR_OWNER2,
  2795. DIALOG_STYLE_INPUT,
  2796. "Edit Door - Change Owner Step 2",
  2797. "Please enter the owner's SQL ID (/nametosql) \"0\" to remove the owner.",
  2798. "Change",
  2799. "Cancel");
  2800. }
  2801. return 1;
  2802. }
  2803. if( dialogid == DIALOG_EDITDOOR_OWNER2 ) {
  2804. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2805. if(!response) return SetPVarInt(playerid, "door_editing_owner", -1);
  2806. else
  2807. {
  2808. new did = GetPVarInt(playerid, "door_editing_owner");
  2809. if(did > MAX_DOORS || did < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2810. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z]);
  2811. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2812. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2813. new ownerID = strval( inputtext );
  2814. if( !IsNumeric( inputtext ) || ownerID < 0 ) {
  2815. return SendClientMessage( playerid, COLOR_GREY, "You must enter some positive integer, as owner SQL IDs are represented as numbers." );
  2816. }
  2817. Entrances[did][eowner] = ownerID;
  2818. SetPVarInt(playerid, "door_editing_owner", -1);
  2819. if(Entrances[did][eowner])
  2820. format(str, sizeof(str), "This door now has an owner.");
  2821. else
  2822. format(str, sizeof(str), "This door no longer has a set owner.");
  2823. SendClientMessage(playerid, COLOR_YELLOW, str);
  2824. format(str, sizeof(str), "%s has updated the owner option of door ID %d to owner SQL: %d", PlayerName(playerid), ownerID);
  2825. printf(str);
  2826. }
  2827. return 1;
  2828. }
  2829. if(dialogid == DIALOG_EDITDOOR_REM1)
  2830. {
  2831. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2832. if(!response) return SetPVarInt(playerid, "door_editing_remove", -1);
  2833. else
  2834. {
  2835. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2836. new ident = strval(inputtext);
  2837. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2838. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2839. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2840. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2841. SetPVarInt(playerid, "door_editing_remove", ident);
  2842. ShowPlayerDialog(playerid,
  2843. DIALOG_EDITDOOR_REM2,
  2844. DIALOG_STYLE_MSGBOX,
  2845. "Edit Door - Remove Door Step 2",
  2846. "Are you sure you want to delete this door?",
  2847. "Yes",
  2848. "No");
  2849. }
  2850. return 1;
  2851. }
  2852. if(dialogid == DIALOG_EDITDOOR_REM2)
  2853. {
  2854. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2855. if(!response) return SetPVarInt(playerid, "door_editing_remove", -1);
  2856. else
  2857. {
  2858. new did = GetPVarInt(playerid, "door_editing_remove");
  2859. if(did > MAX_DOORS || did < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2860. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z]);
  2861. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2862. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2863. Entrances[did][outside_icon] = 0;
  2864. Entrances[did][outside_x] = 0.00;
  2865. Entrances[did][outside_y] = 0.00;
  2866. Entrances[did][outside_z] = 0.00;
  2867. Entrances[did][outside_a] = 0.00;
  2868. Entrances[did][outside_i] = 0;
  2869. Entrances[did][outside_w] = 0;
  2870. Entrances[did][inside_x] = 0.00;
  2871. Entrances[did][inside_y] = 0.00;
  2872. Entrances[did][inside_z] = 0.00;
  2873. Entrances[did][inside_a] = 0.00;
  2874. Entrances[did][inside_i] = 0;
  2875. Entrances[did][inside_w] = 0;
  2876. strdel(Entrances[did][doorname], 0, 50);
  2877. strdel(Entrances[did][createdby], 0, 50);
  2878. if(EntranceRef[did]) DestroyDynamicPickup(EntranceRef[did]);
  2879. if(EntranceRefInt[did]) DestroyDynamicPickup(EntranceRefInt[did]);
  2880. if(EntranceRefText[did]) DestroyDynamic3DTextLabel(EntranceRefText[did]);
  2881. EntranceRef[did] = 0;
  2882. EntranceRefInt[did] = 0;
  2883. EntranceRefText[did] = Text3D:INVALID_3DTEXT_ID;
  2884. format(str, sizeof(str), "You have removed door id %d.", did);
  2885. SendClientMessage(playerid, COLOR_GRAD1, str);
  2886. SetPVarInt(playerid, "door_editing_remove", -1);
  2887. format(str, sizeof(str), "%s has removed door ID %d.", PlayerName(playerid), did);
  2888. printf(str);
  2889. }
  2890. return 1;
  2891. }
  2892. if(dialogid == DIALOG_ID_PLAYER_PASS)
  2893. {
  2894. if(!response) return 1;
  2895. else
  2896. {
  2897. for(new i = 0; i < sizeof(EntranceRef); i++)
  2898. {
  2899. if(
  2900. IsPlayerInRangeOfPoint(playerid, 2, Entrances[i][outside_x], Entrances[i][outside_y], Entrances[i][outside_z]) &&
  2901. GetPlayerVirtualWorld(playerid) == Entrances[i][outside_w] &&
  2902. GetPlayerInterior(playerid) == Entrances[i][outside_i])
  2903. {
  2904. if(!strlen(Entrances[i][dpassword])) // the door they're at has no password. wtf
  2905. return 1;
  2906. if(strcmp(Entrances[i][dpassword], inputtext) != 0 || strlen(inputtext) == 0)
  2907. return SendClientMessage(playerid, COLOR_GRAD1, "Incorrect password... Access Denied.");
  2908. SendClientMessage(playerid, COLOR_GREEN, "Access granted.");
  2909. SetPlayerPos(playerid, Entrances[i][inside_x], Entrances[i][inside_y], Entrances[i][inside_z]);
  2910. SetPlayerFacingAngle(playerid, Entrances[i][inside_a]);
  2911. SetPlayerInterior(playerid, Entrances[i][inside_i]);
  2912. SetPlayerVirtualWorld(playerid, Entrances[i][inside_w]);
  2913. SetCameraBehindPlayer(playerid);
  2914. if(Entrances[i][freeze])
  2915. {
  2916. Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
  2917. }
  2918. return 1;
  2919. }
  2920. }
  2921. }
  2922. return 1;
  2923. }
  2924. if(dialogid == DIALOG_INTERIOR_MENU)
  2925. {
  2926. if(response)
  2927. {
  2928. new arrayid = listitem, tpstr[128];
  2929. SetPlayerPos(playerid, InteriorDialogData[arrayid][0], InteriorDialogData[arrayid][1], InteriorDialogData[arrayid][2]);
  2930. SetPlayerInterior(playerid, InteriorDialogInteriors[arrayid][0]);
  2931. SetPlayerFacingAngle(playerid, InteriorDialogData[arrayid][3]);
  2932. format(tpstr, sizeof(tpstr), "* You have been teleported to interior %s.", InteriorDialogNames[arrayid][0]);
  2933. SendClientMessage(playerid, COLOR_LIGHTBLUE, tpstr);
  2934. }
  2935. return 1;
  2936. }
  2937. //dealerships
  2938. if(dialogid == 24325)
  2939. {
  2940. if(!response)
  2941. {
  2942. for(new i = 0; i < MAX_DEALERS; i++)
  2943. {
  2944. format(str, sizeof(str), "dealerlist_%d", i);
  2945. DeletePVar(playerid, str);
  2946. }
  2947. return 1;
  2948. }
  2949. else
  2950. {
  2951. format(str, sizeof(str), "dealerlist_%d", listitem);
  2952. new i = GetPVarInt(playerid, str);
  2953. SetPlayerCheckpointEx(playerid, Dealerships[i][dPos][0], Dealerships[i][dPos][1], Dealerships[i][dPos][2], 5.0);
  2954. CP[playerid] = CHECKPOINT_SHOWDEALERSHIP;
  2955. format(str, sizeof(str), "%s has been marked on your map (red marker).", Dealerships[i][dName]);
  2956. SendClientMessage(playerid, COLOR_YELLOW, str);
  2957. }
  2958. return 1;
  2959. }
  2960. if(dialogid == 12513)
  2961. {
  2962. if(response)
  2963. {
  2964. if(PhoneOffline[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Your cellphone is currently turned off, use /togphone.");
  2965. if(PlayerInfo[playerid][pCash] < 25) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to make a call. ($25)");
  2966. if(CheckForJammer(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Phone signal has been jammed.");
  2967. if( PlayerInfo[playerid][pAdminJailed] || PlayerInfo[playerid][pJailed]) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't use this whilst you're in prison.");
  2968. if(PlayerInfo[playerid][pHospital] || IsPlayerRestricted(playerid) || pDeathState[playerid] != PLAYER_STATE_NORMAL) return SendClientMessage(playerid, COLOR_GRAD2, "You are unable to use a phone at this time.");
  2969. if(strlen(inputtext))
  2970. {
  2971. if(IsNumeric(inputtext))
  2972. {
  2973. do_call(playerid, strval(inputtext));
  2974. }
  2975. }
  2976. }
  2977. }
  2978. if(dialogid == 12460)
  2979. {
  2980. if(!response)
  2981. {
  2982. pModelState[playerid] = 999;
  2983. DeletePVar(playerid, "buyingdealer");
  2984. return 1;
  2985. }
  2986. else
  2987. {
  2988. new d = GetPVarInt(playerid, "buyingdealer");
  2989. if(Dealerships[d][dCreated] == false)
  2990. {
  2991. pModelState[playerid] = 999;
  2992. DeletePVar(playerid, "buyingdealer");
  2993. return 1;
  2994. }
  2995. if(Dealerships[d][dCars][listitem] >= 400)
  2996. {
  2997. PlayerTextDrawDestroy(playerid, pModel_t[playerid]);
  2998. pModelState[playerid] = 999;
  2999. pModel_t[playerid] = CreatePlayerTextDraw(playerid, 228.0, 200.0, "_");
  3000. PlayerTextDrawFont(playerid, pModel_t[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
  3001. PlayerTextDrawTextSize(playerid, pModel_t[playerid], 200.0, 200.0);
  3002. PlayerTextDrawSetPreviewModel(playerid, pModel_t[playerid], Dealerships[d][dCars][listitem]);
  3003. PlayerTextDrawSetPreviewRot(playerid, pModel_t[playerid], -16.0, 0.0, -55.0);
  3004. PlayerTextDrawUseBox(playerid, pModel_t[playerid], 0);
  3005. PlayerTextDrawBackgroundColor(playerid, pModel_t[playerid], 0x00000000);
  3006. PlayerTextDrawShow(playerid, pModel_t[playerid]);
  3007. pModelState[playerid] = 3;
  3008. pModelRot[playerid][0] = 0;
  3009. pModelRot[playerid][1] = 0;
  3010. pModelRot[playerid][2] = 0;
  3011. pModelTimer[playerid] = SetTimerEx("UpdatePreviewModel", 1000, 1, "i", playerid);
  3012. format(str, sizeof(str), "Are you sure you would like to purchase this %s for $%d?\n\n{F5DA81}NOTE: Below is a preview of the vehicle.", GetVehicleFriendlyNameFromModel(Dealerships[d][dCars][listitem]), Dealerships[d][dCarPrice][listitem]);
  3013. ShowPlayerDialog(playerid, 12461, DIALOG_STYLE_MSGBOX, "Confirm Purchase", str, "Purchase", "Cancel");
  3014. SetPVarInt(playerid, "buyingcarid", listitem);
  3015. }
  3016. }
  3017. return 1;
  3018. }
  3019. if(dialogid == 12461)
  3020. {
  3021. PlayerTextDrawDestroy(playerid, pModel_t[playerid]);
  3022. pModelState[playerid] = 999;
  3023. if(!response)
  3024. {
  3025. DeletePVar(playerid, "buyingdealer");
  3026. DeletePVar(playerid, "buyingcarid");
  3027. return 1;
  3028. }
  3029. else
  3030. {
  3031. new d = GetPVarInt(playerid, "buyingdealer");
  3032. if(Dealerships[d][dCreated] == false)
  3033. {
  3034. DeletePVar(playerid, "buyingdealer");
  3035. DeletePVar(playerid, "buyingcarid");
  3036. return 1;
  3037. }
  3038. new cid = GetPVarInt(playerid, "buyingcarid");
  3039. new model = Dealerships[d][dCars][cid];
  3040. if(model < 400 || model > 600)
  3041. {
  3042. DeletePVar(playerid, "buyingdealer");
  3043. DeletePVar(playerid, "buyingcarid");
  3044. return 1;
  3045. }
  3046. new price = Dealerships[d][dCarPrice][cid];
  3047. if(price < 1)
  3048. {
  3049. DeletePVar(playerid, "buyingdealer");
  3050. DeletePVar(playerid, "buyingcarid");
  3051. return 1;
  3052. }
  3053. if(GetMoney(playerid) < price)
  3054. {
  3055. DeletePVar(playerid, "buyingdealer");
  3056. DeletePVar(playerid, "buyingcarid");
  3057. SendClientMessage(playerid, COLOR_GRAD1, "You can not afford that.");
  3058. return 1;
  3059. }
  3060. new slot;
  3061. slot = GetPlayerFreeCarslot( playerid );
  3062. if( slot < 0 ) {
  3063. return SendClientMessage( playerid, COLOR_GREY, "You do not have any free slots to buy another car. Sell a car first, or dump one." );
  3064. }
  3065. GiveMoney(playerid, -price);
  3066. createPlayerVehicle(playerid, slot, model, Dealerships[d][dPos][3], Dealerships[d][dPos][4], Dealerships[d][dPos][5], Dealerships[d][dPos][6]);
  3067. if( playerSpawnedVehicle[playerid] > -1 ) {
  3068. destroyPlayerVehicle( playerid, playerSpawnedVehicle[playerid] );
  3069. }
  3070. spawnPlayerVehicle( playerid, slot );
  3071. format(str, sizeof(str), "You have bought a %s from %s for $%d.", GetVehicleFriendlyNameFromModel(Dealerships[d][dCars][cid]), Dealerships[d][dName], Dealerships[d][dCarPrice][cid]);
  3072. SendClientMessage(playerid, COLOR_YELLOW, str);
  3073. }
  3074. return 1;
  3075. }
  3076. if(dialogid == 12400) // ID is dedit
  3077. {
  3078. if(!response)
  3079. {
  3080. DeletePVar(playerid, "edittingdealer");
  3081. return 1;
  3082. }
  3083. if(listitem == 0)
  3084. {
  3085. new d = GetPVarInt(playerid, "edittingdealer");
  3086. if(Dealerships[d][dCreated] == false)
  3087. {
  3088. DeletePVar(playerid, "edittingdealer");
  3089. return 1;
  3090. }
  3091. ShowPlayerDialog(playerid, 12410, DIALOG_STYLE_INPUT, "Change Dealership Name", "Enter a new name for the dealership.", "Done", "Cancel");
  3092. }
  3093. else if(listitem == 1)
  3094. {
  3095. new d = GetPVarInt(playerid, "edittingdealer");
  3096. if(Dealerships[d][dCreated] == false)
  3097. {
  3098. DeletePVar(playerid, "edittingdealer");
  3099. return 1;
  3100. }
  3101. new carsstring[1024];
  3102. format(carsstring, sizeof(carsstring), "Add Car\n");
  3103. for(new i = 0; i < 64; i++)
  3104. {
  3105. if(Dealerships[d][dCars][i] >= 400)
  3106. {
  3107. format(carsstring, sizeof(carsstring), "%s%d. %s ($%d)\n", carsstring, i, GetVehicleFriendlyNameFromModel(Dealerships[d][dCars][i]), Dealerships[d][dCarPrice][i]);
  3108. }
  3109. }
  3110. ShowPlayerDialog(playerid, 12420, DIALOG_STYLE_LIST, "Manage Dealership Cars", carsstring, "Select", "Cancel");
  3111. }
  3112. else if(listitem == 2)
  3113. {
  3114. new d = GetPVarInt(playerid, "edittingdealer");
  3115. if(Dealerships[d][dCreated] == false)
  3116. {
  3117. DeletePVar(playerid, "edittingdealer");
  3118. return 1;
  3119. }
  3120. SetPVarInt(playerid, "movedealerid", d);
  3121. SetPVarInt(playerid, "movingdealerid", 1);
  3122. SendClientMessage(playerid, COLOR_YELLOW, "Use /ddone in the new position to update the position.");
  3123. }
  3124. else if(listitem == 3)
  3125. {
  3126. new d = GetPVarInt(playerid, "edittingdealer");
  3127. if(Dealerships[d][dCreated] == false)
  3128. {
  3129. DeletePVar(playerid, "edittingdealer");
  3130. return 1;
  3131. }
  3132. SetPVarInt(playerid, "movedealerid", d);
  3133. SetPVarInt(playerid, "movingdealerid", 2);
  3134. SendClientMessage(playerid, COLOR_YELLOW, "Use /ddone in the new position to update the vehicle spawning position.");
  3135. }
  3136. else if(listitem == 4)
  3137. {
  3138. new d = GetPVarInt(playerid, "edittingdealer");
  3139. if(Dealerships[d][dCreated] == false)
  3140. {
  3141. DeletePVar(playerid, "edittingdealer");
  3142. return 1;
  3143. }
  3144. ShowPlayerDialog(playerid, 12430, DIALOG_STYLE_MSGBOX, "Remove Dealership", "Are you sure you want to remove this dealership? These changes can not be reversed.", "Yes", "No");
  3145. }
  3146. return 1;
  3147. }
  3148. if(dialogid == 12410) // id is changing dealership name
  3149. {
  3150. if(!response)
  3151. {
  3152. DeletePVar(playerid, "edittingdealer");
  3153. return 1;
  3154. }
  3155. if(strlen(inputtext))
  3156. {
  3157. new d = GetPVarInt(playerid, "edittingdealer");
  3158. if(Dealerships[d][dCreated] == false)
  3159. {
  3160. DeletePVar(playerid, "edittingdealer");
  3161. return 1;
  3162. }
  3163. strmid(Dealerships[d][dName], inputtext, 0, 64, 64);
  3164. format(str, sizeof(str), "Dealership\nName: %s\nID: %d\n/buycar to buy a car.", Dealerships[d][dName], d);
  3165. UpdateDynamic3DTextLabelText(Dealerships[d][d3DText], 0xFE9A2EFF, str);
  3166. SaveDealerships();
  3167. format(str, sizeof(str), "You have changed Dealership ID %d's name to \"%s\".", d, Dealerships[d][dName]);
  3168. SendClientMessage(playerid, COLOR_YELLOW, str);
  3169. }
  3170. return 1;
  3171. }
  3172. if(dialogid == 12420) // id is managing dealership cars
  3173. {
  3174. if(!response)
  3175. {
  3176. DeletePVar(playerid, "edittingdealer");
  3177. return 1;
  3178. }
  3179. if(listitem == 0)
  3180. {
  3181. new d = GetPVarInt(playerid, "edittingdealer");
  3182. if(Dealerships[d][dCreated] == false)
  3183. {
  3184. DeletePVar(playerid, "edittingdealer");
  3185. return 1;
  3186. }
  3187. ShowPlayerDialog(playerid, 12421, DIALOG_STYLE_INPUT, "Enter Vehicle Name/ID", "Enter the vehicle model or ID that you want to add to this dealership.", "Okay", "Cancel");
  3188. }
  3189. else
  3190. {
  3191. new d = GetPVarInt(playerid, "edittingdealer");
  3192. if(Dealerships[d][dCreated] == false)
  3193. {
  3194. DeletePVar(playerid, "edittingdealer");
  3195. return 1;
  3196. }
  3197. new car = listitem - 1;
  3198. if(Dealerships[d][dCars][car] >= 400)
  3199. {
  3200. Dealerships[d][dCars][car] = 0;
  3201. Dealerships[d][dCarPrice][car] = 0;
  3202. new ca = 0; // car id fix
  3203. for(new i = 0; i < 64; i++)
  3204. {
  3205. if(Dealerships[d][dCars][i] >= 400)
  3206. {
  3207. new oldid, oldprice;
  3208. oldid = Dealerships[d][dCars][i];
  3209. oldprice = Dealerships[d][dCarPrice][i];
  3210. Dealerships[d][dCars][i] = 0;
  3211. Dealerships[d][dCarPrice][i] = 0;
  3212. // here's the fix
  3213. Dealerships[d][dCars][ca] = oldid;
  3214. Dealerships[d][dCarPrice][ca] = oldprice;
  3215. ca++;
  3216. }
  3217. }
  3218. SaveDealerships();
  3219. SendClientMessage(playerid, COLOR_YELLOW, "You have removed that vehicle from the dealership.");
  3220. }
  3221. }
  3222. return 1;
  3223. }
  3224. if(dialogid == 12421) // id is adding car name dialog
  3225. {
  3226. if(!response)
  3227. {
  3228. DeletePVar(playerid, "edittingdealer");
  3229. return 1;
  3230. }
  3231. else
  3232. {
  3233. new d = GetPVarInt(playerid, "edittingdealer");
  3234. if(Dealerships[d][dCreated] == false)
  3235. {
  3236. DeletePVar(playerid, "edittingdealer");
  3237. return 1;
  3238. }
  3239. new modelid = ReturnVehicleModelID(inputtext);
  3240. if(modelid < 400 || modelid > 600) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid vehicle model.");
  3241. SetPVarInt(playerid, "managedcarmodel", modelid);
  3242. format(str, sizeof(str), "Enter the price you want for a %s.", GetVehicleFriendlyNameFromModel(GetPVarInt(playerid, "managedcarmodel")));
  3243. ShowPlayerDialog(playerid, 12422, DIALOG_STYLE_INPUT, "Enter Price", str, "Okay", "Cancel");
  3244. }
  3245. return 1;
  3246. }
  3247. if(dialogid == 12422) // id is adding car price dialog
  3248. {
  3249. if(!response)
  3250. {
  3251. DeletePVar(playerid, "edittingdealer");
  3252. return 1;
  3253. }
  3254. else
  3255. {
  3256. new d = GetPVarInt(playerid, "edittingdealer");
  3257. if(Dealerships[d][dCreated] == false)
  3258. {
  3259. DeletePVar(playerid, "edittingdealer");
  3260. return 1;
  3261. }
  3262. new price = strval(inputtext);
  3263. if(price < 1) return SendClientMessage(playerid, COLOR_GRAD1, "The price can not be below 1.");
  3264. new openindex = -1;
  3265. for(new c = 0; c < 64; c++)
  3266. {
  3267. if(Dealerships[d][dCars][c] < 400)
  3268. {
  3269. openindex = c;
  3270. break;
  3271. }
  3272. }
  3273. if(openindex == -1) return SendClientMessage(playerid, COLOR_GRAD1, "Failed to add car (Error 104)");
  3274. Dealerships[d][dCars][openindex] = GetPVarInt(playerid, "managedcarmodel");
  3275. Dealerships[d][dCarPrice][openindex] = price;
  3276. SaveDealerships();
  3277. format(str, sizeof(str), "Added %s to dealership %s for price $%d.", GetVehicleFriendlyNameFromModel(GetPVarInt(playerid, "managedcarmodel")), Dealerships[d][dName], Dealerships[d][dCarPrice][openindex]);
  3278. SendClientMessage(playerid, COLOR_YELLOW, str);
  3279. }
  3280. return 1;
  3281. }
  3282. if(dialogid == 12430) // id is removing dealership
  3283. {
  3284. if(!response)
  3285. {
  3286. DeletePVar(playerid, "edittingdealer");
  3287. return 1;
  3288. }
  3289. else
  3290. {
  3291. new d = GetPVarInt(playerid, "edittingdealer");
  3292. if(Dealerships[d][dCreated] == false)
  3293. {
  3294. DeletePVar(playerid, "edittingdealer");
  3295. return 1;
  3296. }
  3297. strdel(Dealerships[d][dName], 0, 64);
  3298. Dealerships[d][dPos][0] = 0.0;
  3299. Dealerships[d][dPos][1] = 0.0;
  3300. Dealerships[d][dPos][2] = 0.0;
  3301. Dealerships[d][dPos][3] = 0.0;
  3302. Dealerships[d][dPos][4] = 0.0;
  3303. Dealerships[d][dPos][5] = 0.0;
  3304. Dealerships[d][dPos][6] = 0.0;
  3305. for(new c = 0; c < 64; c++)
  3306. {
  3307. Dealerships[d][dCars][c] = 0;
  3308. Dealerships[d][dCarPrice][c] = 0;
  3309. }
  3310. DestroyDynamic3DTextLabel(Dealerships[d][d3DText]);
  3311. DestroyDynamicPickup(Dealerships[d][dPickup]);
  3312. Dealerships[d][d3DText] = Text3D:INVALID_3DTEXT_ID;
  3313. Dealerships[d][dPickup] = 0;
  3314. Dealerships[d][dCreated] = false;
  3315. SaveDealerships();
  3316. format(str, sizeof(str), "dealerships/%d.ini", d);
  3317. if(fexist(str))
  3318. {
  3319. fremove(str);
  3320. }
  3321. SendClientMessage(playerid, COLOR_YELLOW, "You have successfully deleted the dealership.");
  3322. }
  3323. return 1;
  3324. }
  3325. if(dialogid == 24200) // ID is Giving Accessory From List
  3326. {
  3327. if(response)
  3328. {
  3329. new player = GetPVarInt(playerid, "ToRemoveAccessor");
  3330. Accessories[player][listitem] = 0;
  3331. AccessoriesX[player][listitem] = 0;
  3332. AccessoriesY[player][listitem] = 0;
  3333. AccessoriesZ[player][listitem] = 0;
  3334. AccessoriesrX[player][listitem] = 0;
  3335. AccessoriesrY[player][listitem] = 0;
  3336. AccessoriesrZ[player][listitem] = 0;
  3337. AccessoriessX[player][listitem] = 0;
  3338. AccessoriessY[player][listitem] = 0;
  3339. AccessoriessZ[player][listitem] = 0;
  3340. Accessoriesc1[player][listitem] = 0;
  3341. RemovePlayerAttachedObject(playerid, listitem);
  3342. SendClientMessage(player, COLOR_LIGHTBLUE, "* An admin has removed one of your gear.");
  3343. }
  3344. return 1;
  3345. }
  3346. if(dialogid == 24207) // ID is Giving Accessory From List
  3347. {
  3348. if(response)
  3349. {
  3350. new freeslot = -1, player = GetPVarInt(playerid, "ToGiveAccessorTo");
  3351. for(new i = 0; i < 7; i++)
  3352. {
  3353. if(Accessories[player][i] == 0)
  3354. {
  3355. freeslot = i;
  3356. break;
  3357. }
  3358. }
  3359. if(freeslot == -1) return SendClientMessage(playerid, COLOR_GRAD1, "That player does not have enough space for that.");
  3360. Accessories[player][freeslot] = AdminAccessers[listitem][modid];
  3361. AccessoriesB[player][freeslot] = 1;
  3362. AccessoriessX[player][freeslot] = 1;
  3363. AccessoriessY[player][freeslot] = 1;
  3364. AccessoriessZ[player][freeslot] = 1;
  3365. format(str, sizeof(str), "An admin has given you a \"%s\", Type /gear to equip it.", AdminAccessers[listitem][modname]);
  3366. SendClientMessage(player, COLOR_LIGHTBLUE, str);
  3367. format(str, sizeof(str), "You have given %s a \"%s\".", PlayerICName(player), AdminAccessers[listitem][modname]);
  3368. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3369. }
  3370. return 1;
  3371. }
  3372. if(dialogid == 24208) // ID is Giving Accessory From Search
  3373. {
  3374. if(response)
  3375. {
  3376. new freeslot = -1, player = GetPVarInt(playerid, "ToGiveAccessorTo");
  3377. for(new i = 0; i < 7; i++)
  3378. {
  3379. if(Accessories[player][i] == 0)
  3380. {
  3381. freeslot = i;
  3382. break;
  3383. }
  3384. }
  3385. if(freeslot == -1) return SendClientMessage(playerid, COLOR_GRAD1, "That player does not have enough space for that.");
  3386. Accessories[player][freeslot] = AdminAccessers[accessorysr[playerid][listitem]][modid];
  3387. AccessoriesB[player][freeslot] = 1;
  3388. AccessoriessX[player][freeslot] = 1;
  3389. AccessoriessY[player][freeslot] = 1;
  3390. AccessoriessZ[player][freeslot] = 1;
  3391. format(str, sizeof(str), "An admin has given you a \"%s\", Type /gear to equip it.", AdminAccessers[accessorysr[playerid][listitem]][modname]);
  3392. SendClientMessage(player, COLOR_LIGHTBLUE, str);
  3393. format(str, sizeof(str), "You have given %s a \"%s\".", PlayerICName(player), AdminAccessers[accessorysr[playerid][listitem]][modname]);
  3394. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3395. }
  3396. return 1;
  3397. }
  3398. if(dialogid == 24209) // ID is Giving Accessory Search
  3399. {
  3400. if(response)
  3401. {
  3402. new hugestring[4096], listnum = 0;
  3403. for(new i = 0; i < sizeof(AdminAccessers); i++)
  3404. {
  3405. if(AdminAccessers[i][modid] > 1 && strfind(AdminAccessers[i][modname], inputtext, true) != -1)
  3406. {
  3407. format(hugestring, sizeof(hugestring), "%s\n%s", hugestring, AdminAccessers[i][modname]);
  3408. accessorysr[playerid][listnum] = i;
  3409. listnum++;
  3410. }
  3411. }
  3412. ShowPlayerDialog(playerid, 24208, DIALOG_STYLE_LIST, "Search results", hugestring, "Give", "Cancel");
  3413. }
  3414. return 1;
  3415. }
  3416. if(dialogid == 24210) // ID is Giving Accessory
  3417. {
  3418. if(response)
  3419. {
  3420. ShowPlayerDialog(playerid, 24209, DIALOG_STYLE_INPUT, "Enter model name...", "Please enter the model's name that you want to search for (e.g: SantaHat1)", "Search", "Cancel");
  3421. }
  3422. else
  3423. {
  3424. new hugestring[4096];
  3425. for(new i = 0; i < sizeof(AdminAccessers); i++)
  3426. {
  3427. if(AdminAccessers[i][modid] > 1)
  3428. {
  3429. format(hugestring, sizeof(hugestring), "%s\n%s", hugestring, AdminAccessers[i][modname]);
  3430. }
  3431. }
  3432. ShowPlayerDialog(playerid, 24207, DIALOG_STYLE_LIST, "List of models to give", hugestring, "Give", "Cancel");
  3433. }
  3434. return 1;
  3435. }
  3436. if(dialogid == DIALOG_BUYACCESSOR_MAIN) // ID is Buying Accessories
  3437. {
  3438. if(response)
  3439. {
  3440. new hugestring[3700];
  3441. new pricestr[13];
  3442. new pricestr2[13];
  3443. switch(listitem)
  3444. {
  3445. case 0: //Clothing Items 1
  3446. {
  3447. for(new a = 0; a < 127; a++)
  3448. {
  3449. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3450. format(pricestr, sizeof(pricestr), "[Ticket]");
  3451. } else {
  3452. valstr(pricestr2, AccessNames[a][modprice]);
  3453. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3454. }
  3455. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3456. }
  3457. listItemClothes[playerid] = 0;
  3458. }
  3459. case 1: //Clothing Items 2
  3460. {
  3461. for(new a = 127; a < 244; a++)
  3462. {
  3463. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3464. format(pricestr, sizeof(pricestr), "[Ticket]");
  3465. } else {
  3466. valstr(pricestr2, AccessNames[a][modprice]);
  3467. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3468. }
  3469. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3470. }
  3471. listItemClothes[playerid] = 127;
  3472. }
  3473. case 2: //Toys 1
  3474. {
  3475. for(new a = 244; a < 283; a++)
  3476. {
  3477. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3478. format(pricestr, sizeof(pricestr), "[Ticket]");
  3479. } else {
  3480. valstr(pricestr2, AccessNames[a][modprice]);
  3481. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3482. }
  3483. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3484. }
  3485. listItemClothes[playerid] = 244;
  3486. }
  3487. case 3: //Toys 2
  3488. {
  3489. for(new a = 283; a < 345; a++)
  3490. {
  3491. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3492. format(pricestr, sizeof(pricestr), "[Ticket]");
  3493. } else {
  3494. valstr(pricestr2, AccessNames[a][modprice]);
  3495. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3496. }
  3497. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3498. }
  3499. listItemClothes[playerid] = 283;
  3500. }
  3501. case 4: //VIP
  3502. {
  3503. for(new a = 345; a < sizeof(AccessNames); a++)
  3504. {
  3505. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3506. format(pricestr, sizeof(pricestr), "[Ticket]");
  3507. } else {
  3508. valstr(pricestr2, AccessNames[a][modprice]);
  3509. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3510. }
  3511. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3512. }
  3513. listItemClothes[playerid] = 345;
  3514. }
  3515. }
  3516. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR, DIALOG_STYLE_LIST, "Gear", hugestring, "Purchase", "Back");
  3517. }
  3518. return 1;
  3519. }
  3520. if(dialogid == DIALOG_BUYACCESSOR) // ID is Buying Accessories
  3521. {
  3522. if(response)
  3523. {
  3524. //0 + 127-127+1
  3525. listitem = listItemClothes[playerid] +listitem;
  3526. if(!IsAtClothShop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not at a clothes shop.");
  3527. new biz = GetPlayerVirtualWorld(playerid);
  3528. if(GetMoney(playerid) < AccessNames[listitem][modprice]) return SendClientMessage(playerid, COLOR_GRAD1, "You do not have enough money to pay for that.");
  3529. new freeslot = -1;
  3530. for(new i = 0; i < 7; i++)
  3531. {
  3532. if(Accessories[playerid][i] == 0)
  3533. {
  3534. freeslot = i;
  3535. break;
  3536. }
  3537. }
  3538. if(freeslot == -1) return SendClientMessage(playerid, COLOR_GRAD1, "You do not have enough space for that.");
  3539. PlayerTextDrawDestroy(playerid, pModel_t[playerid]);
  3540. pModelState[playerid] = 999;
  3541. pModel_t[playerid] = CreatePlayerTextDraw(playerid, 220.0, 220.0, "_");
  3542. PlayerTextDrawFont(playerid, pModel_t[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
  3543. PlayerTextDrawTextSize(playerid, pModel_t[playerid], 200.0, 200.0);
  3544. PlayerTextDrawSetPreviewModel(playerid, pModel_t[playerid], AccessNames[listitem][modid]);
  3545. PlayerTextDrawSetPreviewRot(playerid, pModel_t[playerid], -15.0, 0.0, 0.0);
  3546. PlayerTextDrawUseBox(playerid, pModel_t[playerid], 0);
  3547. PlayerTextDrawBackgroundColor(playerid, pModel_t[playerid], 0x00000000);
  3548. PlayerTextDrawShow(playerid, pModel_t[playerid]);
  3549. pModelState[playerid] = 1;
  3550. pModelRot[playerid][0] = 0;
  3551. pModelRot[playerid][1] = 0;
  3552. pModelRot[playerid][2] = 0;
  3553. pModelTimer[playerid] = SetTimerEx("UpdatePreviewModel", 1000, 1, "i", playerid);
  3554. format(str, sizeof(str), "{B4B5B7}Are you sure you would like to purchase the %s for $%d?", AccessNames[listitem][modname], AccessNames[listitem][modprice]);
  3555. ShowPlayerDialog(playerid, 772, DIALOG_STYLE_MSGBOX, "Are you sure?", str, "Purchase", "Back");
  3556. SetPVarInt(playerid, "buyaccbincobiz", biz);
  3557. SetPVarInt(playerid, "buyaccbinco", listitem);
  3558. }
  3559. else
  3560. {
  3561. listItemClothes[playerid] = -1;
  3562. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR_MAIN, DIALOG_STYLE_LIST, "Gear", "Clothing Items 1\nClothing Items 2\nToys 1\nToys 2\nSpecial", "Select", "Cancel");
  3563. }
  3564. return 1;
  3565. }
  3566. if(dialogid == 772)
  3567. {
  3568. PlayerTextDrawDestroy(playerid, pModel_t[playerid]);
  3569. pModelState[playerid] = 999;
  3570. if(!response)
  3571. {
  3572. DeletePVar(playerid, "buyaccbincobiz");
  3573. DeletePVar(playerid, "buyaccbinco");
  3574. new hugestring[3700];
  3575. new pricestr[13];
  3576. new pricestr2[13];
  3577. switch(listItemClothes[playerid])
  3578. {
  3579. case 0:
  3580. { //Clothing Items 1
  3581. for(new a = 0; a < 127; a++)
  3582. {
  3583. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3584. format(pricestr, sizeof(pricestr), "[Ticket]");
  3585. } else {
  3586. valstr(pricestr2, AccessNames[a][modprice]);
  3587. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3588. }
  3589. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3590. listItemClothes[playerid] = 0;
  3591. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR, DIALOG_STYLE_LIST, "Gear", hugestring, "Purchase", "Back");
  3592. }
  3593. }
  3594. case 127:
  3595. { //Clothing Items 2
  3596. for(new a = 127; a < 244; a++)
  3597. {
  3598. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3599. format(pricestr, sizeof(pricestr), "[Ticket]");
  3600. } else {
  3601. valstr(pricestr2, AccessNames[a][modprice]);
  3602. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3603. }
  3604. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3605. listItemClothes[playerid] = 127;
  3606. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR, DIALOG_STYLE_LIST, "Gear", hugestring, "Purchase", "Back");
  3607. }
  3608. }
  3609. case 244:
  3610. { //Toys 1
  3611. for(new a = 244; a < 283; a++)
  3612. {
  3613. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3614. format(pricestr, sizeof(pricestr), "[Ticket]");
  3615. } else {
  3616. valstr(pricestr2, AccessNames[a][modprice]);
  3617. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3618. }
  3619. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3620. listItemClothes[playerid] = 244;
  3621. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR, DIALOG_STYLE_LIST, "Gear", hugestring, "Purchase", "Back");
  3622. }
  3623. }
  3624. case 283:
  3625. { //Toys 2
  3626. for(new a = 283; a < 345; a++)
  3627. {
  3628. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3629. format(pricestr, sizeof(pricestr), "[Ticket]");
  3630. } else {
  3631. valstr(pricestr2, AccessNames[a][modprice]);
  3632. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3633. }
  3634. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3635. listItemClothes[playerid] = 283;
  3636. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR, DIALOG_STYLE_LIST, "Gear", hugestring, "Purchase", "Back");
  3637. }
  3638. }
  3639. case 345:
  3640. { //Special
  3641. for(new a = 345; a < sizeof(AccessNames); a++)
  3642. {
  3643. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3644. format(pricestr, sizeof(pricestr), "[Ticket]");
  3645. } else {
  3646. valstr(pricestr2, AccessNames[a][modprice]);
  3647. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3648. }
  3649. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3650. listItemClothes[playerid] = 345;
  3651. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR, DIALOG_STYLE_LIST, "Gear", hugestring, "Purchase", "Back");
  3652. }
  3653. }
  3654. default:
  3655. {
  3656. listItemClothes[playerid] = -1;
  3657. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR_MAIN, DIALOG_STYLE_LIST, "Gear", "Clothing Items 1\nClothing Items 2\nToys 1\nToys 2\nSpecial", "Select", "Cancel");
  3658. }
  3659. }
  3660. return 1;
  3661. }
  3662. else
  3663. {
  3664. new biz = GetPVarInt(playerid, "buyaccbincobiz");
  3665. new accid = GetPVarInt(playerid, "buyaccbinco");
  3666. new freeslot = -1;
  3667. for(new i = 0; i < 7; i++)
  3668. {
  3669. if(Accessories[playerid][i] == 0)
  3670. {
  3671. freeslot = i;
  3672. break;
  3673. }
  3674. }
  3675. if(freeslot == -1)
  3676. {
  3677. listItemClothes[playerid] = -1;
  3678. SendClientMessage(playerid, COLOR_GRAD1, "You do not have enough space for that.");
  3679. return 1;
  3680. }
  3681. if(AccessNames[accid][modprice] == 1) //if the accessory modprice is 1 then it's a special gear
  3682. { //special menu
  3683. if(PlayerInfo[playerid][gTicket] < 1)
  3684. {
  3685. listItemClothes[playerid] = -1;
  3686. SendClientMessage(playerid, COLOR_GRAD1, "You do not have any gear tickets, you can purchase them at donate.gta-ecrp.com.");
  3687. return 1;
  3688. }
  3689. PlayerInfo[playerid][gTicket]--;
  3690. format(str, sizeof(str), "* You have used a Gear Ticket, you have %d remaining.", PlayerInfo[playerid][gTicket]);
  3691. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3692. }
  3693. Accessories[playerid][freeslot] = AccessNames[accid][modid];
  3694. AccessoriesB[playerid][freeslot] = 1;
  3695. AccessoriessX[playerid][freeslot] = 1;
  3696. AccessoriessY[playerid][freeslot] = 1;
  3697. AccessoriessZ[playerid][freeslot] = 1;
  3698. BizInfo[biz][bTill] += AccessNames[accid][modprice];
  3699. BizInfo[biz][bProducts] -= 1;
  3700. GiveMoney(playerid, -AccessNames[accid][modprice]);
  3701. new buygearstr[128];
  3702. format(buygearstr, sizeof(buygearstr), "~r~%s~w~ purchased! Type /gear to equip it.", AccessNames[accid][modname]);
  3703. displayCenterHUDInfo(playerid, buygearstr, 8); //display for 8 seconds
  3704. listItemClothes[playerid] = -1;
  3705. DeletePVar(playerid, "buyaccbincobiz");
  3706. DeletePVar(playerid, "buyaccbinco");
  3707. }
  3708. return 1;
  3709. }
  3710. if(dialogid == 24215) // ID is Inventory Accessory List
  3711. {
  3712. if(response)
  3713. {
  3714. if(listitem <= 6) //if it's a gear slot
  3715. {
  3716. if(Accessories[playerid][listitem] == 0) //if there is nothing in the slot
  3717. {
  3718. SendClientMessage(playerid, COLOR_GRAD1, "That slot is empty.");
  3719. ShowAccessDialog(playerid, 0);
  3720. return 1;
  3721. }
  3722. else
  3723. {
  3724. new titlestring[128];
  3725. format(titlestring, sizeof(titlestring), "Gear %d", listitem +1);
  3726. SetPVarInt(playerid, "ManageAccessID", listitem);
  3727. if(!IsPlayerAttachedObjectSlotUsed(playerid, listitem))
  3728. {
  3729. ShowPlayerDialog(playerid, 24216, DIALOG_STYLE_LIST, titlestring, "Equip\nAdjust Position\nChange Bone\nChange Color\nDelete", "Select", "Back");
  3730. }
  3731. else
  3732. {
  3733. ShowPlayerDialog(playerid, 24216, DIALOG_STYLE_LIST, titlestring, "Unequip\nAdjust Position\nChange Bone\nChange Color\nDelete", "Select", "Back");
  3734. }
  3735. }
  3736. }
  3737. else if(listitem == 7)
  3738. {
  3739. equipAllGear(playerid);
  3740. }
  3741. else if(listitem == 8)
  3742. {
  3743. removeAllGear(playerid);
  3744. }
  3745. }
  3746. return 1;
  3747. }
  3748. if(dialogid == 24216) // ID is Inventory Manage Item
  3749. {
  3750. if(response)
  3751. {
  3752. new manageid = GetPVarInt(playerid, "ManageAccessID");
  3753. if(listitem == 0)
  3754. {
  3755. if(GetPVarInt(playerid, "ManageAccessID") < 0 || GetPVarInt(playerid, "ManageAccessID") > 6) return SendClientMessage(playerid, COLOR_RED, "ACCESS DENIED: Hacking attempt.");
  3756. if(IsPlayerAttachedObjectSlotUsed(playerid, manageid))
  3757. {
  3758. RemovePlayerAttachedObject(playerid, manageid);
  3759. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have unequipped the gear.");
  3760. }
  3761. else
  3762. {
  3763. //equipping for the first time, bone/position is default
  3764. if(AccessoriesX[playerid][manageid] == 0.0 && AccessoriesY[playerid][manageid] == 0.0 && AccessoriesZ[playerid][manageid] == 0.0)
  3765. {
  3766. new bonestring[256 +1];
  3767. for(new i; i < sizeof(AttachmentBones); i++)
  3768. {
  3769. format(bonestring, sizeof(bonestring), "%s\n%s", bonestring, AttachmentBones[i]);
  3770. }
  3771. ShowPlayerDialog(playerid, 24217, DIALOG_STYLE_LIST, "Select Bone", bonestring, "Select", "Back");
  3772. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Select the bodypart which you would like to equip the gear to.");
  3773. }
  3774. else
  3775. {
  3776. SetPlayerAttachedObject(playerid, manageid, Accessories[playerid][manageid], AccessoriesB[playerid][manageid], AccessoriesX[playerid][manageid], AccessoriesY[playerid][manageid], AccessoriesZ[playerid][manageid], AccessoriesrX[playerid][manageid], AccessoriesrY[playerid][manageid], AccessoriesrZ[playerid][manageid], AccessoriessX[playerid][manageid], AccessoriessY[playerid][manageid], AccessoriessZ[playerid][manageid], GetGearColour(Accessoriesc1[playerid][manageid]));
  3777. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have equipped the gear.");
  3778. DeletePVar(playerid, "ManageAccessID");
  3779. }
  3780. }
  3781. }
  3782. else if(listitem == 1)
  3783. {
  3784. if(GetPVarInt(playerid, "ManageAccessID") < 0 || GetPVarInt(playerid, "ManageAccessID") > 6) return SendClientMessage(playerid, COLOR_RED, "ACCESS DENIED: Hacking attempt.");
  3785. if(AccessoriesB[playerid][manageid] <= 0)
  3786. {
  3787. AccessoriesB[playerid][manageid] = 1;
  3788. }
  3789. if(AccessoriessX[playerid][manageid] <= 0 && AccessoriessY[playerid][manageid] <= 0 && AccessoriessZ[playerid][manageid] <= 0)
  3790. {
  3791. AccessoriessX[playerid][manageid] = 1;
  3792. AccessoriessY[playerid][manageid] = 1;
  3793. AccessoriessZ[playerid][manageid] = 1;
  3794. }
  3795. SetPlayerAttachedObject(playerid, manageid, Accessories[playerid][manageid], AccessoriesB[playerid][manageid], AccessoriesX[playerid][manageid], AccessoriesY[playerid][manageid], AccessoriesZ[playerid][manageid], AccessoriesrX[playerid][manageid], AccessoriesrY[playerid][manageid], AccessoriesrZ[playerid][manageid], AccessoriessX[playerid][manageid], AccessoriessY[playerid][manageid], AccessoriessZ[playerid][manageid], GetGearColour(Accessoriesc1[playerid][manageid]));
  3796. EditAttachedObject(playerid, manageid);
  3797. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Use the editor to adjust the position, rotation and scale. Press V to change camera zoom, hold space to adjust camera position.");
  3798. }
  3799. else if(listitem == 2)
  3800. {
  3801. if(GetPVarInt(playerid, "ManageAccessID") < 0 || GetPVarInt(playerid, "ManageAccessID") > 6) return SendClientMessage(playerid, COLOR_RED, "ACCESS DENIED: Hacking attempt.");
  3802. new bonestring[256 +1];
  3803. for(new i; i < sizeof(AttachmentBones); i++)
  3804. {
  3805. format(bonestring, sizeof(bonestring), "%s\n%s", bonestring, AttachmentBones[i]);
  3806. }
  3807. ShowPlayerDialog(playerid, 24217, DIALOG_STYLE_LIST, "Select Bone", bonestring, "Select", "Back");
  3808. }
  3809. else if(listitem == 3) //color
  3810. {
  3811. if(GetPVarInt(playerid, "ManageAccessID") < 0 || GetPVarInt(playerid, "ManageAccessID") > 6) return SendClientMessage(playerid, COLOR_RED, "ACCESS DENIED: Hacking attempt."); //dont know what this is for..
  3812. ShowPlayerDialog(playerid, 24218, DIALOG_STYLE_LIST, "Select Color", "None\nRed\nLight Red\nDark Red\nGreen\nLight Green\nDark Green\nBlue\nLight Blue\nDark Blue\nPink\nLight Pink\nDark Pink\nPurple\nLight Purple\nDark Purple\nOrange\nLight Orange\nDark Orange\nTurquoise\nLight Turquoise\nDark Turquoise\nBrown\nLight Brown\nDark Brown\nGrey\nLight Grey\nDark Grey\nYellow\nLight Yellow\nDark Yellow\nBlack\nWhite", "Select", "Back");
  3813. }
  3814. else if(listitem == 4)
  3815. {
  3816. new msg[128];
  3817. for(new check = 0; check < sizeof(AccessNames); check++)
  3818. {
  3819. if(AccessNames[check][modid] == Accessories[playerid][manageid])
  3820. {
  3821. format(msg, sizeof(msg), "Are you sure you want to delete %s?", AccessNames[check][modname]);
  3822. break;
  3823. }
  3824. }
  3825. ShowPlayerDialog(playerid, DIALOG_GEAR_DELETE, DIALOG_STYLE_MSGBOX, "Gear Delete Confirmation", msg, "Delete", "Cancel");
  3826. }
  3827. }
  3828. else
  3829. {
  3830. ShowAccessDialog(playerid, 0);
  3831. }
  3832. return 1;
  3833. }
  3834. if(dialogid == DIALOG_GEAR_DELETE)
  3835. {
  3836. if(response)
  3837. {
  3838. new manageid = GetPVarInt(playerid, "ManageAccessID");
  3839. if(manageid < 0 || manageid > 6) return SendClientMessage(playerid, COLOR_RED, "ACCESS DENIED: Hacking attempt.");
  3840. RemovePlayerAttachedObject(playerid, manageid);
  3841. Accessories[playerid][manageid] = 0;
  3842. AccessoriesB[playerid][manageid] = 0;
  3843. AccessoriesX[playerid][manageid] = 0;
  3844. AccessoriesY[playerid][manageid] = 0;
  3845. AccessoriesZ[playerid][manageid] = 0;
  3846. AccessoriesrX[playerid][manageid] = 0;
  3847. AccessoriesrY[playerid][manageid] = 0;
  3848. AccessoriesrZ[playerid][manageid] = 0;
  3849. AccessoriessX[playerid][manageid] = 0;
  3850. AccessoriessY[playerid][manageid] = 0;
  3851. AccessoriessZ[playerid][manageid] = 0;
  3852. Accessoriesc1[playerid][manageid] = 0; //color1
  3853. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have deleted the gear.");
  3854. DeletePVar(playerid, "ManageAccessID");
  3855. }
  3856. }
  3857. if(dialogid == 24218)
  3858. {
  3859. if(response)
  3860. {
  3861. new manageid = GetPVarInt(playerid, "ManageAccessID");
  3862. if(GetPVarInt(playerid, "ManageAccessID") < 0 || GetPVarInt(playerid, "ManageAccessID") > 6) return SendClientMessage(playerid, COLOR_RED, "ACCESS DENIED: Hacking attempt.");
  3863. Accessoriesc1[playerid][manageid] = listitem;
  3864. if(IsPlayerAttachedObjectSlotUsed(playerid, manageid))
  3865. {
  3866. SetPlayerAttachedObject(playerid, manageid, Accessories[playerid][manageid], AccessoriesB[playerid][manageid], AccessoriesX[playerid][manageid], AccessoriesY[playerid][manageid], AccessoriesZ[playerid][manageid], AccessoriesrX[playerid][manageid], AccessoriesrY[playerid][manageid], AccessoriesrZ[playerid][manageid], AccessoriessX[playerid][manageid], AccessoriessY[playerid][manageid], AccessoriessZ[playerid][manageid], GetGearColour(Accessoriesc1[playerid][manageid]));
  3867. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have adjusted the color of the gear.");
  3868. }
  3869. }
  3870. else
  3871. {
  3872. }
  3873. DeletePVar(playerid, "ManageAccessID");
  3874. return 1;
  3875. }
  3876. if(dialogid == 24217) //edit accessory select bone
  3877. {
  3878. new manageid = GetPVarInt(playerid, "ManageAccessID");
  3879. if(response)
  3880. {
  3881. AccessoriesB[playerid][manageid] = listitem +1;
  3882. SetPlayerAttachedObject(playerid, manageid, Accessories[playerid][manageid], AccessoriesB[playerid][manageid], AccessoriesX[playerid][manageid], AccessoriesY[playerid][manageid], AccessoriesZ[playerid][manageid], AccessoriesrX[playerid][manageid], AccessoriesrY[playerid][manageid], AccessoriesrZ[playerid][manageid], AccessoriessX[playerid][manageid], AccessoriessY[playerid][manageid], AccessoriessZ[playerid][manageid], GetGearColour(Accessoriesc1[playerid][manageid]));
  3883. EditAttachedObject(playerid, manageid);
  3884. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Use the editor to adjust the position, rotation and scale. Press V to change camera zoom, hold space to adjust camera position.");
  3885. DeletePVar(playerid, "ManageAccessID"); //added
  3886. }
  3887. else
  3888. {
  3889. new titlestring[128], access;
  3890. for(new check = 0; check < sizeof(AccessNames); check++)
  3891. {
  3892. if(AccessNames[check][modid] == Accessories[playerid][manageid])
  3893. {
  3894. access = check;
  3895. }
  3896. }
  3897. format(titlestring, sizeof(titlestring), "%s", AccessNames[access][modname]);
  3898. if(!IsPlayerAttachedObjectSlotUsed(playerid, listitem))
  3899. {
  3900. ShowPlayerDialog(playerid, 24216, DIALOG_STYLE_LIST, titlestring, "Equip\nAdjust Position\nChange Bone\nChange Color\nDelete", "Select", "Back");
  3901. }
  3902. else
  3903. {
  3904. ShowPlayerDialog(playerid, 24216, DIALOG_STYLE_LIST, titlestring, "Unequip\nAdjust Position\nChange Bone\nChange Color\nDelete", "Select", "Back");
  3905. }
  3906. }
  3907. return 1;
  3908. }
  3909. if(dialogid == DIALOG_BUSSINESS_BUY) //247
  3910. {
  3911. if(response)
  3912. {
  3913. new biz = GetPlayerVirtualWorld(playerid);
  3914. if(listitem == 0) //cellphone
  3915. {
  3916. if(PlayerInfo[playerid][pCash] > 499)
  3917. {
  3918. GiveMoney(playerid, -500);
  3919. BizInfo[biz][bTill] += 500;
  3920. BizInfo[biz][bProducts] -= 1;
  3921. buyCellphone(playerid, 0); //0 = default type
  3922. format(str, sizeof(str), "~r~-$%d", 500);
  3923. GameTextForPlayer(playerid, str, 5000, 1);
  3924. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  3925. }
  3926. else
  3927. {
  3928. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3929. }
  3930. }
  3931. if(listitem == 1) //phonebook
  3932. {
  3933. if(PlayerInfo[playerid][pPhoneBook] == 1)
  3934. {
  3935. SendClientMessage(playerid, COLOR_GRAD2, "You already have a phonebook.");
  3936. return 1;
  3937. }
  3938. if(PlayerInfo[playerid][pCash] > 4999)
  3939. {
  3940. GiveMoney(playerid, -5000);
  3941. BizInfo[biz][bTill] += 5000;
  3942. BizInfo[biz][bProducts] -= 1;
  3943. PlayerInfo[playerid][pPhoneBook] = 1;
  3944. format(str, sizeof(str), "~r~-$%d", 5000);
  3945. GameTextForPlayer(playerid, str, 5000, 1);
  3946. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  3947. displayCenterHUDInfo(playerid, "~r~Phonebook~w~ purchased!~n~Type ~y~/number~w~ to look up other players numbers.", 8); //display for 8 seconds
  3948. }
  3949. else
  3950. {
  3951. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3952. }
  3953. }
  3954. if(listitem == 2) //dice
  3955. {
  3956. if(PlayerInfo[playerid][pDice] == 1)
  3957. {
  3958. SendClientMessage(playerid, COLOR_GRAD2, "You already have dice.");
  3959. return 1;
  3960. }
  3961. if(PlayerInfo[playerid][pCash] > 499)
  3962. {
  3963. GiveMoney(playerid, -500);
  3964. BizInfo[biz][bTill] += 500;
  3965. BizInfo[biz][bProducts] -= 1;
  3966. PlayerInfo[playerid][pDice] = 1;
  3967. format(str, sizeof(str), "~r~-$%d", 500);
  3968. GameTextForPlayer(playerid, str, 5000, 1);
  3969. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  3970. displayCenterHUDInfo(playerid, "~r~Dice~w~ purchased!~n~Type ~y~/dice~w~ to use.", 8); //display for 8 seconds
  3971. }
  3972. else
  3973. {
  3974. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3975. }
  3976. }
  3977. if(listitem == 3)
  3978. {
  3979. if(PlayerInfo[playerid][piPod] > 0)
  3980. {
  3981. SendClientMessage(playerid, COLOR_GRAD2, "You already have a iPod.");
  3982. return 1;
  3983. }
  3984. if(PlayerInfo[playerid][pCash] > 2499)
  3985. {
  3986. GiveMoney(playerid, -2500);
  3987. BizInfo[biz][bTill] += 2500;
  3988. BizInfo[biz][bProducts] -= 1;
  3989. PlayerInfo[playerid][piPod] = 1;
  3990. format(str, sizeof(str), "~r~-$%d", 2500);
  3991. GameTextForPlayer(playerid, str, 5000, 1);
  3992. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  3993. displayCenterHUDInfo(playerid, "~r~iPod~w~ purchased!~n~type ~y~/ipod~w~ to listen to music.", 8); //display for 8 seconds
  3994. }
  3995. else
  3996. {
  3997. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3998. }
  3999. }
  4000. if(listitem == 4)
  4001. {
  4002. if(PlayerInfo[playerid][pSpraycan] >= 10)
  4003. {
  4004. SendClientMessage(playerid, COLOR_GRAD2, "You already have 10 or more spray cans.");
  4005. return 1;
  4006. }
  4007. if(PlayerInfo[playerid][pCash] >= 200)
  4008. {
  4009. GiveMoney(playerid, -200);
  4010. BizInfo[biz][bTill] += 200;
  4011. BizInfo[biz][bProducts] -= 1;
  4012. PlayerInfo[playerid][pSpraycan] += 10;
  4013. format(str, sizeof(str), "~r~-$%d", 200);
  4014. GameTextForPlayer(playerid, str, 5000, 1);
  4015. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4016. displayCenterHUDInfo(playerid, "~r~10 Spraycans~w~ purchased!~n~type ~y~/colorcar~w~ or ~y~/paintcar~w~ to paint vehicles.", 8); //display for 8 seconds
  4017. }
  4018. else
  4019. {
  4020. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4021. }
  4022. }
  4023. if(listitem == 5)
  4024. {
  4025. if(PlayerInfo[playerid][pRope] >= 9)
  4026. {
  4027. SendClientMessage(playerid, COLOR_GRAD2, "You already have 9 or more ropes.");
  4028. return 1;
  4029. }
  4030. if(PlayerInfo[playerid][pCash] > 999)
  4031. {
  4032. GiveMoney(playerid, -1000);
  4033. BizInfo[biz][bTill] += 1000;
  4034. BizInfo[biz][bProducts] -= 1;
  4035. PlayerInfo[playerid][pRope] += 3;
  4036. format(str, sizeof(str), "~r~-$%d", 1000);
  4037. GameTextForPlayer(playerid, str, 5000, 1);
  4038. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4039. displayCenterHUDInfo(playerid, "~r~3 Ropes~w~ purchased!~n~type ~y~/tie~w~ while driving a car to tie your passengers.", 8); //display for 8 seconds
  4040. }
  4041. else
  4042. {
  4043. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4044. }
  4045. }
  4046. if(listitem == 6)
  4047. {
  4048. if(PlayerInfo[playerid][pCigars] >= 10)
  4049. {
  4050. SendClientMessage(playerid, COLOR_GRAD2, "You already have 10 or more cigars.");
  4051. return 1;
  4052. }
  4053. if(PlayerInfo[playerid][pCash] > 50)
  4054. {
  4055. GiveMoney(playerid, -50);
  4056. BizInfo[biz][bTill] += 50;
  4057. BizInfo[biz][bProducts] -= 1;
  4058. PlayerInfo[playerid][pCigars] += 10;
  4059. format(str, sizeof(str), "~r~-$%d", 50);
  4060. GameTextForPlayer(playerid, str, 5000, 1);
  4061. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4062. displayCenterHUDInfo(playerid, "~r~10 Cigars~w~ purchased!~n~type ~y~/usecigar~w~ to use, LMB to smoke, press F to drop.", 8); //display for 8 seconds
  4063. }
  4064. else
  4065. {
  4066. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4067. }
  4068. }
  4069. if(listitem == 7)
  4070. {
  4071. if(PlayerInfo[playerid][pSprunk] >= 3)
  4072. {
  4073. SendClientMessage(playerid, COLOR_GRAD2, "You already have 3 or more cans of sprunk.");
  4074. return 1;
  4075. }
  4076. if(PlayerInfo[playerid][pCash] > 9)
  4077. {
  4078. GiveMoney(playerid, -10);
  4079. BizInfo[biz][bTill] += 10;
  4080. BizInfo[biz][bProducts] -= 1;
  4081. PlayerInfo[playerid][pSprunk] += 1;
  4082. format(str, sizeof(str), "~r~-$%d", 10);
  4083. GameTextForPlayer(playerid, str, 5000, 1);
  4084. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4085. displayCenterHUDInfo(playerid, "~r~Sprunk~w~ purchased!~n~type ~y~/usesoda~w~ to use, LMB to drink, press F to drop.", 8); //display for 8 seconds
  4086. }
  4087. else
  4088. {
  4089. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4090. }
  4091. }
  4092. if(listitem == 8) //walkie talkie
  4093. {
  4094. if(PlayerInfo[playerid][pWT] == 1)
  4095. {
  4096. SendClientMessage(playerid, COLOR_GRAD2, "You already have a Walkie Talkie.");
  4097. return 1;
  4098. }
  4099. if(PlayerInfo[playerid][pCash] > 199)
  4100. {
  4101. GiveMoney(playerid, -200);
  4102. BizInfo[biz][bTill] += 200;
  4103. BizInfo[biz][bProducts] -= 1;
  4104. PlayerInfo[playerid][pWT] = 1;
  4105. format(str, sizeof(str), "~r~-$%d", 200);
  4106. GameTextForPlayer(playerid, str, 5000, 1);
  4107. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4108. displayCenterHUDInfo(playerid, "~r~Walkie Talkie~w~ purchased!~n~~y~/channel~w~ to set your channel number, then use ~y~/wt~w~ to type.", 8); //display for 8 seconds
  4109. }
  4110. else
  4111. {
  4112. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4113. }
  4114. }
  4115. if(listitem == 9) //screw drivers
  4116. {
  4117. if(PlayerInfo[playerid][pScrew] >= 5)
  4118. {
  4119. SendClientMessage(playerid, COLOR_GRAD2, "You already have 5 or more screw drivers.");
  4120. return 1;
  4121. }
  4122. if(PlayerInfo[playerid][pCash] > 49)
  4123. {
  4124. GiveMoney(playerid, -50);
  4125. BizInfo[biz][bTill] += 50;
  4126. BizInfo[biz][bProducts] -= 1;
  4127. PlayerInfo[playerid][pScrew] += 5;
  4128. format(str, sizeof(str), "~r~-$%d", 50);
  4129. GameTextForPlayer(playerid, str, 5000, 1);
  4130. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4131. displayCenterHUDInfo(playerid, "~r~5 Screw Drivers~w~ purchased!~n~type ~y~/breakin~w~ to pick the locks on someones ~g~houses~w~.", 8); //display for 8 seconds
  4132. }
  4133. else
  4134. {
  4135. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4136. }
  4137. }
  4138. if(listitem == 10) //blindfolds
  4139. {
  4140. if(PlayerInfo[playerid][pBlindfolds] >= 6)
  4141. {
  4142. SendClientMessage(playerid, COLOR_GRAD2, "You already have 6 or more blindfolds.");
  4143. return 1;
  4144. }
  4145. if(PlayerInfo[playerid][pCash] >= 2500)
  4146. {
  4147. GiveMoney(playerid, -2500);
  4148. BizInfo[biz][bTill] += 2500;
  4149. BizInfo[biz][bProducts] -= 1;
  4150. PlayerInfo[playerid][pBlindfolds] += 2;
  4151. format(str, sizeof(str), "~r~-$%d", 2500);
  4152. GameTextForPlayer(playerid, str, 5000, 1);
  4153. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4154. displayCenterHUDInfo(playerid, "~r~2 Blindfolds~w~ purchased!~n~type ~y~/blindfold~w~ to blindfold someone who is tied.", 8); //display for 8 seconds
  4155. }
  4156. else
  4157. {
  4158. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4159. }
  4160. }
  4161. if(listitem == 11) //cards
  4162. {
  4163. if(PlayerInfo[playerid][pCash] >= 2000)
  4164. {
  4165. GiveMoney(playerid, -2000);
  4166. BizInfo[biz][bTill] += 2000;
  4167. BizInfo[biz][bProducts] -= 1;
  4168. format(str, sizeof(str), "~r~-$%d", 2000);
  4169. GameTextForPlayer(playerid, str, 5000, 1);
  4170. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4171. PlayerInfo[playerid][pDeck] = 1;
  4172. displayCenterHUDInfo(playerid, "~r~Deck Of Cards~w~ purchased!~n~type ~y~/help~w~ view the gambling commands.", 8); //display for 8 seconds
  4173. }
  4174. else
  4175. {
  4176. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4177. }
  4178. }
  4179. if(listitem == 12) //address book
  4180. {
  4181. if(PlayerInfo[playerid][pCash] >= 1000)
  4182. {
  4183. GiveMoney(playerid, -1000);
  4184. BizInfo[biz][bTill] += 1000;
  4185. BizInfo[biz][bProducts] -= 1;
  4186. PlayerInfo[playerid][pAddressBook] = 1;
  4187. format(str, sizeof(str), "~r~-$%d", 1000);
  4188. GameTextForPlayer(playerid, str, 5000, 1);
  4189. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4190. displayCenterHUDInfo(playerid, "~r~2 Address Book~w~ purchased!~n~type ~y~/address~w~ to find out where someone lives.", 8); //display for 8 seconds
  4191. }
  4192. else
  4193. {
  4194. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4195. }
  4196. }
  4197. if(listitem == 13)
  4198. {
  4199. if(PlayerInfo[playerid][pCash] >= 50)
  4200. {
  4201. GiveMoney(playerid, -50);
  4202. BizInfo[biz][bTill] += 50;
  4203. BizInfo[biz][bProducts] -= 1;
  4204. PlayerInfo[playerid][pCalculator] = 1;
  4205. format(str, sizeof(str), "~r~-$%d", 50);
  4206. GameTextForPlayer(playerid, str, 5000, 1);
  4207. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4208. displayCenterHUDInfo(playerid, "~r~Calculator~w~ purchased!~n~type ~y~/calculate~w~ to use it.", 8); //display for 8 seconds
  4209. }
  4210. else
  4211. {
  4212. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4213. }
  4214. }
  4215. if(listitem == 14) // Stero
  4216. {
  4217. if(PlayerInfo[playerid][pStereo] > 0) return SendClientMessage(playerid, COLOR_GRAD2, "You already have a Boombox.");
  4218. if(PlayerInfo[playerid][pCash] >= 3500)
  4219. {
  4220. GiveMoney(playerid, -3500);
  4221. BizInfo[biz][bTill] += 3500;
  4222. BizInfo[biz][bProducts] -= 1;
  4223. PlayerInfo[playerid][pStereo] = 1;
  4224. format(str, sizeof(str), "~r~-$%d", 3500);
  4225. GameTextForPlayer(playerid, str, 5000, 1);
  4226. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4227. displayCenterHUDInfo(playerid, "~r~Boombox~w~ purchased!~n~type ~y~/placeboombox~w~ to place it on the ground.", 8); //display for 8 seconds
  4228. }
  4229. else
  4230. {
  4231. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4232. }
  4233. }
  4234. if(listitem == 15) //map
  4235. {
  4236. if(PlayerInfo[playerid][pMap] != 0) return SendClientMessage(playerid, COLOR_GREY, "You already have a map.");
  4237. if(PlayerInfo[playerid][pCash] >= 500)
  4238. {
  4239. GiveMoney(playerid, -500);
  4240. BizInfo[biz][bTill] += 500;
  4241. BizInfo[biz][bProducts] -= 1;
  4242. format(str, sizeof(str), "~r~-%d", 500);
  4243. PlayerInfo[playerid][pMap] = 1;
  4244. GameTextForPlayer(playerid, str, 5000, 1);
  4245. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4246. displayCenterHUDInfo(playerid, "~r~Map~w~ purchased!~n~type ~y~/map~w~ to use it", 8);
  4247. }
  4248. else
  4249. {
  4250. return SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for that.");
  4251. }
  4252. }
  4253. if(listitem == 16) //Box of Matches
  4254. {
  4255. if(PlayerInfo[playerid][pMatches] > 0) return SendClientMessage(playerid, COLOR_GRAD2, "You can only carry one box of matches.");
  4256. if(PlayerInfo[playerid][pCash] >= 500)
  4257. {
  4258. GiveMoney(playerid, -500);
  4259. BizInfo[biz][bTill] += 500;
  4260. BizInfo[biz][bProducts] -= 1;
  4261. PlayerInfo[playerid][pMatches] = 3;
  4262. format(str, sizeof(str), "~r~-$%d", 500);
  4263. GameTextForPlayer(playerid, str, 5000, 1);
  4264. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4265. displayCenterHUDInfo(playerid, "~r~Box of Matches~w~ purchased!~n~type ~y~/lightfire~w~ to light a fire.", 8); //display for 8 seconds
  4266. }
  4267. else
  4268. {
  4269. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4270. }
  4271. }
  4272. if(listitem == 17) //Jerry Can
  4273. {
  4274. if(PlayerInfo[playerid][pJerrycan] > 0) return SendClientMessage(playerid, COLOR_GRAD2, "You can only carry one jerry can.");
  4275. if(PlayerInfo[playerid][pCash] >= 1000)
  4276. {
  4277. GiveMoney(playerid, -1000);
  4278. BizInfo[biz][bTill] += 1000;
  4279. BizInfo[biz][bProducts] -= 1;
  4280. PlayerInfo[playerid][pJerrycan] = 1;
  4281. format(str, sizeof(str), "~r~-$%d", 1000);
  4282. GameTextForPlayer(playerid, str, 5000, 1);
  4283. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4284. displayCenterHUDInfo(playerid, "~r~Jerry Can~w~ purchased!~n~type ~y~/fill~w~ to fill the jerry can.", 8); //display for 8 seconds
  4285. }
  4286. else
  4287. {
  4288. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4289. }
  4290. }
  4291. if(listitem == 18) //case of beer
  4292. {
  4293. if(PlayerInfo[playerid][pCash] >= 1000)
  4294. {
  4295. GiveMoney(playerid, -1000);
  4296. BizInfo[biz][bTill] += 1000;
  4297. BizInfo[biz][bProducts] -= 1;
  4298. PlayerInfo[playerid][pBeer] = 5;
  4299. format(str, sizeof(str), "~r~-$%d", 1000);
  4300. GameTextForPlayer(playerid, str, 5000, 1);
  4301. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4302. displayCenterHUDInfo(playerid, "~r~Case of beert~w~ purchased!~n~type ~y~/usebeer~w~ to get a beer in your hand.", 8); //display for 8 seconds
  4303. }
  4304. else
  4305. {
  4306. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4307. }
  4308. }
  4309. if(listitem == 19) // drill
  4310. {
  4311. if(PlayerInfo[playerid][pLevel] < 4) return SendClientMessage(playerid, COLOR_GREY, "You need level 4+ to buy this.");
  4312. if(PlayerInfo[playerid][pDrill] == 1) return SendClientMessage(playerid, COLOR_GREY, "You already have a drill, /usedrill near the vault to use it.");
  4313. if(PlayerInfo[playerid][pCash] >= 250000)
  4314. {
  4315. GiveMoney(playerid, -250000);
  4316. BizInfo[biz][bTill] += 25000; // 10 percents
  4317. BizInfo[biz][bProducts] -= 1;
  4318. PlayerInfo[playerid][pDrill] = 1;
  4319. format(str, sizeof(str), "~r~-$%d", 250000);
  4320. GameTextForPlayer(playerid, str, 5000, 1);
  4321. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4322. displayCenterHUDInfo(playerid, "~r~Drillt~w~ purchased!~n~type ~y~/usedrill~w~ near the vault to start drilling.", 8); //display for 8 seconds
  4323. }
  4324. else
  4325. {
  4326. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4327. }
  4328. }
  4329. if(listitem == 20) // duffle bag
  4330. {
  4331. if(holdingDufflebag[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You already have a dufflebag, /dufflebag.");
  4332. // cooldown is here to ensure players arent buying and dropping duffle bags constantly, therefore filling the world with objects
  4333. // duffle bags disappear 10 minutes after they are dropped
  4334. if(gettime() < PlayerInfo[playerid][pDuffleBagTime]) return SendClientMessage(playerid, COLOR_GREY, "You must wait 20 minutes before purchasing another duffle bag.");
  4335. if(PlayerInfo[playerid][pCash] >= 5000)
  4336. {
  4337. new duffleid = CreateDuffleBag();
  4338. // in case duffleid is -1, it means that dufflebags reached their maximum (200 on the server)
  4339. // if we do get to such a case, i might adjust MAXIMUM_DUFFLEBAGS on dufflebag.inc
  4340. if(duffleid == -1) return SendClientMessage(playerid, COLOR_GREY, "An error occured ~ contact Desmond.");
  4341. AttachDufflebagToPlayer(playerid, duffleid);
  4342. GiveMoney(playerid, -5000);
  4343. BizInfo[biz][bTill] += 5000;
  4344. BizInfo[biz][bProducts] -= 1;
  4345. PlayerInfo[playerid][pDuffleBagTime] = gettime()+DUFFLEBAG_COOLDOWN;
  4346. format(str, sizeof(str), "~r~-$%d", 5000);
  4347. GameTextForPlayer(playerid, str, 5000, 1);
  4348. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4349. displayCenterHUDInfo(playerid, "~r~Dufflebagt~w~ purchased!~n~type ~y~/dufflebag.", 8); //display for 8 seconds
  4350. }
  4351. else
  4352. {
  4353. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4354. }
  4355. }
  4356. if(BizInfo[biz][bProducts] <= 0) SetNoProductsDate(biz);
  4357. }
  4358. return 1;
  4359. }
  4360. if(dialogid == DIALOG_BUSINESS_DRINK) //bar
  4361. {
  4362. if(response)
  4363. {
  4364. new biz = GetPlayerVirtualWorld(playerid);
  4365. if(BizInfo[biz][bProducts] <= 0 && GetPlayerVirtualWorld(playerid) != 0)
  4366. {
  4367. SendClientMessage(playerid, COLOR_GREY, "This business doesn't have any products left.");
  4368. return 1;
  4369. }
  4370. if(listitem == 0) //beer
  4371. {
  4372. if(PlayerInfo[playerid][pCash] > 19)
  4373. {
  4374. GiveMoney(playerid, -20);
  4375. BizInfo[biz][bTill] += 20;
  4376. BizInfo[biz][bProducts] -=1;
  4377. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  4378. format(str, sizeof(str), "~r~-$%d", 20);
  4379. GameTextForPlayer(playerid, str, 5000, 1);
  4380. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4381. displayCenterHUDInfo(playerid, "~r~Beer~w~ purchased!~n~press LMB to drink, press F to drop.", 8); //display for 8 seconds
  4382. }
  4383. else
  4384. {
  4385. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4386. }
  4387. }
  4388. if(listitem == 1) //vodka
  4389. {
  4390. if(PlayerInfo[playerid][pCash] > 29)
  4391. {
  4392. GiveMoney(playerid, -30);
  4393. BizInfo[biz][bTill] += 30;
  4394. BizInfo[biz][bProducts] -=1;
  4395. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  4396. format(str, sizeof(str), "~r~-$%d", 30);
  4397. GameTextForPlayer(playerid, str, 5000, 1);
  4398. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4399. displayCenterHUDInfo(playerid, "~r~Vodka~w~ purchased!~n~press LMB to drink, press F to drop.", 8); //display for 8 seconds
  4400. }
  4401. else
  4402. {
  4403. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4404. }
  4405. }
  4406. if(listitem == 2) //whiskey
  4407. {
  4408. if(PlayerInfo[playerid][pCash] > 34)
  4409. {
  4410. GiveMoney(playerid, -35);
  4411. BizInfo[biz][bTill] += 35;
  4412. BizInfo[biz][bProducts] -=1;
  4413. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  4414. format(str, sizeof(str), "~r~-$%d", 35);
  4415. GameTextForPlayer(playerid, str, 5000, 1);
  4416. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4417. displayCenterHUDInfo(playerid, "~r~Whiskey~w~ purchased!~n~press LMB to drink, press F to drop.", 8); //display for 8 seconds
  4418. }
  4419. else
  4420. {
  4421. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4422. }
  4423. }
  4424. if(listitem == 3) //wine
  4425. {
  4426. if(PlayerInfo[playerid][pCash] > 24)
  4427. {
  4428. GiveMoney(playerid, -25);
  4429. BizInfo[biz][bTill] += 25;
  4430. BizInfo[biz][bProducts] -=1;
  4431. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  4432. format(str, sizeof(str), "~r~-$%d", 25);
  4433. GameTextForPlayer(playerid, str, 5000, 1);
  4434. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4435. displayCenterHUDInfo(playerid, "~r~Wine~w~ purchased!~n~press LMB to drink, press F to drop.", 8); //display for 8 seconds
  4436. }
  4437. else
  4438. {
  4439. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4440. }
  4441. }
  4442. if(listitem == 4) //soda
  4443. {
  4444. if(PlayerInfo[playerid][pCash] > 14)
  4445. {
  4446. GiveMoney(playerid, -15);
  4447. BizInfo[biz][bTill] += 15;
  4448. BizInfo[biz][bProducts] -=1;
  4449. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  4450. format(str, sizeof(str), "~r~-$%d", 15);
  4451. GameTextForPlayer(playerid, str, 5000, 1);
  4452. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4453. displayCenterHUDInfo(playerid, "~r~Sprunk~w~ purchased!~n~press LMB to drink, press F to drop.", 8); //display for 8 seconds
  4454. }
  4455. else
  4456. {
  4457. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4458. }
  4459. }
  4460. if(BizInfo[biz][bProducts] <= 0)
  4461. {
  4462. SetNoProductsDate(biz);
  4463. }
  4464. }
  4465. return 1;
  4466. }
  4467. if(dialogid == DIALOG_TRAIN) //gym
  4468. {
  4469. if(response)
  4470. {
  4471. if(listitem == 0) //normal
  4472. {
  4473. PlayerInfo[playerid][pFightingStyle] = FIGHT_STYLE_NORMAL;
  4474. SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightingStyle]);
  4475. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4476. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have learned a new fighting style.");
  4477. }
  4478. if(listitem == 1) //boxing
  4479. {
  4480. if(PlayerInfo[playerid][pCash] > 49999)
  4481. {
  4482. PlayerInfo[playerid][pFightingStyle] = FIGHT_STYLE_BOXING;
  4483. SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightingStyle]);
  4484. GiveMoney(playerid, -50000);
  4485. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4486. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have learned a new fighting style.");
  4487. }
  4488. else
  4489. {
  4490. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4491. }
  4492. }
  4493. if(listitem == 2) //kung fu
  4494. {
  4495. if(PlayerInfo[playerid][pCash] > 49999)
  4496. {
  4497. PlayerInfo[playerid][pFightingStyle] = FIGHT_STYLE_KUNGFU;
  4498. SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightingStyle]);
  4499. GiveMoney(playerid, -50000);
  4500. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4501. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have learned a new fighting style.");
  4502. }
  4503. else
  4504. {
  4505. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4506. }
  4507. }
  4508. if(listitem == 3) //kneehead
  4509. {
  4510. if(PlayerInfo[playerid][pCash] > 49999)
  4511. {
  4512. PlayerInfo[playerid][pFightingStyle] = FIGHT_STYLE_KNEEHEAD;
  4513. SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightingStyle]);
  4514. GiveMoney(playerid, -50000);
  4515. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4516. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have learned a new fighting style.");
  4517. }
  4518. else
  4519. {
  4520. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4521. }
  4522. }
  4523. if(listitem == 4) //grabkick
  4524. {
  4525. if(PlayerInfo[playerid][pCash] > 49999)
  4526. {
  4527. PlayerInfo[playerid][pFightingStyle] = FIGHT_STYLE_GRABKICK;
  4528. SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightingStyle]);
  4529. GiveMoney(playerid, -50000);
  4530. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4531. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have learned a new fighting style.");
  4532. }
  4533. else
  4534. {
  4535. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4536. }
  4537. }
  4538. if(listitem == 5) //elbow
  4539. {
  4540. if(PlayerInfo[playerid][pCash] > 49999)
  4541. {
  4542. PlayerInfo[playerid][pFightingStyle] = FIGHT_STYLE_ELBOW;
  4543. SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightingStyle]);
  4544. GiveMoney(playerid, -50000);
  4545. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4546. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have learned a new fighting style.");
  4547. }
  4548. else
  4549. {
  4550. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4551. }
  4552. }
  4553. }
  4554. return 1;
  4555. }
  4556. if(dialogid == DIALOG_BUYMEAL) //Cafeteria // COMMENTED
  4557. {
  4558. if(response)
  4559. {
  4560. new Float:playerHP;
  4561. GetPlayerHealth(playerid, playerHP);
  4562. if(listitem == 0) //Bread
  4563. {
  4564. if(PlayerInfo[playerid][pCash] > 2)
  4565. {
  4566. GiveMoney(playerid, -2);
  4567. if(playerHP > 98)
  4568. {
  4569. SetPlayerHealth(playerid, 100.0);
  4570. }
  4571. else
  4572. {
  4573. SetPlayerHealth(playerid, playerHP + 2.0);
  4574. }
  4575. SendClientMessage(playerid, COLOR_GRAD4, "Bread purchased.");
  4576. }
  4577. else
  4578. {
  4579. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4580. return 1;
  4581. }
  4582. }
  4583. if(listitem == 1) //Apple
  4584. {
  4585. if(PlayerInfo[playerid][pCash] > 3)
  4586. {
  4587. GiveMoney(playerid, -3);
  4588. if(playerHP > 97)
  4589. {
  4590. SetPlayerHealth(playerid, 100.0);
  4591. }
  4592. else
  4593. {
  4594. SetPlayerHealth(playerid, playerHP + 3.0);
  4595. }
  4596. SendClientMessage(playerid, COLOR_GRAD4, "Apple purchased.");
  4597. }
  4598. else
  4599. {
  4600. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4601. return 1;
  4602. }
  4603. }
  4604. if(listitem == 2) //Cok O Pops
  4605. {
  4606. if(PlayerInfo[playerid][pCash] > 5)
  4607. {
  4608. GiveMoney(playerid, -5);
  4609. if(playerHP > 95)
  4610. {
  4611. SetPlayerHealth(playerid, 100.0);
  4612. }
  4613. else
  4614. {
  4615. SetPlayerHealth(playerid, playerHP + 5.0);
  4616. }
  4617. SendClientMessage(playerid, COLOR_GRAD4, "Cok O Pops purchased.");
  4618. }
  4619. else
  4620. {
  4621. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4622. return 1;
  4623. }
  4624. }
  4625. if(listitem == 3) //Mashed Potatoes
  4626. {
  4627. if(PlayerInfo[playerid][pCash] > 5)
  4628. {
  4629. GiveMoney(playerid, -5);
  4630. if(playerHP > 95)
  4631. {
  4632. SetPlayerHealth(playerid, 100.0);
  4633. }
  4634. else
  4635. {
  4636. SetPlayerHealth(playerid, playerHP + 5.0);
  4637. }
  4638. SendClientMessage(playerid, COLOR_GRAD4, "Mashed Potatoes purchased.");
  4639. }
  4640. else
  4641. {
  4642. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4643. return 1;
  4644. }
  4645. }
  4646. if(listitem == 4) //Carrot
  4647. {
  4648. if(PlayerInfo[playerid][pCash] > 1)
  4649. {
  4650. GiveMoney(playerid, -1);
  4651. if(playerHP > 99)
  4652. {
  4653. SetPlayerHealth(playerid, 100.0);
  4654. }
  4655. else
  4656. {
  4657. SetPlayerHealth(playerid, playerHP + 1.0);
  4658. }
  4659. SendClientMessage(playerid, COLOR_GRAD4, "Carrot purchased.");
  4660. }
  4661. else
  4662. {
  4663. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4664. return 1;
  4665. }
  4666. }
  4667. if(listitem == 5) //Green Beans
  4668. {
  4669. if(PlayerInfo[playerid][pCash] > 4)
  4670. {
  4671. GiveMoney(playerid, -4);
  4672. if(playerHP > 96)
  4673. {
  4674. SetPlayerHealth(playerid, 100.0);
  4675. }
  4676. else
  4677. {
  4678. SetPlayerHealth(playerid, playerHP + 4.0);
  4679. }
  4680. SendClientMessage(playerid, COLOR_GRAD4, "Green Beans purchased.");
  4681. }
  4682. else
  4683. {
  4684. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4685. return 1;
  4686. }
  4687. }
  4688. if(listitem == 6) //Pork Roll
  4689. {
  4690. if(PlayerInfo[playerid][pCash] > 5)
  4691. {
  4692. GiveMoney(playerid, -5);
  4693. if(playerHP > 95)
  4694. {
  4695. SetPlayerHealth(playerid, 100.0);
  4696. }
  4697. else
  4698. {
  4699. SetPlayerHealth(playerid, playerHP + 5.0);
  4700. }
  4701. SendClientMessage(playerid, COLOR_GRAD4, "Pork Roll purchased.");
  4702. }
  4703. else
  4704. {
  4705. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4706. return 1;
  4707. }
  4708. }
  4709. if(listitem == 7) //Sausage
  4710. {
  4711. if(PlayerInfo[playerid][pCash] > 7)
  4712. {
  4713. GiveMoney(playerid, -7);
  4714. if(playerHP > 93)
  4715. {
  4716. SetPlayerHealth(playerid, 100.0);
  4717. }
  4718. else
  4719. {
  4720. SetPlayerHealth(playerid, playerHP + 7.0);
  4721. }
  4722. SendClientMessage(playerid, COLOR_GRAD4, "Sausage purchased.");
  4723. }
  4724. else
  4725. {
  4726. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4727. return 1;
  4728. }
  4729. }
  4730. if(listitem == 8) //Chicken
  4731. {
  4732. if(PlayerInfo[playerid][pCash] > 20)
  4733. {
  4734. GiveMoney(playerid, -20);
  4735. if(playerHP > 80)
  4736. {
  4737. SetPlayerHealth(playerid, 100.0);
  4738. }
  4739. else
  4740. {
  4741. SetPlayerHealth(playerid, playerHP + 20.0);
  4742. }
  4743. SendClientMessage(playerid, COLOR_GRAD4, "Chicken purchased.");
  4744. }
  4745. else
  4746. {
  4747. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4748. return 1;
  4749. }
  4750. }
  4751. ApplyAnimationEx(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  4752. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4753. }
  4754. return 1;
  4755. }
  4756. if(dialogid == DIALOG_PG_MAIN) // DoC lockers
  4757. {
  4758. if(response)
  4759. {
  4760. if(listitem == 0) // Duty
  4761. {
  4762. if(PlayerInfo[playerid][pOnDuty] == 0)
  4763. {
  4764. format(str, sizeof(str), "* %s takes their bade and equipment from the locker.", PlayerICName(playerid));
  4765. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  4766. if(PlayerInfo[playerid][pMember] == 11) FakeFaction[playerid] = 5;
  4767. SetPlayerColor(playerid, COLOR_DOC_NAMETAG);
  4768. GivePlayerGun(playerid, WEAPON_NITESTICK);
  4769. GivePlayerGun(playerid, WEAPON_SPRAYCAN);
  4770. SetPlayerArmour(playerid, 100.0);
  4771. PlayerInfo[playerid][pOnDuty] = 1;
  4772. PlayerInfo[playerid][pClothes] = 0;
  4773. }
  4774. else if(PlayerInfo[playerid][pOnDuty] == 1)
  4775. {
  4776. format(str, sizeof(str), "* %s places their badge and equipment back into thes locker.", PlayerICName(playerid));
  4777. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  4778. SetPlayerColor(playerid, TCOLOR_WHITE);
  4779. ResetPlayerWeapons(playerid);
  4780. ClearGuns(playerid);
  4781. PlayerInfo[playerid][pGun1] = 0;
  4782. PlayerInfo[playerid][pGun3] = 0;
  4783. PlayerInfo[playerid][pGun5] = 0;
  4784. SetPlayerArmour(playerid, 0.0);
  4785. PlayerInfo[playerid][pClothes] = 0;
  4786. PlayerInfo[playerid][pOnDuty] = 0;
  4787. // Set off-duty skin
  4788. new undercoverskins[10];
  4789. undercoverskins[0] = 17; undercoverskins[5] = 303;
  4790. undercoverskins[1] = 185; undercoverskins[6] = 304;
  4791. undercoverskins[2] = 46; undercoverskins[7] = 305;
  4792. undercoverskins[3] = 73; undercoverskins[8] = 2;
  4793. undercoverskins[4] = 72; undercoverskins[9] = 7;
  4794. new randomnumber = random(sizeof(undercoverskins));
  4795. SetPlayerSkin(playerid, undercoverskins[randomnumber]);
  4796. PlayerInfo[playerid][pModel] = undercoverskins[randomnumber];
  4797. }
  4798. }
  4799. if(listitem == 1) // Equipment
  4800. {
  4801. ShowPlayerDialog(playerid, DIALOG_PG_WEAPONRY, DIALOG_STYLE_TABLIST_HEADERS, "Equipment", "Item\tPrice\nPortable MDC\tNo cost\nMace\t$20\nNight Stick\t$20\nDeagle\t$500\nShotgun\t$200\nMP5\t$400\nRifle\t$1,000\nM4\t$4,000\nFirst Aid Kit\tNo cost\nKevlar vest\t$1,000\nRubber Bullets\t$100", "Select", "Close");
  4802. }
  4803. if(listitem == 2) // Clearing
  4804. {
  4805. SendClientMessage(playerid, COLOR_YELLOW, "Please type the name of the player you want to clear.");
  4806. SAPDClearing[playerid] = 1;
  4807. }
  4808. if(listitem == 3) // Uniform
  4809. {
  4810. ShowPlayerDialog(playerid, DIALOG_PG_UNIFORM, DIALOG_STYLE_LIST, "Uniform", "Male uniform 1\nMale uniform 2\nMale uniform 3\nMale uniform 4\nMale uniform 5\nFemale uniform", "Select", "Close");
  4811. }
  4812. if(listitem == 4) // SWAT
  4813. {
  4814. if(PlayerInfo[playerid][pRank] < 2)
  4815. return SendClientMessage(playerid, COLOR_GREY, "This can only be used by R2+.");
  4816. SetPlayerSkin(playerid, 285);
  4817. SetPlayerArmour(playerid, 100);
  4818. }
  4819. }
  4820. return 1;
  4821. }
  4822. if(dialogid == DIALOG_PG_UNIFORM) { // DoC uniforms
  4823. if(!response)
  4824. return 1;
  4825. switch(listitem) {
  4826. case 0: SetPlayerSkin(playerid, 311);
  4827. case 1: SetPlayerSkin(playerid, 310);
  4828. case 2: SetPlayerSkin(playerid, 302);
  4829. case 3: SetPlayerSkin(playerid, 282);
  4830. case 4: SetPlayerSkin(playerid, 283);
  4831. case 5: SetPlayerSkin(playerid, 309);
  4832. }
  4833. PlayerInfo[playerid][pModel] = GetPlayerSkin(playerid);
  4834. cmd_ame(playerid, "puts on their uniform.");
  4835. }
  4836. if(dialogid == DIALOG_PG_WEAPONRY) // DoC equipment
  4837. {
  4838. if(response)
  4839. {
  4840. if(listitem == 0) // Portable MDC
  4841. {
  4842. PlayerInfo[playerid][pPortMDC] = 1;
  4843. SendClientMessage(playerid, COLOR_ORANGE, "You take a portable MDC unit from the locker.");
  4844. SendClientMessage(playerid, COLOR_ORANGE, "(( This will be lost upon death. ))");
  4845. }
  4846. if(listitem == 1) // Mace
  4847. {
  4848. if(PlayerInfo[playerid][pCash] < 20)
  4849. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4850. GiveMoney(playerid, -20);
  4851. GivePlayerGun(playerid, 41);
  4852. }
  4853. if(listitem == 2) // Night Stick
  4854. {
  4855. if(PlayerInfo[playerid][pCash] < 20)
  4856. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4857. GiveMoney(playerid, -20);
  4858. GivePlayerGun(playerid, 3);
  4859. }
  4860. if(listitem == 3) // Deagle
  4861. {
  4862. if(PlayerInfo[playerid][pCash] < 500)
  4863. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4864. GiveMoney(playerid, -500);
  4865. GivePlayerGun(playerid, 24);
  4866. }
  4867. if(listitem == 4) // Shotgun
  4868. {
  4869. if(PlayerInfo[playerid][pCash] < 200)
  4870. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4871. GiveMoney(playerid, -200);
  4872. GivePlayerGun(playerid, 25);
  4873. }
  4874. if(listitem == 5) // MP5
  4875. {
  4876. if(PlayerInfo[playerid][pCash] < 400)
  4877. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4878. GiveMoney(playerid, -400);
  4879. GivePlayerGun(playerid, 29);
  4880. }
  4881. if(listitem == 6) // Rifle
  4882. {
  4883. if(PlayerInfo[playerid][pCash] < 1000)
  4884. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4885. GiveMoney(playerid, -1000);
  4886. GivePlayerGun(playerid, 33);
  4887. }
  4888. if(listitem == 7) // M4
  4889. {
  4890. if(PlayerInfo[playerid][pCash] < 4000)
  4891. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4892. GiveMoney(playerid, -4000);
  4893. GivePlayerGun(playerid, 31);
  4894. }
  4895. if(listitem == 8) SetPlayerHealth(playerid, 100);
  4896. if(listitem == 9) { // Kevlar
  4897. if(PlayerInfo[playerid][pCash] < 1000)
  4898. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4899. GiveMoney(playerid, -1000);
  4900. SetPlayerArmour(playerid, 100);
  4901. }
  4902. if(listitem == 9) // Rubber bullets
  4903. {
  4904. if(PlayerInfo[playerid][pCash] < 100)
  4905. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4906. hasRubberBullets[playerid] = 1;
  4907. loadedRubberBullets[playerid] = false;
  4908. SendClientMessage(playerid, COLOR_YELLOW, "To use your rubber bullets, use \"/loadrubber\", this only works with a Country Rifle.");
  4909. GiveMoney(playerid, -100);
  4910. }
  4911. }
  4912. return 1;
  4913. }
  4914. if(dialogid == DIALOG_SANG_MAIN) // SANG lockers
  4915. {
  4916. if(response)
  4917. {
  4918. if(listitem == 0) // Duty
  4919. {
  4920. if(PlayerInfo[playerid][pOnDuty] == 0)
  4921. {
  4922. format(str, sizeof(str), "* %s takes their badge and equipment from the locker.", PlayerICName(playerid));
  4923. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  4924. if(PlayerInfo[playerid][pMember] == 11) FakeFaction[playerid] = FACTION_SANG;
  4925. SetPlayerColor(playerid, COLOR_SANG);
  4926. GivePlayerGun(playerid, WEAPON_NITESTICK);
  4927. GivePlayerGun(playerid, WEAPON_SPRAYCAN);
  4928. SetPlayerArmour(playerid, 100.0);
  4929. PlayerInfo[playerid][pOnDuty] = 1;
  4930. PlayerInfo[playerid][pClothes] = 0;
  4931. if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] != FACTION_SANG)
  4932. {
  4933. SetPlayerSkin(playerid, 287);
  4934. PlayerInfo[playerid][pModel] = 287;
  4935. PlayerInfo[playerid][pOnDuty] = 1;
  4936. PlayerInfo[playerid][pMember] = FACTION_SANG;
  4937. PlayerInfo[playerid][pRank] = 1;
  4938. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have been given a badge automatically (SANG Corporal)");
  4939. }
  4940. }
  4941. else if(PlayerInfo[playerid][pOnDuty] == 1)
  4942. {
  4943. format(str, sizeof(str), "* %s places their badge and equipment back into thes locker.", PlayerICName(playerid));
  4944. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  4945. SetPlayerColor(playerid, TCOLOR_WHITE);
  4946. ResetPlayerWeapons(playerid);
  4947. ClearGuns(playerid);
  4948. SetPlayerArmour(playerid, 0.0);
  4949. PlayerInfo[playerid][pClothes] = 0;
  4950. PlayerInfo[playerid][pOnDuty] = 0;
  4951. }
  4952. }
  4953. if(listitem == 1) // Equipment
  4954. {
  4955. ShowPlayerDialog(playerid, DIALOG_SANG_WEAPONRY, DIALOG_STYLE_TABLIST_HEADERS, "Equipment", "Item\tPrice\nPortable MDC\tNo cost\nMace\t$20\nNight Stick\t$20\nDeagle\t$500\nShotgun\t$200\nMP5\t$400\nRifle\t$1,000\nM4\t$6,000\nSpas-12\t$15,000\nFirst Aid Kit\tNo cost\nKevlar vest\t$1,000\nRubber Bullets\t$100\nSniper Rifle\t$12,000", "Select", "Close");
  4956. }
  4957. if(listitem == 2) // Clearing
  4958. {
  4959. SendClientMessage(playerid, COLOR_YELLOW, "Please type the name of the player you want to clear.");
  4960. SAPDClearing[playerid] = 1;
  4961. }
  4962. if(listitem == 3) // Uniform
  4963. {
  4964. // Shows faction skin selector
  4965. ShowSkinShop(playerid, false, true, false, false, true);
  4966. }
  4967. if(listitem == 4) // Shows civilian skin selector
  4968. {
  4969. ShowSkinShop(playerid, true, false, false, false, false);
  4970. return 1;
  4971. }
  4972. }
  4973. return 1;
  4974. }
  4975. /*if(dialogid == DIALOG_SANG_UNIFORM) { // SANG uniforms
  4976. if(!response)
  4977. return 1;
  4978. switch(listitem) {
  4979. case 0: SetPlayerSkin(playerid, 287);
  4980. case 1: SetPlayerSkin(playerid, 179);
  4981. case 2: SetPlayerSkin(playerid, 191);
  4982. case 3: SetPlayerSkin(playerid, 73);
  4983. case 4: SetPlayerSkin(playerid, 46);
  4984. }
  4985. PlayerInfo[playerid][pModel] = GetPlayerSkin(playerid);
  4986. cmd_ame(playerid, "puts on their uniform.");
  4987. }*/
  4988. if(dialogid == DIALOG_SANG_WEAPONRY) // DoC equipment
  4989. {
  4990. if(response)
  4991. {
  4992. if(listitem == 0) // Portable MDC
  4993. {
  4994. PlayerInfo[playerid][pPortMDC] = 1;
  4995. SendClientMessage(playerid, COLOR_ORANGE, "You take a portable MDC unit from the locker.");
  4996. SendClientMessage(playerid, COLOR_ORANGE, "(( This will be lost upon death. ))");
  4997. }
  4998. if(listitem == 1) // Mace
  4999. {
  5000. if(PlayerInfo[playerid][pCash] < 20)
  5001. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5002. GiveMoney(playerid, -20);
  5003. GivePlayerGun(playerid, 41);
  5004. }
  5005. if(listitem == 2) // Night Stick
  5006. {
  5007. if(PlayerInfo[playerid][pCash] < 20)
  5008. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5009. GiveMoney(playerid, -20);
  5010. GivePlayerGun(playerid, 3);
  5011. }
  5012. if(listitem == 3) // Deagle
  5013. {
  5014. if(PlayerInfo[playerid][pCash] < 500)
  5015. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5016. GiveMoney(playerid, -500);
  5017. GivePlayerGun(playerid, 24);
  5018. }
  5019. if(listitem == 4) // Shotgun
  5020. {
  5021. if(PlayerInfo[playerid][pCash] < 200)
  5022. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5023. GiveMoney(playerid, -200);
  5024. GivePlayerGun(playerid, 25);
  5025. }
  5026. if(listitem == 5) // MP5
  5027. {
  5028. if(PlayerInfo[playerid][pCash] < 400)
  5029. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5030. GiveMoney(playerid, -400);
  5031. GivePlayerGun(playerid, 29);
  5032. }
  5033. if(listitem == 6) // Rifle
  5034. {
  5035. if(PlayerInfo[playerid][pCash] < 1000)
  5036. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5037. GiveMoney(playerid, -1000);
  5038. GivePlayerGun(playerid, 33);
  5039. }
  5040. if(listitem == 7) // M4
  5041. {
  5042. if(PlayerInfo[playerid][pCash] < 4000)
  5043. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5044. GiveMoney(playerid, -4000);
  5045. GivePlayerGun(playerid, 31);
  5046. }
  5047. if(listitem == 8) // Spas-12
  5048. {
  5049. if(PlayerInfo[playerid][pCash] < 15000) // 15k
  5050. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5051. GiveMoney(playerid, -15000);
  5052. GivePlayerGun(playerid, 27);
  5053. }
  5054. if(listitem == 9) SetPlayerHealth(playerid, 100);
  5055. if(listitem == 10) { // Kevlar
  5056. if(PlayerInfo[playerid][pCash] < 1000)
  5057. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5058. GiveMoney(playerid, -1000);
  5059. SetPlayerArmour(playerid, 100);
  5060. }
  5061. if(listitem == 11) // Rubber bullets
  5062. {
  5063. if(PlayerInfo[playerid][pCash] < 100)
  5064. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5065. hasRubberBullets[playerid] = 1;
  5066. loadedRubberBullets[playerid] = false;
  5067. SendClientMessage(playerid, COLOR_YELLOW, "To use your rubber bullets, use \"/loadrubber\", this only works with a Country Rifle.");
  5068. GiveMoney(playerid, -100);
  5069. }
  5070. if(listitem == 12) // sniper rifle
  5071. {
  5072. if(PlayerInfo[playerid][pCash] < 12000) // 12k
  5073. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5074. GiveMoney(playerid, -12000);
  5075. GivePlayerGun(playerid, 34);
  5076. }
  5077. }
  5078. return 1;
  5079. }
  5080. if(dialogid == DIALOG_SAS_MAIN) //SAS
  5081. {
  5082. if(response)
  5083. {
  5084. if(listitem == 0)
  5085. {
  5086. if(PlayerInfo[playerid][pOnDuty] == 0) //if player is off duty, set them them on
  5087. {
  5088. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5089. format(str, sizeof(str), "* %s %s takes a Badge from their locker.", GetPlayerRank(playerid), sendername);
  5090. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5091. if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
  5092. {
  5093. SetPlayerColor(playerid, TCOLOR_SAS);
  5094. }
  5095. PlayerInfo[playerid][pOnDuty] = 1;
  5096. }
  5097. else if(PlayerInfo[playerid][pOnDuty] == 1) //if player is on duty, set them off
  5098. {
  5099. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5100. if(PlayerInfo[playerid][pMember] == 15)
  5101. {
  5102. format(str, sizeof(str), "* %s %s places a Badge in their locker.", GetPlayerRank(playerid), sendername);
  5103. }
  5104. else
  5105. {
  5106. format(str, sizeof(str), "* %s %s places a Badge in their locker.", GetPlayerRank(playerid), sendername);
  5107. }
  5108. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5109. SetPlayerColor(playerid, TCOLOR_WHITE);
  5110. PlayerInfo[playerid][pOnDuty] = 0;
  5111. TogglePlayerControllable(playerid, true);
  5112. }
  5113. return 1;
  5114. }
  5115. if(listitem == 1)
  5116. {
  5117. SendClientMessage(playerid, COLOR_GREY, "This feature is deprecated.");
  5118. return 1;
  5119. }
  5120. if(listitem == 2)
  5121. {
  5122. if(PlayerInfo[playerid][pCash] < 5000)
  5123. {
  5124. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5125. TogglePlayerControllable(playerid, true);
  5126. return 1;
  5127. }
  5128. else
  5129. {
  5130. GiveMoney(playerid, -5000);
  5131. SetPlayerHealth(playerid, 100);
  5132. SetPlayerArmour(playerid, 100);
  5133. SendClientMessage(playerid, COLOR_GREY, "Health and Kevlar replenished.");
  5134. TogglePlayerControllable(playerid, true);
  5135. }
  5136. }
  5137. if(listitem == 3)
  5138. {
  5139. if(PlayerInfo[playerid][pCash] < 5000)
  5140. {
  5141. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5142. TogglePlayerControllable(playerid, true);
  5143. return 1;
  5144. }
  5145. else
  5146. {
  5147. GiveMoney(playerid, -1000);
  5148. GivePlayerGun(playerid, 22);
  5149. SendClientMessage(playerid, COLOR_GREY, "You've purchased a Colt45.");
  5150. TogglePlayerControllable(playerid, true);
  5151. }
  5152. }
  5153. }
  5154. return 1;
  5155. }
  5156. if(dialogid == DIALOG_S9_MAIN) // Sector 9 locker
  5157. {
  5158. if(response)
  5159. {
  5160. if(listitem == 0) // Armory
  5161. return showS9Dialog(playerid);
  5162. if(listitem == 1) // Clothes
  5163. {
  5164. return SendClientMessage(playerid, COLOR_LIGHTRED, "Feature is disabled.");
  5165. /* DestroySelectionMenu(playerid);
  5166. SetPVarInt(playerid, "skinc_active", 1);
  5167. CreateSelectionMenu(playerid);
  5168. SelectTextDraw(playerid, 0xACCBF1FF); */
  5169. }
  5170. if(listitem == 2) // Restricted Clothes
  5171. {
  5172. new diastr[2000];
  5173. strcat(diastr, "Agent\t(286)\t\n");
  5174. strcat(diastr, "S.W.A.T Special Forces\t(285)\t\n");
  5175. strcat(diastr, "San Andreas Army\t(287)\t\n");
  5176. strcat(diastr, "Desert Sherrif (Chief)\t(288)\t\n");
  5177. strcat(diastr, "County Sheriff\t(283)\t\n");
  5178. strcat(diastr, "Las Venturas Police Officer\t(282)\t\n");
  5179. strcat(diastr, "San Fierro Police Officer\t(281)\t\n");
  5180. strcat(diastr, "Los Santos Police Officer\t(280)\t\n");
  5181. strcat(diastr, "Officer Tenpenny\t(265)\t\n");
  5182. strcat(diastr, "Officer Pulaski\t(266)\t\n");
  5183. strcat(diastr, "Officer Hernandez\t(267)\t\n");
  5184. strcat(diastr, "White MIB Agent\t(165)\t\n");
  5185. strcat(diastr, "Black MIB Agent\t(166)\t\n");
  5186. strcat(diastr, "Black (White Shirt) Medic\t(274)\t\n");
  5187. strcat(diastr, "White (Blue Shirt) Medic\t(275)\t\n");
  5188. strcat(diastr, "White (Green Shirt) Medic\t(276)\t\n");
  5189. strcat(diastr, "Firefighter (White)\t(277)\t\n");
  5190. strcat(diastr, "Firefighter (Black)\t(278)\t\n");
  5191. strcat(diastr, "San Fierro Figherfighter\t(279)\t\n");
  5192. strcat(diastr, "LSPD Motorbike Cop\t(284)\t");
  5193. ShowPlayerDialog(playerid, DIALOG_S9_RESTRICTED, DIALOG_STYLE_TABLIST, "S9 Skins", diastr, "Select", "Back");
  5194. }
  5195. if(listitem == 3) // Badges
  5196. {
  5197. new diastr[2000];
  5198. strcat(diastr, "Los Santos Police Department\t(1)\t{23c62e}(Enabled){ffffff}\n");
  5199. strcat(diastr, "Federal Bureau of Investigation\t(2)\t{23c62e}(Enabled){ffffff}\n");
  5200. strcat(diastr, "San Andreas Sheriffs Department\t(3)\t{ff4949}(Disabled){ffffff}\n");
  5201. strcat(diastr, "San Andreas Fire & Medical Department\t(4)\t{23c62e}(Enabled){ffffff}\n");
  5202. strcat(diastr, "Department of Corrections\t(5)\t{23c62e}(Enabled){ffffff}\n");
  5203. strcat(diastr, "Government\t(6)\t{23c62e}(Enabled){ffffff}\n");
  5204. strcat(diastr, "Judicial Department\t(7)\t{ff4949}(Disabled){ffffff}\n");
  5205. strcat(diastr, "San Andreas National Guard\t(14)\t{23c62e}(Enabled){ffffff}\n");
  5206. strcat(diastr, "Civilian\t(0)\t");
  5207. ShowPlayerDialog(playerid, DIALOG_S9_BADGES, DIALOG_STYLE_TABLIST, "Faction Badges", diastr, "Select", "Back");
  5208. }
  5209. }
  5210. return 1;
  5211. }
  5212. if(dialogid == DIALOG_S9_RESTRICTED)
  5213. {
  5214. if(!response)
  5215. {
  5216. new bool: Admin;
  5217. foreach( new i: Player )
  5218. {
  5219. if(PlayerInfo[i][pAdmin] > 0)
  5220. {
  5221. Admin = true;
  5222. break;
  5223. }
  5224. }
  5225. if(Admin) ShowPlayerDialog(playerid, DIALOG_S9_MAIN, DIALOG_STYLE_LIST, GetPlayerFactionName(playerid), "Namechange ({33AA33}Available{FFFFFF})\nArmory\nWardrobe\nWardrobe ({ff7b00}Restricted{FFFFFF})\nLaw Enforcement Badges", "Select", "Cancel");
  5226. else ShowPlayerDialog(playerid, DIALOG_S9_MAIN, DIALOG_STYLE_LIST, GetPlayerFactionName(playerid), "Namechange ({FF0000}Not available{FFFFFF})\nArmory\nWardrobe\nWardrobe ({ff7b00}Restricted{FFFFFF})\nLaw Enforcement Badges", "Select", "Cancel");
  5227. }
  5228. else
  5229. {
  5230. if(listitem == 0) return SetPlayerSkin(playerid, 286);//fbi
  5231. if(listitem == 1)
  5232. {
  5233. SetPlayerSkin(playerid, 285); //swat
  5234. SetPlayerArmour(playerid, 100); // swat skins are granted 100 armor
  5235. }
  5236. if(listitem == 2)
  5237. {
  5238. SetPlayerSkin(playerid, 287); //sang
  5239. SetPlayerArmour(playerid, 100);
  5240. }
  5241. if(listitem == 3) return SetPlayerSkin(playerid, 288);//Chief
  5242. if(listitem == 4) return SetPlayerSkin(playerid, 283);//County Sherrif
  5243. if(listitem == 5) return SetPlayerSkin(playerid, 282);//lvpd cop
  5244. if(listitem == 6) return SetPlayerSkin(playerid, 281);//sfpd cop
  5245. if(listitem == 7) return SetPlayerSkin(playerid, 280);//lspd cop
  5246. if(listitem == 8) return SetPlayerSkin(playerid, 265);//tenpenny
  5247. if(listitem == 9) return SetPlayerSkin(playerid, 266);//pulaski
  5248. if(listitem == 10) return SetPlayerSkin(playerid, 267);//hernandez
  5249. if(listitem == 11) return SetPlayerSkin(playerid, 165);//white mib
  5250. if(listitem == 12) return SetPlayerSkin(playerid, 166);//black mib
  5251. if(listitem == 13) return SetPlayerSkin(playerid, 274);//Black (White Shirt) Medic
  5252. if(listitem == 14) return SetPlayerSkin(playerid, 275);//White (Blue Shirt) Medic
  5253. if(listitem == 15) return SetPlayerSkin(playerid, 267);//White (Green Shirt) Medic
  5254. if(listitem == 16) return SetPlayerSkin(playerid, 277);//Firefighter (White)
  5255. if(listitem == 17) return SetPlayerSkin(playerid, 278);//Firefighter (Black)
  5256. if(listitem == 18) return SetPlayerSkin(playerid, 279);//San Fierro Figherfighter
  5257. if(listitem == 19) return SetPlayerSkin(playerid, 284);//LSPD Motorbike Cop
  5258. PlayerInfo[playerid][pClothes] = GetPlayerSkin(playerid);
  5259. }
  5260. return 1;
  5261. }
  5262. if(dialogid == DIALOG_S9_BADGES)
  5263. {
  5264. if(!response) return ShowS9Armory(playerid);
  5265. ChosenFaction[playerid] = listitem + 1;
  5266. if(listitem == 7) ChosenFaction[playerid] = 14; // SANG is ID 14, different from how this system works
  5267. // If civillian
  5268. if(listitem == 8) {
  5269. SetPlayerColor(playerid, TCOLOR_WHITE);
  5270. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Tip: You can also use '/removebadge'.");
  5271. ChosenFaction[playerid] = 0;
  5272. PlayerInfo[playerid][pOnDuty] = 0;
  5273. return 1;
  5274. }
  5275. // Disabled badges
  5276. if(listitem == 6 || listitem == 2) {
  5277. SendClientMessage(playerid, COLOR_GREY, "That badge is disabled.");
  5278. return ShowS9Armory(playerid);
  5279. }
  5280. // Let the player know which faction he has selected.
  5281. format(str, sizeof(str), "You have selected: %s", GetFactionName(ChosenFaction[playerid]));
  5282. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  5283. // Now to change the rank.
  5284. new diastr[300];
  5285. format(str, sizeof(str), "Change rank for %s.", GetFactionName(ChosenFaction[playerid]));
  5286. // Just adds the rank name to the list item. (e.g. Rank 0 - Cadet)
  5287. format(diastr, sizeof(diastr), "Rank 0 - %s\n", GetFactionRankName(ChosenFaction[playerid], 0));
  5288. format(diastr, sizeof(diastr), "%sRank 1 - %s\n", diastr, GetFactionRankName(ChosenFaction[playerid], 1));
  5289. format(diastr, sizeof(diastr), "%sRank 2 - %s\n", diastr, GetFactionRankName(ChosenFaction[playerid], 2));
  5290. if(PlayerInfo[playerid][pGroupRank] >= GROUP_S9_RANKS-1) {
  5291. format(diastr, sizeof(diastr), "%sRank 3 - %s\n", diastr, GetFactionRankName(ChosenFaction[playerid], 3));
  5292. format(diastr, sizeof(diastr), "%sRank 4 - %s", diastr, GetFactionRankName(ChosenFaction[playerid], 4));
  5293. } else {
  5294. format(diastr, sizeof(diastr), "%sRank 3 - %s", diastr, GetFactionRankName(ChosenFaction[playerid], 3));
  5295. }
  5296. ShowPlayerDialog(playerid, DIALOG_S9_RANKS, DIALOG_STYLE_LIST, str, diastr, "Confirm", "Cancel");
  5297. return 1;
  5298. }
  5299. if(dialogid == DIALOG_S9_RANKS) {
  5300. if(!response) return ShowS9Armory(playerid);
  5301. new skin;
  5302. ChosenRank[playerid] = listitem;
  5303. switch(ChosenFaction[playerid])
  5304. {
  5305. case FACTION_SAPD:
  5306. {
  5307. SetPlayerColor(playerid, TCOLOR_BLUE);
  5308. // To change the player's skin.
  5309. switch(ChosenRank[playerid])
  5310. {
  5311. case 0: skin = 71; // Cadet
  5312. case 1: skin = 280; // Officer
  5313. case 2: skin = 281; // Senior Officer
  5314. case 3: skin = 282; // Sargent
  5315. }
  5316. }
  5317. case FACTION_FBI:
  5318. {
  5319. SetPlayerColor(playerid, TCOLOR_NAVYBLUE);
  5320. skin = 286; // FBI skin
  5321. }
  5322. case FACTION_FMD:
  5323. {
  5324. SetPlayerColor(playerid, TCOLOR_PARAMEDIC);
  5325. switch(ChosenRank[playerid])
  5326. {
  5327. case 0: skin = 276; // Trainee
  5328. case 1..3: skin = 275; // R1-R3
  5329. }
  5330. }
  5331. case FACTION_ARMY:
  5332. {
  5333. SetPlayerColor(playerid, COLOR_DOC_NAMETAG);
  5334. skin = 287; // Army skin
  5335. }
  5336. case 6: // Senate
  5337. {
  5338. SetPlayerColor(playerid, TCOLOR_SENATE);
  5339. skin = 165; // White MIB
  5340. }
  5341. case FACTION_SANG:
  5342. {
  5343. SetPlayerColor(playerid, COLOR_SANG);
  5344. skin = 287; // Army skin
  5345. }
  5346. }
  5347. SetPlayerSkin(playerid, skin);
  5348. PlayerInfo[playerid][pModel] = skin;
  5349. PlayerInfo[playerid][pOnDuty] = 1;
  5350. PlayerInfo[playerid][pMember] = ChosenFaction[playerid];
  5351. PlayerInfo[playerid][pRank] = ChosenRank[playerid];
  5352. format(str, sizeof(str), "You are now a %s %s.", GetFactionName(ChosenFaction[playerid]), GetFactionRankName(ChosenFaction[playerid], ChosenRank[playerid]));
  5353. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  5354. format(customRank[playerid], 24, "%s", GetFactionRankName(ChosenFaction[playerid], ChosenRank[playerid]));
  5355. customRankName[playerid] = true;
  5356. ChosenFaction[playerid] = 0;
  5357. ChosenRank[playerid] = 0;
  5358. return 1;
  5359. }
  5360. if(dialogid == DIALOG_S9_ARMORY)
  5361. {
  5362. if(!response) return ShowS9Armory(playerid);
  5363. if(response)
  5364. {
  5365. if(!IsPlayerNearSector9HQ(playerid))
  5366. return SendClientMessage(playerid, COLOR_GREY, "You are not at your headquarters.");
  5367. new money = PlayerInfo[playerid][pCash];
  5368. switch(listitem)
  5369. {
  5370. case 0: // Desert Eagle
  5371. {
  5372. if(money >= 2500) {
  5373. GiveMoney(playerid, -2500);
  5374. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5375. GivePlayerGun(playerid, WEAPON_DEAGLE);
  5376. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a Desert Eagle for $2,500.");
  5377. } else {
  5378. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5379. }
  5380. }
  5381. case 1: // SD Pistol
  5382. {
  5383. if(money >= 5000) {
  5384. GiveMoney(playerid, -5000);
  5385. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5386. GivePlayerGun(playerid, WEAPON_SILENCED);
  5387. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased an SD Pistol for $5,000.");
  5388. } else {
  5389. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5390. }
  5391. }
  5392. case 2: // Break
  5393. {
  5394. showS9Dialog(playerid);
  5395. }
  5396. case 3: // M4
  5397. {
  5398. if(money >= 12500) {
  5399. GiveMoney(playerid, -12500);
  5400. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5401. GivePlayerGun(playerid, WEAPON_M4);
  5402. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased an M4 for $12,500.");
  5403. } else {
  5404. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5405. }
  5406. }
  5407. case 4: // AK47
  5408. {
  5409. if(money >= 7500) {
  5410. GiveMoney(playerid, -7500);
  5411. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5412. GivePlayerGun(playerid, WEAPON_AK47);
  5413. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased an AK47 for $7,500.");
  5414. } else {
  5415. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5416. }
  5417. }
  5418. case 5: // Break
  5419. {
  5420. showS9Dialog(playerid);
  5421. }
  5422. case 6: // Spas12
  5423. {
  5424. if(money >= 25000) {
  5425. GiveMoney(playerid, -25000);
  5426. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5427. GivePlayerGun(playerid, WEAPON_SHOTGSPA);
  5428. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a combat shotgun for $25,000.");
  5429. } else {
  5430. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5431. }
  5432. }
  5433. case 7: // Shotgun
  5434. {
  5435. if(money >= 2000) {
  5436. GiveMoney(playerid, -2000);
  5437. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5438. GivePlayerGun(playerid, WEAPON_SHOTGUN);
  5439. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a shotgun for $2,000.");
  5440. } else {
  5441. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5442. }
  5443. }
  5444. case 8: // Sawn off
  5445. {
  5446. if(money >= 7500) {
  5447. GiveMoney(playerid, -7500);
  5448. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5449. GivePlayerGun(playerid, WEAPON_SAWEDOFF);
  5450. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a sawn-off shotgun for $7,500.");
  5451. } else {
  5452. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5453. }
  5454. }
  5455. case 9: // Break
  5456. {
  5457. showS9Dialog(playerid);
  5458. }
  5459. case 10: // MP5
  5460. {
  5461. if(money >= 1000) {
  5462. GiveMoney(playerid, -1000);
  5463. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5464. GivePlayerGun(playerid, WEAPON_MP5);
  5465. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased an MP5 for $1,000.");
  5466. } else {
  5467. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5468. }
  5469. }
  5470. case 11: // TEC9
  5471. {
  5472. if(money >= 2500) {
  5473. GiveMoney(playerid, -2500);
  5474. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5475. GivePlayerGun(playerid, WEAPON_TEC9);
  5476. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a TEC9 for $2,500.");
  5477. } else {
  5478. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5479. }
  5480. }
  5481. case 12: // Uzi
  5482. {
  5483. if(money >= 2500) {
  5484. GiveMoney(playerid, -2500);
  5485. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5486. GivePlayerGun(playerid, WEAPON_UZI);
  5487. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased an Uzi for $2,500.");
  5488. } else {
  5489. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5490. }
  5491. }
  5492. case 13: // Break
  5493. {
  5494. showS9Dialog(playerid);
  5495. }
  5496. case 14: // Rifle
  5497. {
  5498. if(money >= 2500) {
  5499. GiveMoney(playerid, -2500);
  5500. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5501. GivePlayerGun(playerid, WEAPON_RIFLE);
  5502. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a country rifle for $2,500.");
  5503. } else {
  5504. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5505. }
  5506. }
  5507. case 15: // Sniper Rifle
  5508. {
  5509. if(money >= 15000) {
  5510. GiveMoney(playerid, -15000);
  5511. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5512. GivePlayerGun(playerid, WEAPON_SNIPER);
  5513. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a sniper rifle for $15,000.");
  5514. } else {
  5515. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5516. }
  5517. }
  5518. case 16: // Break
  5519. {
  5520. showS9Dialog(playerid);
  5521. }
  5522. case 17: // Flamethrower
  5523. {
  5524. if(money >= 20000) {
  5525. GiveMoney(playerid, -20000);
  5526. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5527. GivePlayerGun(playerid, WEAPON_FLAMETHROWER);
  5528. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a flamethrower for $20,000.");
  5529. } else {
  5530. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5531. }
  5532. }
  5533. case 18: // C4
  5534. {
  5535. if(money >= 10000) {
  5536. GiveMoney(playerid, -25000);
  5537. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5538. PlayerInfo[playerid][pBombs] += 1;
  5539. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a block of plastic explosive for $10,000.");
  5540. } else {
  5541. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5542. }
  5543. }
  5544. case 19: // Break
  5545. {
  5546. showS9Dialog(playerid);
  5547. }
  5548. case 20: // Chainsaw
  5549. {
  5550. if(money >= 5000) {
  5551. GiveMoney(playerid, -5000);
  5552. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5553. GivePlayerGun(playerid, WEAPON_CHAINSAW);
  5554. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a chainsaw for $5,000.");
  5555. } else {
  5556. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5557. }
  5558. }
  5559. case 21: // Knife
  5560. {
  5561. if(money >= 1000) {
  5562. GiveMoney(playerid, -1000);
  5563. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5564. GivePlayerGun(playerid, WEAPON_KNIFE);
  5565. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a knife for $1,000.");
  5566. } else {
  5567. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5568. }
  5569. }
  5570. case 22: // Break
  5571. {
  5572. showS9Dialog(playerid);
  5573. }
  5574. case 23: // Tear Gas
  5575. {
  5576. if(money >= 2500) {
  5577. GiveMoney(playerid, -2500);
  5578. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5579. GivePlayerGun(playerid, WEAPON_TEARGAS);
  5580. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased two canisters of tear gas for $2,500.");
  5581. } else {
  5582. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5583. }
  5584. }
  5585. case 24: // Grenades
  5586. {
  5587. SendClientMessage(playerid, COLOR_GREY, "Grenades have been disabled.");
  5588. /*
  5589. if(money >= 2500) {
  5590. GiveMoney(playerid, -2500);
  5591. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5592. GivePlayerGun(playerid, WEAPON_GRENADE);
  5593. } else {
  5594. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5595. }*/
  5596. }
  5597. case 25: // Molotov Cocktail
  5598. {
  5599. if(money >= 2500) {
  5600. GiveMoney(playerid, -2500);
  5601. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5602. GivePlayerGun(playerid, WEAPON_MOLTOV);
  5603. } else {
  5604. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5605. }
  5606. }
  5607. case 26: // Break
  5608. {
  5609. showS9Dialog(playerid);
  5610. }
  5611. case 27: // Health and Armour
  5612. {
  5613. if(money >= 1000) {
  5614. GiveMoney(playerid, -1000);
  5615. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5616. SetPlayerHealth(playerid, 100.0);
  5617. SetPlayerArmour(playerid, 100.0);
  5618. } else {
  5619. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5620. }
  5621. }
  5622. case 28: // Half Vest
  5623. {
  5624. if(money >= 500) {
  5625. GiveMoney(playerid, -1000);
  5626. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5627. SetPlayerArmour(playerid, 50.0);
  5628. } else {
  5629. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5630. }
  5631. }
  5632. case 29: // Break
  5633. {
  5634. showS9Dialog(playerid);
  5635. }
  5636. case 30: // Jammer
  5637. {
  5638. if(money >= 1000)
  5639. {
  5640. GiveMoney(playerid, -1000);
  5641. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5642. PlayerInfo[playerid][pJammer] += 1;
  5643. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased a signal jammer for $1,000.");
  5644. }
  5645. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  5646. }
  5647. case 31: // Lock pick
  5648. {
  5649. if(money >= 5000)
  5650. {
  5651. if(PlayerInfo[playerid][pHasLockPick] == 1)
  5652. return SendClientMessage(playerid, COLOR_GREY, "You already have a lock pick kit.");
  5653. GiveMoney(playerid, -5000);
  5654. PlayerInfo[playerid][pHasLockPick] = 1;
  5655. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased a lock pick kit for $5,000.");
  5656. }
  5657. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  5658. }
  5659. }
  5660. }
  5661. }
  5662. if(dialogid == DIALOG_LEO_MAIN) //SAPD
  5663. {
  5664. if(response)
  5665. {
  5666. switch(listitem)
  5667. {
  5668. case 0:
  5669. {
  5670. if(PlayerInfo[playerid][pOnDuty] == 0) //if player is off duty, set them them on
  5671. {
  5672. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5673. format(str, sizeof(str), "* %s %s retrieves his equipment from his locker and equips his badge & body camera.", GetPlayerRank(playerid), sendername);
  5674. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5675. if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 11)
  5676. {
  5677. if(PlayerInfo[playerid][pMember] == 11) FakeFaction[playerid] = 1;
  5678. SetPlayerColor(playerid, TCOLOR_NAVYBLUE);
  5679. }
  5680. else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 11)
  5681. {
  5682. if(PlayerInfo[playerid][pMember] == 11) FakeFaction[playerid] = 2;
  5683. SetPlayerColor(playerid, TCOLOR_NAVYBLUE);
  5684. }
  5685. else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 11)
  5686. {
  5687. if(PlayerInfo[playerid][pMember] == 11) FakeFaction[playerid] = 3;
  5688. SetPlayerColor(playerid, TCOLOR_BEIGE);
  5689. }
  5690. GivePlayerGun(playerid, 24);
  5691. GivePlayerGun(playerid, 41);
  5692. GivePlayerGun(playerid, 3);
  5693. SetPlayerArmour(playerid, 100.0);
  5694. PlayerInfo[playerid][pOnDuty] = 1;
  5695. TogglePlayerControllable(playerid, true);
  5696. if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] != FACTION_SAPD && IsPlayerNearSAPDHQ(playerid))
  5697. {
  5698. SetPlayerSkin(playerid, 280);
  5699. PlayerInfo[playerid][pModel] = 280;
  5700. customRankName[playerid] = false;
  5701. PlayerInfo[playerid][pOnDuty] = 1;
  5702. PlayerInfo[playerid][pMember] = FACTION_SAPD;
  5703. PlayerInfo[playerid][pRank] = 1;
  5704. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have been given a badge automatically (SAPD Officer)");
  5705. }
  5706. else if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] != FACTION_FBI && IsPlayerNearFBIHQ(playerid))
  5707. {
  5708. SetPlayerSkin(playerid, 286);
  5709. PlayerInfo[playerid][pModel] = 286;
  5710. customRankName[playerid] = false;
  5711. PlayerInfo[playerid][pOnDuty] = 1;
  5712. PlayerInfo[playerid][pMember] = FACTION_FBI;
  5713. PlayerInfo[playerid][pRank] = 1;
  5714. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have been given a badge automatically (FBI Staff)");
  5715. }
  5716. }
  5717. else if(PlayerInfo[playerid][pOnDuty] == 1) //if player is on duty, set them off
  5718. {
  5719. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5720. if(PlayerInfo[playerid][pMember] == 2)
  5721. {
  5722. format(str, sizeof(str), "* %s %s places his equipment inside his locker and removes his badge & body camera.", GetPlayerRank(playerid), sendername);
  5723. }
  5724. else
  5725. {
  5726. format(str, sizeof(str), "* %s %s places his equipment inside his locker and removes his badge & body camera.", GetPlayerRank(playerid), sendername);
  5727. }
  5728. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5729. SetPlayerColor(playerid, TCOLOR_WHITE);
  5730. PlayerInfo[playerid][pGun2] = 0;
  5731. PlayerInfo[playerid][pGun9] = 0;
  5732. PlayerInfo[playerid][pGun1] = 0;
  5733. ResetPlayerWeapons(playerid);
  5734. ClearGuns(playerid);
  5735. SetPlayerArmour(playerid, 0.0);
  5736. PlayerInfo[playerid][pOnDuty] = 0;
  5737. TogglePlayerControllable(playerid, true);
  5738. PlayerInfo[playerid][pHandtazer] = 0;
  5739. PlayerInfo[playerid][ptazerGun] = 0;
  5740. GivePlayerGun(playerid, 24);
  5741. if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
  5742. {
  5743. GivePlayerGun(playerid, 29);
  5744. }
  5745. }
  5746. return 1;
  5747. }
  5748. case 1:
  5749. {
  5750. // Shows civilian skin selector
  5751. ShowSkinShop(playerid, true, false, false, false, false);
  5752. return 1;
  5753. }
  5754. case 2:
  5755. {
  5756. // Shows faction skin selector
  5757. ShowSkinShop(playerid, false, true, false, false, true);
  5758. return 1;
  5759. }
  5760. case 3:
  5761. {
  5762. showSAPDDialog(playerid);
  5763. }
  5764. case 4:
  5765. {
  5766. if(PlayerInfo[playerid][pMember] == FACTION_SAPD && PlayerInfo[playerid][pRank] < 2)
  5767. {
  5768. SendClientMessage(playerid, COLOR_GREY, "Only R2s+ are able to use this.");
  5769. TogglePlayerControllable(playerid, true);
  5770. return 1;
  5771. }
  5772. ShowPlayerDialog(playerid, DIALOG_SAPD_SWAT, DIALOG_STYLE_LIST, "SWAT", "Weapons\nAccessories\nSWAT Uniform", "Select", "Back");
  5773. }
  5774. case 5:
  5775. {
  5776. SendClientMessage(playerid, COLOR_YELLOW, "Please type the name of the player you want to clear.");
  5777. SAPDClearing[playerid] = 1;
  5778. }
  5779. case 6:
  5780. {
  5781. SendClientMessage(playerid, COLOR_YELLOW, "Please type the name of the player you want to release.");
  5782. SAPDClearing[playerid] = 2;
  5783. }
  5784. case 7: // Namechange
  5785. {
  5786. new bool: Admin;
  5787. foreach( new i: Player )
  5788. {
  5789. if(PlayerInfo[i][pAdmin] > 1)
  5790. {
  5791. Admin = true;
  5792. break;
  5793. }
  5794. }
  5795. if(Admin) ShowPlayerDialog(playerid, DIALOG_FREE_NAMECHANGE, DIALOG_STYLE_INPUT, "Namechange", "Insert a new name no longer than 24 characters following the roleplay name format:\nRoleplay name format: Firstname_Lastname", "Request", "Back");
  5796. else ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Namechange", "There are no administrators online that can handle your namechange request!", "Okay", "");
  5797. }
  5798. }
  5799. }
  5800. return 1;
  5801. }
  5802. if(dialogid == DIALOG_FREE_NAMECHANGE)
  5803. {
  5804. if(response)
  5805. {
  5806. if(strlen(inputtext) < 1) return ShowPlayerDialog(playerid, DIALOG_FREE_NAMECHANGE, DIALOG_STYLE_INPUT, "Namechange", "Insert a new name no longer than 24 characters following the roleplay name format:\nRoleplay name format: Firstname_Lastname\n{FF0000}This name can not be empty.{FFFFFF}", "Request", "Back");
  5807. if(strlen(inputtext) > MAX_PLAYER_NAME) return ShowPlayerDialog(playerid, DIALOG_FREE_NAMECHANGE, DIALOG_STYLE_INPUT, "Namechange", "Insert a new name no longer than 24 characters following the roleplay name format:\nRoleplay name format: Firstname_Lastname\n{FF0000}This name exceeds more than twenty four characters.{FFFFFF}", "Request", "Back");
  5808. if(!IsValidName(inputtext) && PlayerInfo[playerid][pAdmin] == 0) return ShowPlayerDialog(playerid, DIALOG_FREE_NAMECHANGE, DIALOG_STYLE_INPUT, "Namechange", "Insert a new name no longer than 24 characters following the roleplay name format:\nRoleplay name format: Firstname_Lastname\n{FF0000}This name does not follow the roleplay name format: Firstname_Lastname{FFFFFF}", "Request", "Back");
  5809. new bool: Admin;
  5810. foreach( new i: Player )
  5811. {
  5812. if(PlayerInfo[i][pAdmin] >= 1)
  5813. {
  5814. Admin = true;
  5815. break;
  5816. }
  5817. }
  5818. if(Admin)
  5819. {
  5820. format(str, sizeof(str), "{FFFFFF}Are you sure you want to change your name to %s for free?", inputtext);
  5821. ShowPlayerDialog(playerid, DIALOG_FREE_NAMECHANGE1, DIALOG_STYLE_MSGBOX, "Namechange", str, "Confirm", "Back");
  5822. strmid(NameChangeRequest[playerid], inputtext, 0, strlen(inputtext), 255);
  5823. }
  5824. else
  5825. {
  5826. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Namechange", "There are no administrators online that can handle your namechange request anymore!", "Okay", "");
  5827. strmid(NameChangeRequest[playerid], "0", 0, 255);
  5828. }
  5829. }
  5830. else
  5831. {
  5832. if(IsPlayerInRangeOfPoint(playerid, 3, 226.7504, 122.7705, 999.0406))
  5833. {
  5834. new bool: Admin;
  5835. foreach( new i: Player )
  5836. {
  5837. if(PlayerInfo[i][pAdmin] > 0)
  5838. {
  5839. Admin = true;
  5840. break;
  5841. }
  5842. }
  5843. if(Admin) ShowPlayerDialog(playerid, DIALOG_LEO_MAIN, DIALOG_STYLE_LIST, GetPlayerFactionName(playerid), "Duty\nUndercover\nChange Uniform\nArmory\nSWAT\nClear Suspect\nRelease Suspect\nNamechange ({33AA33}Available{FFFFFF})", "Select", "Cancel");
  5844. else ShowPlayerDialog(playerid, DIALOG_LEO_MAIN, DIALOG_STYLE_LIST, GetPlayerFactionName(playerid), "Duty\nUndercover\nChange Uniform\nArmory\nSWAT\nClear Suspect\nRelease Suspect\nNamechange ({FF0000}Not available{FFFFFF})", "Select", "Cancel");
  5845. }
  5846. }
  5847. }
  5848. if(dialogid == DIALOG_FREE_NAMECHANGE1)
  5849. {
  5850. if(response)
  5851. {
  5852. new query[128];
  5853. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name` FROM `players` WHERE `Name` = '%e' LIMIT 1", NameChangeRequest[playerid]);
  5854. mysql_pquery(sqlGameConnection, query, "OnNamechange", "is", playerid, NameChangeRequest[playerid]);
  5855. format(str, sizeof(str), "Your free namechange request to %s has been dispatched to Administrators.", NameChangeRequest[playerid]);
  5856. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Namechange", str, "Okay", "");
  5857. }
  5858. else
  5859. {
  5860. new bool: Admin;
  5861. foreach( new i: Player )
  5862. {
  5863. if(PlayerInfo[i][pAdmin] > 1)
  5864. {
  5865. Admin = true;
  5866. break;
  5867. }
  5868. }
  5869. if(Admin) ShowPlayerDialog(playerid, DIALOG_FREE_NAMECHANGE, DIALOG_STYLE_INPUT, "Namechange", "Insert a new name no longer than 24 characters following the roleplay name format:\nRoleplay name format: Firstname_Lastname", "Request", "Back");
  5870. else ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Namechange", "There are no administrators online that can handle your namechange request!", "Okay", "");
  5871. }
  5872. }
  5873. if(dialogid == DIALOG_SAPD_WEAPONRY)
  5874. {
  5875. if(response)
  5876. {
  5877. if(listitem == 0) // Portable MDC
  5878. {
  5879. PlayerInfo[playerid][pPortMDC] = 1;
  5880. SendClientMessage(playerid, COLOR_ORANGE, "You take a portable MDC unit from the locker.");
  5881. SendClientMessage(playerid, COLOR_ORANGE, "(( This will be lost upon death. ))");
  5882. }
  5883. if(listitem == 1) // Mace
  5884. {
  5885. if(PlayerInfo[playerid][pCash] < 20)
  5886. {
  5887. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5888. TogglePlayerControllable(playerid, true);
  5889. return 1;
  5890. }
  5891. else
  5892. {
  5893. GiveMoney(playerid, -20);
  5894. GivePlayerGun(playerid, 41);
  5895. TogglePlayerControllable(playerid, true);
  5896. }
  5897. }
  5898. if(listitem == 2) // Night Stick
  5899. {
  5900. if(PlayerInfo[playerid][pCash] < 20)
  5901. {
  5902. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5903. TogglePlayerControllable(playerid, true);
  5904. return 1;
  5905. }
  5906. else
  5907. {
  5908. GiveMoney(playerid, -20);
  5909. GivePlayerGun(playerid, 3);
  5910. TogglePlayerControllable(playerid, true);
  5911. }
  5912. }
  5913. if(listitem == 3) // Deagle
  5914. {
  5915. if(PlayerInfo[playerid][pCash] < 500)
  5916. {
  5917. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5918. TogglePlayerControllable(playerid, true);
  5919. return 1;
  5920. }
  5921. else
  5922. {
  5923. GiveMoney(playerid, -500);
  5924. GivePlayerGun(playerid, 24);
  5925. TogglePlayerControllable(playerid, true);
  5926. }
  5927. }
  5928. if(listitem == 4) //Shotgun
  5929. {
  5930. if(PlayerInfo[playerid][pCash] < 200)
  5931. {
  5932. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5933. TogglePlayerControllable(playerid, true);
  5934. return 1;
  5935. }
  5936. else
  5937. {
  5938. GiveMoney(playerid, -200);
  5939. GivePlayerGun(playerid, 25);
  5940. TogglePlayerControllable(playerid, true);
  5941. }
  5942. }
  5943. if(listitem == 5) //MP5
  5944. {
  5945. if(PlayerInfo[playerid][pCash] < 400)
  5946. {
  5947. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5948. TogglePlayerControllable(playerid, true);
  5949. return 1;
  5950. }
  5951. else
  5952. {
  5953. GiveMoney(playerid, -400);
  5954. GivePlayerGun(playerid, 29);
  5955. TogglePlayerControllable(playerid, true);
  5956. }
  5957. }
  5958. if(listitem == 6) //Rifle
  5959. {
  5960. if(PlayerInfo[playerid][pCash] < 1000)
  5961. {
  5962. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5963. TogglePlayerControllable(playerid, true);
  5964. return 1;
  5965. }
  5966. else
  5967. {
  5968. GiveMoney(playerid, -1000);
  5969. GivePlayerGun(playerid, 33);
  5970. TogglePlayerControllable(playerid, true);
  5971. }
  5972. }
  5973. if(listitem == 7) //M4
  5974. {
  5975. if(PlayerInfo[playerid][pCash] < 6000)
  5976. {
  5977. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5978. TogglePlayerControllable(playerid, true);
  5979. return 1;
  5980. }
  5981. else
  5982. {
  5983. GiveMoney(playerid, -6000);
  5984. GivePlayerGun(playerid, 31);
  5985. TogglePlayerControllable(playerid, true);
  5986. }
  5987. }
  5988. if(listitem == 8) //first aid
  5989. {
  5990. if(PlayerInfo[playerid][pCash] < 200)
  5991. {
  5992. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5993. TogglePlayerControllable(playerid, true);
  5994. return 1;
  5995. }
  5996. else
  5997. {
  5998. format(str, sizeof(str), "* %s %s has used a first aid kit.", GetPlayerRank(playerid), PlayerICName(playerid));
  5999. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  6000. GiveMoney(playerid, -200);
  6001. SetPlayerHealth(playerid, 100.0);
  6002. TogglePlayerControllable(playerid, true);
  6003. }
  6004. }
  6005. if(listitem == 9) //kevlar
  6006. {
  6007. if(PlayerInfo[playerid][pCash] < 1000)
  6008. {
  6009. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6010. TogglePlayerControllable(playerid, true);
  6011. return 1;
  6012. }
  6013. else
  6014. {
  6015. SetPlayerArmour(playerid, 100.0);
  6016. GiveMoney(playerid, -1000);
  6017. }
  6018. }
  6019. if(listitem == 10) //rubber bullets
  6020. {
  6021. if(PlayerInfo[playerid][pRank] < 2 && IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Only rank 2+ can use this.");
  6022. if(PlayerInfo[playerid][pRank] < 1 && IsAFBI(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Only rank 1+ can use this.");
  6023. if(PlayerInfo[playerid][pCash] < 100)
  6024. {
  6025. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6026. TogglePlayerControllable(playerid, true);
  6027. return 1;
  6028. }
  6029. else
  6030. {
  6031. hasRubberBullets[playerid] = 1;
  6032. loadedRubberBullets[playerid] = false;
  6033. SendClientMessage(playerid, COLOR_YELLOW, "To use your rubber bullets, use \"/loadrubber\", this only works with a Country Rifle.");
  6034. GiveMoney(playerid, -100);
  6035. }
  6036. }
  6037. if(listitem == 11) //C2 explosives
  6038. {
  6039. if(PlayerInfo[playerid][pMember] == FACTION_SAPD && PlayerInfo[playerid][pRank] < 3) return SendClientMessage( playerid, COLOR_GREY, "You do not have access to this equipment ((R3+))." );
  6040. if( PlayerInfo[playerid][pCash] < 80000 ) {
  6041. SendClientMessage( playerid, COLOR_GREY, "You can't afford that." );
  6042. TogglePlayerControllable( playerid, true );
  6043. return 1;
  6044. }
  6045. else {
  6046. GiveMoney( playerid, -80000 );
  6047. PlayerInfo[playerid][pHasCBomb] = 1;
  6048. SendClientMessage( playerid, COLOR_YELLOW, "To deploy this explosive use \"/deployexplosive\", this will allow you to breach houses, doors and gates." );
  6049. }
  6050. }
  6051. if(listitem == 12) // Signal Jammer
  6052. {
  6053. if(PlayerInfo[playerid][pMember] != FACTION_FBI)
  6054. return AdmErrorMsg;
  6055. TogglePlayerControllable(playerid, true);
  6056. if(PlayerInfo[playerid][pCash] < 1000) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6057. GiveMoney(playerid, -1000);
  6058. PlayerInfo[playerid][pJammer] = 1;
  6059. SendClientMessage(playerid, COLOR_GREY, "Signal jammer purchased! (/placejammer)");
  6060. }
  6061. showSAPDDialog(playerid);
  6062. }
  6063. else
  6064. {
  6065. ShowPlayerDialog(playerid, DIALOG_LEO_MAIN, DIALOG_STYLE_LIST, GetPlayerFactionName(playerid), "Duty\nUndercover\nChange Uniform\nArmory\nSWAT\nClear Suspect\nRelease Suspect", "Select", "Cancel");
  6066. }
  6067. return 1;
  6068. }
  6069. if(dialogid == DIALOG_SAPD_SWAT) // SWAT MENU
  6070. {
  6071. if(response)
  6072. {
  6073. if(listitem == 0) //WEAPONS
  6074. {
  6075. ShowPlayerDialog(playerid, DIALOG_SAPD_SWAT_WEAPONS, DIALOG_STYLE_TABLIST, "SWAT Weapons",
  6076. "Desert Eagle\t$500\n\
  6077. Shotgun\t$200\n\
  6078. MP5\t$400\n\
  6079. Rifle\t$1,000\n\
  6080. M4\t$6,000\n\
  6081. Sniper Rifle\t$12,000\n\
  6082. Spas-12\t$15,000\n\
  6083. Infrared Goggles\t$1,500",
  6084. "Select", "Back");
  6085. }
  6086. if(listitem == 1) //ACCESSORIES
  6087. {
  6088. ShowPlayerDialog(playerid, DIALOG_SAPD_SWAT_ACCESSORIES, DIALOG_STYLE_TABLIST, "SWAT Accessories",
  6089. "Tear Gas\t$800\n\
  6090. Grenades\t$800\n\
  6091. Kevlar\t$2,000",
  6092. "Select", "Back");
  6093. }
  6094. if(listitem == 2)
  6095. {
  6096. PlayerInfo[playerid][pClothes] = 0;
  6097. SetPlayerSkin(playerid, 285);
  6098. PlayerInfo[playerid][pModel] = 285;
  6099. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You equipped your SWAT Uniform *");
  6100. }
  6101. }
  6102. else
  6103. {
  6104. ShowPlayerDialog(playerid, DIALOG_LEO_MAIN, DIALOG_STYLE_LIST, GetPlayerFactionName(playerid), "Duty\nUndercover\nChange Uniform\nArmory\nSWAT\nClear Suspect\nRelease Suspect", "Select", "Cancel");
  6105. }
  6106. return 1;
  6107. }
  6108. if(dialogid == DIALOG_SAPD_SWAT_WEAPONS) //WEAPONS
  6109. {
  6110. if(response)
  6111. {
  6112. new playercash = PlayerInfo[playerid][pCash];
  6113. if(listitem == 0)
  6114. {
  6115. if(playercash < 500)
  6116. {
  6117. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6118. TogglePlayerControllable(playerid, true);
  6119. return 1;
  6120. }
  6121. GiveMoney(playerid, -500);
  6122. GivePlayerGun(playerid, 24);
  6123. TogglePlayerControllable(playerid, true);
  6124. }
  6125. if(listitem == 1)
  6126. {
  6127. if(playercash < 200)
  6128. {
  6129. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6130. TogglePlayerControllable(playerid, true);
  6131. return 1;
  6132. }
  6133. GiveMoney(playerid, -200);
  6134. GivePlayerGun(playerid, 25);
  6135. TogglePlayerControllable(playerid, true);
  6136. }
  6137. if(listitem == 2)
  6138. {
  6139. if(playercash < 400)
  6140. {
  6141. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6142. TogglePlayerControllable(playerid, true);
  6143. return 1;
  6144. }
  6145. GiveMoney(playerid, -400);
  6146. GivePlayerGun(playerid, 29);
  6147. TogglePlayerControllable(playerid, true);
  6148. }
  6149. if(listitem == 3)
  6150. {
  6151. if(playercash < 1000)
  6152. {
  6153. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6154. TogglePlayerControllable(playerid, true);
  6155. return 1;
  6156. }
  6157. GiveMoney(playerid, -1000);
  6158. GivePlayerGun(playerid, 33);
  6159. TogglePlayerControllable(playerid, true);
  6160. }
  6161. if(listitem == 4)
  6162. {
  6163. if(playercash < 6000)
  6164. {
  6165. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6166. TogglePlayerControllable(playerid, true);
  6167. return 1;
  6168. }
  6169. GiveMoney(playerid, -6000);
  6170. GivePlayerGun(playerid, 31);
  6171. TogglePlayerControllable(playerid, true);
  6172. }
  6173. if(listitem == 5)
  6174. {
  6175. if(playercash < 12000)
  6176. {
  6177. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6178. TogglePlayerControllable(playerid, true);
  6179. return 1;
  6180. }
  6181. GiveMoney(playerid, -12000);
  6182. GivePlayerGun(playerid, 34);
  6183. TogglePlayerControllable(playerid, true);
  6184. }
  6185. if(listitem == 6)
  6186. {
  6187. if(playercash < 15000)
  6188. {
  6189. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6190. TogglePlayerControllable(playerid, true);
  6191. return 1;
  6192. }
  6193. GiveMoney(playerid, -15000);
  6194. GivePlayerGun(playerid, 27);
  6195. TogglePlayerControllable(playerid, true);
  6196. }
  6197. if(listitem == 7) //Thermal goggles
  6198. {
  6199. if(PlayerInfo[playerid][pCash] < 1500)
  6200. {
  6201. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6202. TogglePlayerControllable(playerid, true);
  6203. return 1;
  6204. }
  6205. else
  6206. {
  6207. GiveMoney(playerid, -1500);
  6208. GivePlayerGun(playerid, 45);
  6209. }
  6210. }
  6211. ShowPlayerDialog(playerid, DIALOG_SAPD_SWAT_WEAPONS, DIALOG_STYLE_TABLIST, "SWAT Weapons",
  6212. "Desert Eagle\t$500\n\
  6213. Shotgun\t$200\n\
  6214. MP5\t$400\n\
  6215. Rifle\t$1,000\n\
  6216. M4\t$6,000\n\
  6217. Sniper Rifle\t$12,000\n\
  6218. Spas-12\t$15,000\n\
  6219. Infrared Goggles\t$1,500",
  6220. "Select", "Back");
  6221. }
  6222. else
  6223. {
  6224. ShowPlayerDialog(playerid, DIALOG_SAPD_SWAT, DIALOG_STYLE_LIST, "SWAT", "Weapons\nAccessories\nSWAT Uniform", "Select", "Back");
  6225. }
  6226. return 1;
  6227. }
  6228. if(dialogid == DIALOG_SAPD_SWAT_ACCESSORIES) //ACCESSORIES
  6229. {
  6230. if(response)
  6231. {
  6232. new playercash = PlayerInfo[playerid][pCash];
  6233. if(listitem == 0) // tear gas
  6234. {
  6235. if(playercash < 800)
  6236. {
  6237. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6238. TogglePlayerControllable(playerid, true);
  6239. return 1;
  6240. }
  6241. GiveMoney(playerid, -800);
  6242. GivePlayerGun(playerid, 17);
  6243. TogglePlayerControllable(playerid, true);
  6244. }
  6245. if(listitem == 1) // grenades
  6246. {
  6247. return SendClientMessage(playerid, COLOR_GREY, "Grenades have been disabled.");
  6248. /*
  6249. if(playercash < 1000)
  6250. {
  6251. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6252. TogglePlayerControllable(playerid, true);
  6253. return 1;
  6254. }
  6255. GiveMoney(playerid, -1000);
  6256. GivePlayerGun(playerid, 16);
  6257. if(GetPlayerAmmo(playerid) >= 2) //ammo fix
  6258. {
  6259. GivePlayerGun(playerid, 16);
  6260. }
  6261. TogglePlayerControllable(playerid, true);*/
  6262. }
  6263. if(listitem == 2) // armor
  6264. {
  6265. if(playercash < 2000)
  6266. {
  6267. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6268. TogglePlayerControllable(playerid, true);
  6269. return 1;
  6270. }
  6271. GiveMoney(playerid, -2000);
  6272. SetPlayerArmour(playerid, 100.0);
  6273. TogglePlayerControllable(playerid, true);
  6274. }
  6275. ShowPlayerDialog(playerid, DIALOG_SAPD_SWAT_ACCESSORIES, DIALOG_STYLE_TABLIST, "SWAT Accessories",
  6276. "Tear Gas\t$800\n\
  6277. Grenades\t$800\n\
  6278. Kevlar\t$2,000",
  6279. "Select", "Back");
  6280. }
  6281. else
  6282. {
  6283. ShowPlayerDialog(playerid, DIALOG_SAPD_SWAT, DIALOG_STYLE_LIST, "SWAT", "Weapons\nAccessories\nSWAT Uniform", "Select", "Back");
  6284. }
  6285. return 1;
  6286. }
  6287. if(dialogid == DIALOG_ADMIN_COLORCHANGER)
  6288. {
  6289. if(response)
  6290. {
  6291. if(listitem == 0) // DEFINE MACROS COLORS, BUG
  6292. {
  6293. SetPlayerColor(playerid, 0x80008000);
  6294. }
  6295. if(listitem == 1)
  6296. {
  6297. SetPlayerColor(playerid, 0xFFFF0000);
  6298. }
  6299. if(listitem == 2)
  6300. {
  6301. SetPlayerColor(playerid, 0xff000000);
  6302. }
  6303. if(listitem == 3)
  6304. {
  6305. SetPlayerColor(playerid, 0x33CCFF00);
  6306. }
  6307. if(listitem == 4)
  6308. {
  6309. SetPlayerColor(playerid, 0xFF990000);
  6310. }
  6311. if(listitem == 5)
  6312. {
  6313. SetPlayerColor(playerid, 0x33AA3300);
  6314. }
  6315. if(listitem == 6)
  6316. {
  6317. SetPlayerColor(playerid, 0x4B00B000);
  6318. }
  6319. if(listitem == 7)
  6320. {
  6321. SetPlayerColor(playerid, 0xFF66FF00);
  6322. }
  6323. if(listitem == 8)
  6324. {
  6325. SetPlayerColor(playerid, 0x00000000);
  6326. }
  6327. }
  6328. return 1;
  6329. }
  6330. if(dialogid == DIALOG_APPEARANCE_GENDER)
  6331. {
  6332. if(response) // pressed male
  6333. {
  6334. if(PlayerInfo[playerid][pCash] < 25000) return SendClientMessage(playerid, COLOR_GRAD1, "You need $25,000 to change your gender!");
  6335. if(listitem == 0)
  6336. {
  6337. SendClientMessage(playerid, COLOR_YELLOW, "You have successfully changed your sex to: Male.");
  6338. PlayerInfo[playerid][pCash] -= 25000;
  6339. PlayerInfo[playerid][pSex] = 1;
  6340. ShowAppearanceMain(playerid);
  6341. return OnPlayerSave(playerid);
  6342. }
  6343. if(listitem == 1) // pressed female
  6344. {
  6345. SendClientMessage(playerid, COLOR_YELLOW, "You have successfully changed your sex to: Female.");
  6346. PlayerInfo[playerid][pCash] -= 25000;
  6347. PlayerInfo[playerid][pSex] = 2;
  6348. ShowAppearanceMain(playerid);
  6349. return OnPlayerSave(playerid);
  6350. }
  6351. return 1;
  6352. }
  6353. return ShowAppearanceMain(playerid);
  6354. }
  6355. if(dialogid == DIALOG_APPEARANCE_DISPLAY) return 1;
  6356. if(dialogid == DIALOG_APPEARANCE_DISPLAYMDC)
  6357. {
  6358. if(response)
  6359. {
  6360. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+3, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - Appearance", "Profile\nView History\n{FF6347}Add Warrant{FFFFFF}\nTrack Cellphone\nView Active Tickets\nRemove Ticket\nView Old Tickets\nAppearance", "Select", "Close");
  6361. }
  6362. return 1;
  6363. }
  6364. if(dialogid == DIALOG_APPEARANCE_AGE)
  6365. {
  6366. if(response)
  6367. {
  6368. if(PlayerInfo[playerid][pCash] < 25000) return SendClientMessage(playerid, COLOR_GRAD1, "You need $25,000 to change your age!");
  6369. new amount = strval(inputtext);
  6370. if(amount < 16 || amount > 75) return SendClientMessage(playerid, COLOR_GREY, "Your age can't be above 75, or below 16.");
  6371. format(str, sizeof(str), "You have successfully changed your age to: %d years old.", amount);
  6372. SendClientMessage(playerid, COLOR_YELLOW, str);
  6373. PlayerInfo[playerid][pCash] -= 25000;
  6374. PlayerInfo[playerid][pAge] = amount;
  6375. ShowAppearanceMain(playerid);
  6376. return OnPlayerSave(playerid);
  6377. }
  6378. return ShowAppearanceMain(playerid);
  6379. }
  6380. if(dialogid == DIALOG_APPEARANCE_ETHNICITY)
  6381. {
  6382. if(response)
  6383. {
  6384. PlayerInfo[playerid][pEthnicity] = listitem;
  6385. format(str, sizeof(str), "You have successfully changed your ethnicity to: %s.", GetPlayerEthnicity(playerid));
  6386. SendClientMessage(playerid, COLOR_YELLOW, str);
  6387. ShowAppearanceMain(playerid);
  6388. return OnPlayerSave(playerid);
  6389. }
  6390. return ShowAppearanceMain(playerid);
  6391. }
  6392. if(dialogid == DIALOG_APPEARANCE_EYE)
  6393. {
  6394. if(response)
  6395. {
  6396. PlayerInfo[playerid][pEyeColour] = listitem;
  6397. format(str, sizeof(str), "You have successfully changed your eye colour to: %s.", GetPlayerEyeColour(playerid));
  6398. SendClientMessage(playerid, COLOR_YELLOW, str);
  6399. ShowAppearanceMain(playerid);
  6400. return OnPlayerSave(playerid);
  6401. }
  6402. return ShowAppearanceMain(playerid);
  6403. }
  6404. if(dialogid == DIALOG_APPEARANCE_BUILD)
  6405. {
  6406. if(response)
  6407. {
  6408. PlayerInfo[playerid][pBuild] = listitem;
  6409. format(str, sizeof(str), "You have successfully changed your body build type to: %s.", GetPlayerBuild(playerid));
  6410. SendClientMessage(playerid, COLOR_YELLOW, str);
  6411. ShowAppearanceMain(playerid);
  6412. return OnPlayerSave(playerid);
  6413. }
  6414. return ShowAppearanceMain(playerid);
  6415. }
  6416. if(dialogid == DIALOG_APPEARANCE_HEIGHT)
  6417. {
  6418. if(response)
  6419. {
  6420. new amount = strval(inputtext);
  6421. if(amount < 140 || amount > 210) return SendClientMessage(playerid, COLOR_GRAD2, "Character height must be between 140cm and 210cm!");
  6422. PlayerInfo[playerid][pHeight] = amount;
  6423. format(str, sizeof(str), "You have successfully changed your height to: %dcm.", amount);
  6424. SendClientMessage(playerid, COLOR_YELLOW, str);
  6425. ShowAppearanceMain(playerid);
  6426. return OnPlayerSave(playerid);
  6427. }
  6428. return ShowAppearanceMain(playerid);
  6429. }
  6430. if(dialogid == DIALOG_APPEARANCE_UNIQUE)
  6431. {
  6432. if(response)
  6433. {
  6434. if(strlen(inputtext) >= 64) return SendClientMessage(playerid, COLOR_GRAD1, "Too much text - please keep it within 64 letters.");
  6435. strmid(PlayerInfo[playerid][pAppearance], inputtext, 0, strlen(inputtext), 255); // Don't want string length too long, 64 is good?
  6436. format(str, sizeof(str), "You have successfully changed your unique features to: %s.", inputtext);
  6437. SendClientMessage(playerid, COLOR_YELLOW, str);
  6438. ShowAppearanceMain(playerid);
  6439. return OnPlayerSave(playerid);
  6440. }
  6441. return ShowAppearanceMain(playerid);
  6442. }
  6443. if(dialogid == DIALOG_APPEARANCE_MAIN)
  6444. {
  6445. //ShowPlayerDialog(playerid, DIALOG_APPEARANCE_MAIN, DIALOG_STYLE_LIST, "Character Appearance", "Gender\nAge\nEthnicity\nEye Colour\nBuild\nHeight (feet)\nUnique Features", "Select", "Cancel");
  6446. if(response)
  6447. {
  6448. if(listitem == 0) return ShowPlayerDialog(playerid, DIALOG_APPEARANCE_GENDER, DIALOG_STYLE_LIST, "Appearance: Gender ($25,000)", "Male\nFemale", "Select", "Back");
  6449. if(listitem == 1) return ShowPlayerDialog(playerid, DIALOG_APPEARANCE_AGE, DIALOG_STYLE_INPUT, "Appearance: Age ($25,000)", "Please enter your character's age.", "Select", "Back");
  6450. if(listitem == 2) return ShowPlayerDialog(playerid, DIALOG_APPEARANCE_ETHNICITY, DIALOG_STYLE_LIST, "Appearance: Ethnicity", "White\nBlack\nAsian\nHispanic\nLatino\nNative American", "Select", "Back");
  6451. if(listitem == 3) return ShowPlayerDialog(playerid, DIALOG_APPEARANCE_EYE, DIALOG_STYLE_LIST, "Appearance: Eye Colour", "Blue\nBrown\nGreen", "Select", "Back");
  6452. if(listitem == 4) return ShowPlayerDialog(playerid, DIALOG_APPEARANCE_BUILD, DIALOG_STYLE_LIST, "Appearance: Build", "Slim\nAverage\nMuscular", "Select", "Back");
  6453. if(listitem == 5) return ShowPlayerDialog(playerid, DIALOG_APPEARANCE_HEIGHT, DIALOG_STYLE_INPUT, "Appearance: Height", "Please enter your character's height.", "Select", "Back");
  6454. if(listitem == 6) return ShowPlayerDialog(playerid, DIALOG_APPEARANCE_UNIQUE, DIALOG_STYLE_INPUT, "Appearance: Unique Features", "Please enter your character's distinguishable remarks (e.g. specific tattoo).", "Select", "Back");
  6455. }
  6456. return 1; // Pressed cancel
  6457. }
  6458. if(dialogid == AMSGS) // Admin Messages
  6459. {
  6460. if(!response)
  6461. {
  6462. return 1;
  6463. }
  6464. else
  6465. {
  6466. if(!strlen(inputtext))
  6467. {
  6468. displayAdminMessages(playerid);
  6469. SendClientMessage(playerid, COLOR_GRAD1, "You must enter a message before clicking submit.");
  6470. return 1;
  6471. }
  6472. else
  6473. {
  6474. //get time
  6475. new hour, mins, sec;
  6476. gettime(hour, mins, sec);
  6477. hour = FixHour(hour);
  6478. //get admin color based on rank
  6479. new acolor[25];
  6480. if(PlayerInfo[playerid][pAdmin] == 1)
  6481. {
  6482. acolor = C_SILENT_ADMIN;
  6483. }
  6484. if(PlayerInfo[playerid][pAdmin] == 2)
  6485. {
  6486. acolor = C_JUNIOR_ADMIN;
  6487. }
  6488. if(PlayerInfo[playerid][pAdmin] == 3)
  6489. {
  6490. acolor = C_GENERAL_ADMIN;
  6491. }
  6492. if(PlayerInfo[playerid][pAdmin] >= 4 && PlayerInfo[playerid][pAdmin] < 1337)
  6493. {
  6494. acolor = C_SENIOR_ADMIN;
  6495. }
  6496. if(PlayerInfo[playerid][pAdmin] >= 1337 && PlayerInfo[playerid][pAdmin] < 99999)
  6497. {
  6498. acolor = C_HEAD_ADMIN;
  6499. }
  6500. if(PlayerInfo[playerid][pAdmin] >= 99999)
  6501. {
  6502. acolor = C_EXEC_ADMIN;
  6503. }
  6504. format(str, sizeof(str), "[%d:%d]%s %s{BFBDBE}: %s", hour, mins, acolor, PlayerICName(playerid), inputtext);
  6505. if(LINES_AMOUNT == sizeof(aMessageInfo)) //if at the end of the array
  6506. {
  6507. shiftArray(); //shift all msgs back 1 index
  6508. strmid(aMessageInfo[LINES_AMOUNT -1], str, 0, 128);
  6509. }
  6510. else
  6511. {
  6512. strmid(aMessageInfo[LINES_AMOUNT], str, 0, 128);
  6513. LINES_AMOUNT++;
  6514. }
  6515. SaveAdminMessages();
  6516. displayAdminMessages(playerid);
  6517. }
  6518. }
  6519. return 1;
  6520. }
  6521. if(dialogid == FAMILY_DIALOG)
  6522. {
  6523. if(!response) return 1;
  6524. if(listitem != -1)
  6525. {
  6526. new famstring[512];
  6527. new playersOnline = 0;
  6528. foreach( new i: Player )
  6529. {
  6530. if(PlayerInfo[i][pFMember] == listitem)
  6531. {
  6532. playersOnline++;
  6533. }
  6534. }
  6535. new nextxp = GetFamilyNextXP(listitem);
  6536. new level = GetFamilyLevel(listitem);
  6537. if(FamilyInfo[listitem][FamilyLeaderHide])
  6538. {
  6539. format(famstring, sizeof(famstring), "{FFFFFF}Name: %s\nLeader: Hidden\nMembers: %d/%d\nStrikes: %d/3\nXP: %d/%d (Level %d, %d XP left for level up)", FamilyInfo[listitem][FamilyName], playersOnline, FamilyInfo[listitem][FamilyMembers], FamilyInfo[listitem][FStrikes], FamilyInfo[listitem][fXP], nextxp, level, nextxp-FamilyInfo[listitem][fXP]);
  6540. if(nextxp == -1) format(famstring, sizeof(famstring), "{FFFFFF}Name: %s\nLeader: Hidden\nMembers: %d/%d\nStrikes: %d/3\nLevel %d MAX", FamilyInfo[listitem][FamilyName], playersOnline, FamilyInfo[listitem][FamilyMembers], FamilyInfo[listitem][FStrikes], level);
  6541. }
  6542. else
  6543. {
  6544. format(famstring, sizeof(famstring), "{FFFFFF}Name: %s\nLeader: %s\nMembers: %d/%d\nStrikes: %d/3\nXP: %d/%d (Level %d, %d XP left for level up)", FamilyInfo[listitem][FamilyName], FamilyInfo[listitem][FamilyLeader], playersOnline, FamilyInfo[listitem][FamilyMembers], FamilyInfo[listitem][FStrikes], FamilyInfo[listitem][fXP], nextxp, level, nextxp-FamilyInfo[listitem][fXP]);
  6545. if(nextxp == -1) format(famstring, sizeof(famstring), "{FFFFFF}Name: %s\nLeader: %s\nMembers: %d/%d\nStrikes: %d/3\nLevel %d MAX", FamilyInfo[listitem][FamilyName], FamilyInfo[listitem][FamilyLeader], playersOnline, FamilyInfo[listitem][FamilyMembers], FamilyInfo[listitem][FStrikes], level);
  6546. }
  6547. ShowPlayerDialog(playerid, FAMILY_INFO, DIALOG_STYLE_MSGBOX, "Families", famstring, "Ok", "Cancel");
  6548. }
  6549. return 1;
  6550. }
  6551. if(dialogid == 48) //refund
  6552. {
  6553. if(!IsPlayerConnected(RefundingID[playerid]) || RefundingID[playerid] == INVALID_PLAYER_ID)
  6554. {
  6555. RefundingID[playerid] = 999;
  6556. RefundingNumber[playerid] = 999;
  6557. SendClientMessage(playerid, COLOR_GREY, "That player is Offline / Invalid ID.");
  6558. return 1;
  6559. }
  6560. if(!response) //cancel
  6561. {
  6562. RefundingNumber[playerid] = 999;
  6563. DisplayDialogForPlayer(playerid, 47); //refund
  6564. }
  6565. if(response)
  6566. {
  6567. if(!strlen(inputtext)) //no text inputted
  6568. {
  6569. RefundingNumber[playerid] = 999;
  6570. DisplayDialogForPlayer(playerid, 47); //refund
  6571. return 1;
  6572. }
  6573. new amount;
  6574. amount = strval(inputtext);
  6575. new year, month, day;
  6576. getdate(year, month, day);
  6577. new stat = RefundingNumber[playerid];
  6578. new giveplayerid = RefundingID[playerid];
  6579. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  6580. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  6581. switch(stat)
  6582. {
  6583. case 0: //Level
  6584. {
  6585. RefundingNumber[playerid] = 999;
  6586. PlayerInfo[giveplayerid][pLevel] = amount; //edit
  6587. format(str, sizeof(str), "* You have set %s's Level to %d.", giveplayer, amount); //edit
  6588. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6589. format(str, sizeof(str), "* An Admin has set your Level to %d.", amount); //edit
  6590. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6591. DisplayDialogForPlayer(playerid, 47); //refund
  6592. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6593. StatLog(str);
  6594. }
  6595. case 1: //Cash
  6596. {
  6597. RefundingNumber[playerid] = 999;
  6598. ResetMoney(giveplayerid);
  6599. GiveMoney(giveplayerid, amount);
  6600. format(str, sizeof(str), "* You have set %s's Cash to $%d.", giveplayer, amount); //edit
  6601. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6602. format(str, sizeof(str), "* An Admin has set your Cash to $%d.", amount); //edit
  6603. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6604. DisplayDialogForPlayer(playerid, 47); //refund
  6605. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Cash to $%d", day, month, year, sendername, giveplayer, amount); //edit
  6606. StatLog(str);
  6607. }
  6608. case 2: //Bank
  6609. {
  6610. RefundingNumber[playerid] = 999;
  6611. PlayerInfo[giveplayerid][pAccount] = amount; //edit
  6612. format(str, sizeof(str), "* You have set %s's Bank Account to $%d.", giveplayer, amount); //edit
  6613. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6614. format(str, sizeof(str), "* An Admin has set your Bank Account to $%d.", amount); //edit
  6615. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6616. DisplayDialogForPlayer(playerid, 47); //refund
  6617. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Bank Account to $%d", day, month, year, sendername, giveplayer, amount); //edit
  6618. StatLog(str);
  6619. }
  6620. case 3: //Materials
  6621. {
  6622. RefundingNumber[playerid] = 999;
  6623. PlayerInfo[giveplayerid][pMats] = amount; //edit
  6624. format(str, sizeof(str), "* You have set %s's Materials to %d.", giveplayer, amount); //edit
  6625. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6626. format(str, sizeof(str), "* An Admin has set your Materials to %d.", amount); //edit
  6627. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6628. DisplayDialogForPlayer(playerid, 47); //refund
  6629. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Materials to %d", day, month, year, sendername, giveplayer, amount); //edit
  6630. StatLog(str);
  6631. }
  6632. case 4: //Crack
  6633. {
  6634. RefundingNumber[playerid] = 999;
  6635. PlayerInfo[giveplayerid][pCocaine] = amount; //edit
  6636. format(str, sizeof(str), "* You have set %s's Cocaine to %d.", giveplayer, amount); //edit
  6637. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6638. format(str, sizeof(str), "* An Admin has set your Cocaine to %d.", amount); //edit
  6639. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6640. DisplayDialogForPlayer(playerid, 47); //refund
  6641. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Cocaine to %d", day, month, year, sendername, giveplayer, amount); //edit
  6642. StatLog(str);
  6643. }
  6644. case 5: //Pot
  6645. {
  6646. RefundingNumber[playerid] = 999;
  6647. PlayerInfo[giveplayerid][pCannabis] = amount; //edit
  6648. format(str, sizeof(str), "* You have set %s's Pot to %d.", giveplayer, amount); //edit
  6649. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6650. format(str, sizeof(str), "* An Admin has set your Pot to %d.", amount); //edit
  6651. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6652. DisplayDialogForPlayer(playerid, 47); //refund
  6653. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Pot to %d", day, month, year, sendername, giveplayer, amount); //edit
  6654. StatLog(str);
  6655. }
  6656. case 6: //Arms Dealer
  6657. {
  6658. RefundingNumber[playerid] = 999;
  6659. //
  6660. new lvl;
  6661. if(amount == 1)
  6662. {
  6663. lvl = 0;
  6664. }
  6665. else if(amount == 2)
  6666. {
  6667. lvl = 50;
  6668. }
  6669. else if(amount == 3)
  6670. {
  6671. lvl = 100;
  6672. }
  6673. else if(amount == 4)
  6674. {
  6675. lvl = 200;
  6676. }
  6677. else if(amount == 5)
  6678. {
  6679. lvl = 400;
  6680. }
  6681. else
  6682. {
  6683. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6684. DisplayDialogForPlayer(playerid, 47);
  6685. return 1;
  6686. }
  6687. PlayerInfo[giveplayerid][pArmsSkill] = lvl; //edit
  6688. //
  6689. format(str, sizeof(str), "* You have set %s's Arms Dealer Level to %d.", giveplayer, amount); //edit
  6690. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6691. format(str, sizeof(str), "* An Admin has set your Arms Dealer Level to %d.", amount); //edit
  6692. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6693. DisplayDialogForPlayer(playerid, 47); //refund
  6694. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Arms Dealer Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6695. StatLog(str);
  6696. }
  6697. case 7: //Carjacker
  6698. {
  6699. RefundingNumber[playerid] = 999;
  6700. //
  6701. new lvl;
  6702. if(amount == 1)
  6703. {
  6704. lvl = 0;
  6705. }
  6706. else if(amount == 2)
  6707. {
  6708. lvl = 50;
  6709. }
  6710. else if(amount == 3)
  6711. {
  6712. lvl = 100;
  6713. }
  6714. else if(amount == 4)
  6715. {
  6716. lvl = 200;
  6717. }
  6718. else if(amount == 5)
  6719. {
  6720. lvl = 400;
  6721. }
  6722. else
  6723. {
  6724. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6725. DisplayDialogForPlayer(playerid, 47);
  6726. return 1;
  6727. }
  6728. PlayerInfo[giveplayerid][pJackSkill] = lvl; //edit
  6729. //
  6730. format(str, sizeof(str), "* You have set %s's Car Jacker Level to %d.", giveplayer, amount); //edit
  6731. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6732. format(str, sizeof(str), "* An Admin has set your Car Jacker Level to %d.", amount); //edit
  6733. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6734. DisplayDialogForPlayer(playerid, 47); //refund
  6735. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Car Jacker Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6736. StatLog(str);
  6737. }
  6738. case 8: //Detective
  6739. {
  6740. RefundingNumber[playerid] = 999;
  6741. //
  6742. new lvl;
  6743. if(amount == 1)
  6744. {
  6745. lvl = 0;
  6746. }
  6747. else if(amount == 2)
  6748. {
  6749. lvl = 50;
  6750. }
  6751. else if(amount == 3)
  6752. {
  6753. lvl = 100;
  6754. }
  6755. else if(amount == 4)
  6756. {
  6757. lvl = 200;
  6758. }
  6759. else if(amount == 5)
  6760. {
  6761. lvl = 400;
  6762. }
  6763. else
  6764. {
  6765. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6766. DisplayDialogForPlayer(playerid, 47);
  6767. return 1;
  6768. }
  6769. PlayerInfo[giveplayerid][pDetSkill] = lvl; //edit
  6770. //
  6771. format(str, sizeof(str), "* You have set %s's Detective Level to %d.", giveplayer, amount); //edit
  6772. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6773. format(str, sizeof(str), "* An Admin has set your Detective Level to %d.", amount); //edit
  6774. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6775. DisplayDialogForPlayer(playerid, 47); //refund
  6776. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Detective Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6777. StatLog(str);
  6778. }
  6779. case 9: //Lawyer
  6780. {
  6781. RefundingNumber[playerid] = 999;
  6782. //
  6783. new lvl;
  6784. if(amount == 1)
  6785. {
  6786. lvl = 0;
  6787. }
  6788. else if(amount == 2)
  6789. {
  6790. lvl = 50;
  6791. }
  6792. else if(amount == 3)
  6793. {
  6794. lvl = 100;
  6795. }
  6796. else if(amount == 4)
  6797. {
  6798. lvl = 200;
  6799. }
  6800. else if(amount == 5)
  6801. {
  6802. lvl = 400;
  6803. }
  6804. else
  6805. {
  6806. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6807. DisplayDialogForPlayer(playerid, 47);
  6808. return 1;
  6809. }
  6810. PlayerInfo[giveplayerid][pLawSkill] = lvl; //edit
  6811. //
  6812. format(str, sizeof(str), "* You have set %s's Lawyer Level to %d.", giveplayer, amount); //edit
  6813. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6814. format(str, sizeof(str), "* An Admin has set your Lawyer Level to %d.", amount); //edit
  6815. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6816. DisplayDialogForPlayer(playerid, 47); //refund
  6817. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Lawyer Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6818. StatLog(str);
  6819. }
  6820. case 10: //Mechanic
  6821. {
  6822. RefundingNumber[playerid] = 999;
  6823. //
  6824. new lvl;
  6825. if(amount == 1)
  6826. {
  6827. lvl = 0;
  6828. }
  6829. else if(amount == 2)
  6830. {
  6831. lvl = 50;
  6832. }
  6833. else if(amount == 3)
  6834. {
  6835. lvl = 100;
  6836. }
  6837. else if(amount == 4)
  6838. {
  6839. lvl = 200;
  6840. }
  6841. else if(amount == 5)
  6842. {
  6843. lvl = 400;
  6844. }
  6845. else
  6846. {
  6847. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6848. DisplayDialogForPlayer(playerid, 47);
  6849. return 1;
  6850. }
  6851. PlayerInfo[giveplayerid][pMechSkill] = lvl; //edit
  6852. //
  6853. format(str, sizeof(str), "* You have set %s's Mechanic Level to %d.", giveplayer, amount); //edit
  6854. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6855. format(str, sizeof(str), "* An Admin has set your Mechanic Level to %d.", amount); //edit
  6856. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6857. DisplayDialogForPlayer(playerid, 47); //refund
  6858. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Mechanic Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6859. StatLog(str);
  6860. }
  6861. case 11: //Drug Dealer
  6862. {
  6863. RefundingNumber[playerid] = 999;
  6864. //
  6865. new lvl;
  6866. if(amount == 1)
  6867. {
  6868. lvl = 0;
  6869. }
  6870. else if(amount == 2)
  6871. {
  6872. lvl = 50;
  6873. }
  6874. else if(amount == 3)
  6875. {
  6876. lvl = 100;
  6877. }
  6878. else if(amount == 4)
  6879. {
  6880. lvl = 200;
  6881. }
  6882. else if(amount == 5)
  6883. {
  6884. lvl = 400;
  6885. }
  6886. else
  6887. {
  6888. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6889. DisplayDialogForPlayer(playerid, 47);
  6890. return 1;
  6891. }
  6892. PlayerInfo[giveplayerid][pDrugsSkill] = lvl; //edit
  6893. //
  6894. //PlayerInfo[giveplayerid][pDrugsSkill] = amount; //edit
  6895. format(str, sizeof(str), "* You have set %s's Drug Dealer Level to %d.", giveplayer, amount); //edit
  6896. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6897. format(str, sizeof(str), "* An Admin has set your Drug Dealer Level to %d.", amount); //edit
  6898. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6899. DisplayDialogForPlayer(playerid, 47); //refund
  6900. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Drug Dealer Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6901. StatLog(str);
  6902. }
  6903. case 12: //Sex
  6904. {
  6905. RefundingNumber[playerid] = 999;
  6906. //
  6907. new lvl;
  6908. if(amount == 1)
  6909. {
  6910. lvl = 0;
  6911. }
  6912. else if(amount == 2)
  6913. {
  6914. lvl = 50;
  6915. }
  6916. else if(amount == 3)
  6917. {
  6918. lvl = 100;
  6919. }
  6920. else if(amount == 4)
  6921. {
  6922. lvl = 200;
  6923. }
  6924. else if(amount == 5)
  6925. {
  6926. lvl = 400;
  6927. }
  6928. else
  6929. {
  6930. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6931. DisplayDialogForPlayer(playerid, 47);
  6932. return 1;
  6933. }
  6934. PlayerInfo[giveplayerid][pSexSkill] = lvl; //edit
  6935. format(str, sizeof(str), "* You have set %s's Sex Level to %d.", giveplayer, amount); //edit
  6936. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6937. format(str, sizeof(str), "* An Admin has set your Sex Level to %d.", amount); //edit
  6938. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6939. DisplayDialogForPlayer(playerid, 47); //refund
  6940. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Sex Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6941. StatLog(str);
  6942. }
  6943. case 13: //Boxing
  6944. {
  6945. RefundingNumber[playerid] = 999;
  6946. //
  6947. new lvl;
  6948. if(amount == 1)
  6949. {
  6950. lvl = 0;
  6951. }
  6952. else if(amount == 2)
  6953. {
  6954. lvl = 50;
  6955. }
  6956. else if(amount == 3)
  6957. {
  6958. lvl = 100;
  6959. }
  6960. else if(amount == 4)
  6961. {
  6962. lvl = 200;
  6963. }
  6964. else if(amount == 5)
  6965. {
  6966. lvl = 400;
  6967. }
  6968. else
  6969. {
  6970. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6971. DisplayDialogForPlayer(playerid, 47);
  6972. return 1;
  6973. }
  6974. PlayerInfo[giveplayerid][pBoxSkill] = lvl; //edit
  6975. //
  6976. format(str, sizeof(str), "* You have set %s's Boxing Level to %d.", giveplayer, amount); //edit
  6977. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6978. format(str, sizeof(str), "* An Admin has set your Boxing Level to %d.", amount); //edit
  6979. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6980. DisplayDialogForPlayer(playerid, 47); //refund
  6981. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Boxing Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6982. StatLog(str);
  6983. }
  6984. case 14: //Fishing
  6985. {
  6986. RefundingNumber[playerid] = 999;
  6987. //
  6988. new lvl;
  6989. if(amount == 1)
  6990. {
  6991. lvl = 0;
  6992. }
  6993. else if(amount == 2)
  6994. {
  6995. lvl = 50;
  6996. }
  6997. else if(amount == 3)
  6998. {
  6999. lvl = 100;
  7000. }
  7001. else if(amount == 4)
  7002. {
  7003. lvl = 200;
  7004. }
  7005. else if(amount == 5)
  7006. {
  7007. lvl = 400;
  7008. }
  7009. else
  7010. {
  7011. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  7012. DisplayDialogForPlayer(playerid, 47);
  7013. return 1;
  7014. }
  7015. PlayerInfo[giveplayerid][pFishSkill] = lvl; //edit
  7016. //
  7017. format(str, sizeof(str), "* You have set %s's Fishing Level to %d.", giveplayer, amount); //edit
  7018. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  7019. format(str, sizeof(str), "* An Admin has set your Fishing Level to %d.", amount); //edit
  7020. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  7021. DisplayDialogForPlayer(playerid, 47); //refund
  7022. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Fishing Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  7023. StatLog(str);
  7024. }
  7025. case 15:
  7026. {
  7027. RefundingNumber[playerid] = 999;
  7028. new lvl;
  7029. switch(amount)
  7030. {
  7031. case 1: lvl = 0;
  7032. case 2: lvl = 50;
  7033. case 3: lvl = 120;
  7034. case 4: lvl = 200;
  7035. case 5: lvl = 270;
  7036. default:
  7037. {
  7038. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  7039. DisplayDialogForPlayer(playerid, 47);
  7040. return 1;
  7041. }
  7042. }
  7043. PlayerInfo[playerid][pPizzaSkill] = lvl;
  7044. format(str, sizeof(str), "* You have set %s's Pizza Level to %d.", giveplayer, amount); //edit
  7045. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  7046. format(str, sizeof(str), "* An Admin has set your Pizza Level to %d.", amount); //edit
  7047. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  7048. DisplayDialogForPlayer(playerid, 47); //refund
  7049. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Pizza Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  7050. StatLog(str);
  7051. }
  7052. default:
  7053. {
  7054. DisplayDialogForPlayer(playerid, 47); //refund
  7055. SendClientMessage(giveplayerid, COLOR_GREY, "Invalid stat code.");
  7056. return 1;
  7057. }
  7058. }
  7059. }
  7060. return 1;
  7061. }
  7062. if(dialogid == 47) //refund
  7063. {
  7064. if(!response)
  7065. {
  7066. RefundingID[playerid] = 999;
  7067. }
  7068. if(response)
  7069. {
  7070. new statname[32];
  7071. strmid(giveplayer, PlayerICName(RefundingID[playerid]), 0, MAX_PLAYER_NAME);
  7072. switch(listitem)
  7073. {
  7074. case 0:
  7075. {
  7076. RefundingNumber[playerid] = 0;
  7077. statname = "Level";
  7078. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7079. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7080. }
  7081. case 1:
  7082. {
  7083. RefundingNumber[playerid] = 1;
  7084. statname = "Cash";
  7085. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7086. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7087. }
  7088. case 2:
  7089. {
  7090. RefundingNumber[playerid] = 2;
  7091. statname = "Bank";
  7092. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7093. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7094. return 1;
  7095. }
  7096. case 3:
  7097. {
  7098. RefundingNumber[playerid] = 3;
  7099. statname = "Materials";
  7100. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7101. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7102. }
  7103. case 4:
  7104. {
  7105. RefundingNumber[playerid] = 6;
  7106. statname = "Arms Dealer Skill";
  7107. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7108. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7109. }
  7110. case 5:
  7111. {
  7112. RefundingNumber[playerid] = 7;
  7113. statname = "Carjacker Skill";
  7114. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7115. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7116. }
  7117. case 6:
  7118. {
  7119. RefundingNumber[playerid] = 8;
  7120. statname = "Detective Skill";
  7121. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7122. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7123. }
  7124. case 7:
  7125. {
  7126. RefundingNumber[playerid] = 9;
  7127. statname = "Lawyer Skill";
  7128. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7129. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7130. }
  7131. case 8:
  7132. {
  7133. RefundingNumber[playerid] = 10;
  7134. statname = "Mechanic Skill";
  7135. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7136. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7137. }
  7138. case 9:
  7139. {
  7140. RefundingNumber[playerid] = 11;
  7141. statname = "Drug Dealer Skill";
  7142. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7143. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7144. }
  7145. case 10:
  7146. {
  7147. RefundingNumber[playerid] = 12;
  7148. statname = "Sex Skill";
  7149. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7150. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7151. }
  7152. case 11:
  7153. {
  7154. RefundingNumber[playerid] = 13;
  7155. statname = "Boxing Skill";
  7156. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7157. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7158. }
  7159. case 12:
  7160. {
  7161. RefundingNumber[playerid] = 14;
  7162. statname = "Fishing Skill";
  7163. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7164. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7165. }
  7166. case 13:
  7167. {
  7168. RefundingNumber[playerid] = 15;
  7169. statname = "Pizza Skill";
  7170. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7171. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7172. }
  7173. }
  7174. return 1;
  7175. }
  7176. return 1;
  7177. }
  7178. if(dialogid == 59)
  7179. {
  7180. if(response)
  7181. {
  7182. if(strlen(inputtext))
  7183. {
  7184. new amount = strval(inputtext);
  7185. if(amount < 1 || amount > 100000)
  7186. {
  7187. SendClientMessage(playerid, COLOR_GRAD1, "You can't withdraw under $1 or more than $100,000 at a time.");
  7188. return 1;
  7189. }
  7190. if(PlayerInfo[playerid][pAccount] < amount)
  7191. {
  7192. format(str, sizeof(str), "The ATM has denied your transaction.\nThe amount of money ($%d), you want to withdraw, exceeds the amount in your account ($%d).", amount, PlayerInfo[playerid][pAccount]);
  7193. ShowPlayerDialog(playerid, 60, DIALOG_STYLE_MSGBOX, "ATM", str, "Done", "Cancel");
  7194. return 1;
  7195. }
  7196. PlayerInfo[playerid][pAccount] -= amount;
  7197. GiveMoney(playerid, amount);
  7198. format(str, sizeof(str), "You have withdrawn $%d from your bank acount.\nNew balance: $%d", amount, PlayerInfo[playerid][pAccount]);
  7199. ShowPlayerDialog(playerid, 61, DIALOG_STYLE_MSGBOX, "ATM", str, "Done", "Cancel");
  7200. format(str, sizeof(str), "* %s takes their cash out of the machine and puts their card in their pocket.", PlayerICName(playerid));
  7201. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7202. return 1;
  7203. }
  7204. }
  7205. return 1;
  7206. }
  7207. if(dialogid == 60)
  7208. {
  7209. if(response) { }
  7210. return 1;
  7211. }
  7212. if(dialogid == 3242)
  7213. {
  7214. if(response)
  7215. {
  7216. if(listitem == 0)
  7217. {
  7218. if(PlayerInfo[playerid][pDonateRank] >= 1)
  7219. {
  7220. if(PlayerInfo[playerid][pVipColor] == 0)
  7221. {
  7222. PlayerInfo[playerid][pVipColor] = 1;
  7223. SendClientMessage(playerid, 0x80008000, "Your name is now colored.");
  7224. SetPlayerToTeamColor(playerid);
  7225. }
  7226. else if(PlayerInfo[playerid][pVipColor] == 1)
  7227. {
  7228. PlayerInfo[playerid][pVipColor] = 0;
  7229. SendClientMessage(playerid, COLOR_GRAD2, "Your name is no longer colored.");
  7230. SetPlayerToTeamColor(playerid);
  7231. }
  7232. }
  7233. }
  7234. if(listitem == 1) // car repair
  7235. {
  7236. /*if(!IsPlayerInAnyVehicle(playerid))
  7237. {
  7238. SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
  7239. return 1;
  7240. }
  7241. if(vipRepairTime[playerid] > 0)
  7242. {
  7243. format(str, sizeof(str), "Please wait %d seconds before repairing another vehicle.", vipRepairTime[playerid]);
  7244. return SendClientMessage(playerid, COLOR_GREY, str);
  7245. }
  7246. format(str, sizeof(str), "* %s has repaired the vehicle.", PlayerICName(playerid));
  7247. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7248. new carid = GetPlayerVehicleID(playerid);
  7249. //RepairVehicle(carid);
  7250. SetVehicleHealth(carid, 999.0);
  7251. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7252. vipRepairTime[playerid] = 60; // 60 seconds*/
  7253. SendClientMessage(playerid, COLOR_GREY, "This feature is currently disabled!");
  7254. }
  7255. if(listitem == 2) // skin
  7256. {
  7257. ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_LIST, "VIP Skins", "Wu Zi Mu\nKent Paul\nMaccer\nKen Rosenberg\nWhite MIB agent\nMichael Toreno\nJizzy B.", "Choose", "Cancel");
  7258. }
  7259. }
  7260. return 1;
  7261. }
  7262. if(dialogid == 62)
  7263. {
  7264. if(response)
  7265. {
  7266. if(listitem == 0)
  7267. {
  7268. if(PlayerInfo[playerid][pDonateRank] >= 1)
  7269. {
  7270. if(PlayerInfo[playerid][pVipColor] == 0)
  7271. {
  7272. PlayerInfo[playerid][pVipColor] = 1;
  7273. SendClientMessage(playerid, 0x80008000, "Your name is now colored.");
  7274. SetPlayerToTeamColor(playerid);
  7275. }
  7276. else if(PlayerInfo[playerid][pVipColor] == 1)
  7277. {
  7278. PlayerInfo[playerid][pVipColor] = 0;
  7279. SendClientMessage(playerid, COLOR_GRAD2, "Your name is no longer colored.");
  7280. SetPlayerToTeamColor(playerid);
  7281. }
  7282. }
  7283. }
  7284. if(listitem == 1) // car tune
  7285. {
  7286. new tempid = GetPlayerVehicleID(playerid);
  7287. if(!IsPlayerInAnyVehicle(playerid))
  7288. {
  7289. SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
  7290. return 1;
  7291. }
  7292. if(IsAPlane(tempid) || IsAHelicopter(tempid) || IsABike(tempid) || IsATrain(tempid) || IsABoat(tempid))
  7293. {
  7294. SendClientMessage(playerid, COLOR_GREY, "You can't mod this.");
  7295. return 1;
  7296. }
  7297. ShowPlayerDialog(playerid, 63, DIALOG_STYLE_LIST, "Tune Menu", "Colors\nPaintjobs\nWheels\nHydraulics\nRepair", "Select", "Cancel");
  7298. }
  7299. if(listitem == 2) // skin
  7300. {
  7301. ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_LIST, "VIP Skins", "Wu Zi Mu\nKent Paul\nMaccer\nKen Rosenberg\nWhite MIB agent\nMichael Toreno\nJizzy B.", "Choose", "Cancel");
  7302. }
  7303. }
  7304. return 1;
  7305. }
  7306. if(dialogid == 1246)
  7307. {
  7308. if(response)
  7309. {
  7310. if(listitem == 0)
  7311. {
  7312. SendClientMessage(playerid, COLOR_GRAD1, "You have set your skin to \"Wu Zi Mu\" (ID: 294)");
  7313. SetPlayerSkin(playerid, 294);
  7314. }
  7315. if(listitem == 1)
  7316. {
  7317. SendClientMessage(playerid, COLOR_GRAD1, "You have set your skin to \"Kent Paul\" (ID: 291)");
  7318. SetPlayerSkin(playerid, 291);
  7319. }
  7320. if(listitem == 2)
  7321. {
  7322. SendClientMessage(playerid, COLOR_GRAD1, "You have set your skin to \"Maccer\" (ID: 2)");
  7323. SetPlayerSkin(playerid, 2);
  7324. }
  7325. if(listitem == 3)
  7326. {
  7327. SendClientMessage(playerid, COLOR_GRAD1, "You have set your skin to \"Ken Rosenberg\" (ID: 290)");
  7328. SetPlayerSkin(playerid, 290);
  7329. }
  7330. if(listitem == 4)
  7331. {
  7332. SendClientMessage(playerid, COLOR_GRAD1, "You have set your skin to \"White MIB agent\" (ID: 165)");
  7333. SetPlayerSkin(playerid, 165);
  7334. }
  7335. if(listitem == 5)
  7336. {
  7337. SendClientMessage(playerid, COLOR_GRAD1, "You have set your skin to \"Michael Toreno\" (ID: 295)");
  7338. SetPlayerSkin(playerid, 295);
  7339. }
  7340. if(listitem == 6)
  7341. {
  7342. SendClientMessage(playerid, COLOR_GRAD1, "You have set your skin to \"Jizzy B.\" (ID: 296)");
  7343. SetPlayerSkin(playerid, 296);
  7344. }
  7345. }
  7346. return 1;
  7347. }
  7348. if(dialogid == 63)
  7349. {
  7350. if(response)
  7351. {
  7352. if(listitem == 0) // Colors
  7353. {
  7354. ShowPlayerDialog(playerid, 64, DIALOG_STYLE_LIST, "Vehicle Color", "Black\nWhite\nDark Blue\nLight Blue\nGreen\nYellow\nPink\nRed", "Change", "Cancel");
  7355. }
  7356. if(listitem == 1) // Paintjobs
  7357. {
  7358. ShowPlayerDialog(playerid, 65, DIALOG_STYLE_LIST, "Paint Jobs", "Style1\nStyle2\nStyle3", "Change", "Cancel");
  7359. }
  7360. if(listitem == 2) // Wheels
  7361. {
  7362. ShowPlayerDialog(playerid, 66, DIALOG_STYLE_LIST, "Wheels", "Style 1 \nStyle 2 \nStyle 3 \nStyle 4 \nStyle 5 \nStyle 6", "Change", "Cancel");
  7363. }
  7364. if(listitem == 3) // Hydraulics
  7365. {
  7366. new vipcar = GetPlayerVehicleID(playerid);
  7367. if(!IsPlayerInAnyVehicle(playerid))
  7368. {
  7369. SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
  7370. return 1;
  7371. }
  7372. if(IsAPlane(vipcar) || IsAHelicopter(vipcar) || IsABike(vipcar) || IsATrain(vipcar) || IsABoat(vipcar))
  7373. {
  7374. SendClientMessage(playerid, COLOR_GREY, "You can't mod this.");
  7375. return 1;
  7376. }
  7377. AddVehicleComponent(vipcar, 1087);
  7378. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7379. }
  7380. if(listitem == 4) // Repair
  7381. {
  7382. /*if(!IsPlayerInAnyVehicle(playerid))
  7383. {
  7384. SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
  7385. return 1;
  7386. }
  7387. if(vipRepairTime[playerid] > 0)
  7388. {
  7389. format(str, sizeof(str), "Please wait %d seconds before repairing another vehicle.", vipRepairTime[playerid]);
  7390. return SendClientMessage(playerid, COLOR_GREY, str);
  7391. }
  7392. format(str, sizeof(str), "* %s has repaired the vehicle.", PlayerICName(playerid));
  7393. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7394. new carid = GetPlayerVehicleID(playerid);
  7395. //RepairVehicle(carid);
  7396. SetVehicleHealth(carid, 999.0);
  7397. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7398. vipRepairTime[playerid] = 60; // 60 seconds*/
  7399. SendClientMessage(playerid, COLOR_GREY, "This feature is currently disabled!");
  7400. }
  7401. }
  7402. return 1;
  7403. }
  7404. if(dialogid == 64)
  7405. {
  7406. if(response)
  7407. {
  7408. new vipcar = GetPlayerVehicleID(playerid);
  7409. if(listitem == 0) // black
  7410. {
  7411. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7412. ChangeVehicleColor(vipcar, 0, 0);
  7413. }
  7414. if(listitem == 1) //White
  7415. {
  7416. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7417. ChangeVehicleColor(vipcar, 1, 1);
  7418. }
  7419. if(listitem == 2) //Dark Blue
  7420. {
  7421. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7422. ChangeVehicleColor(vipcar, 425, 425);
  7423. }
  7424. if(listitem == 3) // Light Blue
  7425. {
  7426. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7427. ChangeVehicleColor(vipcar, 147, 147);
  7428. }
  7429. if(listitem == 4) //Green
  7430. {
  7431. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7432. ChangeVehicleColor(vipcar, 16, 16);
  7433. }
  7434. if(listitem == 5) //Yellow
  7435. {
  7436. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7437. ChangeVehicleColor(vipcar, 6, 6);
  7438. }
  7439. if(listitem == 6) //Pink
  7440. {
  7441. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7442. ChangeVehicleColor(vipcar, 146, 146);
  7443. }
  7444. if(listitem == 7) // Red
  7445. {
  7446. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7447. ChangeVehicleColor(vipcar, 3, 3);
  7448. }
  7449. }
  7450. return 1;
  7451. }
  7452. if(dialogid == 65)
  7453. {
  7454. if(response)
  7455. {
  7456. new vipcar = GetPlayerVehicleID(playerid);
  7457. if(listitem == 0) // style 1
  7458. {
  7459. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7460. ChangeVehiclePaintjob(vipcar, 0);
  7461. }
  7462. if(listitem == 1) //Style 2
  7463. {
  7464. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7465. ChangeVehiclePaintjob(vipcar, 1);
  7466. }
  7467. if(listitem == 2) //style 3
  7468. {
  7469. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7470. ChangeVehiclePaintjob(vipcar, 2);
  7471. }
  7472. }
  7473. return 1;
  7474. }
  7475. if(dialogid == 66)
  7476. {
  7477. if(response)
  7478. {
  7479. new vipcar = GetPlayerVehicleID(playerid);
  7480. if(!IsPlayerInAnyVehicle(playerid))
  7481. {
  7482. SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
  7483. return 1;
  7484. }
  7485. if(IsAPlane(vipcar) || IsAHelicopter(vipcar) || IsABike(vipcar) || IsATrain(vipcar) || IsABoat(vipcar))
  7486. {
  7487. //in case they somehow bypass the /vip check
  7488. SendClientMessage(playerid, COLOR_GREY, "You can't mod this.");
  7489. return 1;
  7490. }
  7491. if(listitem == 0) // style 1
  7492. {
  7493. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7494. AddVehicleComponent(vipcar, 1084);
  7495. }
  7496. if(listitem == 1) //Style 2
  7497. {
  7498. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7499. AddVehicleComponent(vipcar, 1073);
  7500. }
  7501. if(listitem == 2) //Style 3
  7502. {
  7503. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7504. AddVehicleComponent(vipcar, 1075);
  7505. }
  7506. if(listitem == 3) //Style 4
  7507. {
  7508. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7509. AddVehicleComponent(vipcar, 1077);
  7510. }
  7511. if(listitem == 4) //Style 5
  7512. {
  7513. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7514. AddVehicleComponent(vipcar, 1079);
  7515. }
  7516. if(listitem == 5) //Style 6
  7517. {
  7518. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7519. AddVehicleComponent(vipcar, 1080);
  7520. }
  7521. }
  7522. return 1;
  7523. }
  7524. if(dialogid == DIALOG_LSFMD_MAIN) //LSFMD
  7525. {
  7526. if(response)
  7527. {
  7528. if(listitem == 0)
  7529. {
  7530. if(PlayerInfo[playerid][pOnDuty] == 0)
  7531. {
  7532. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  7533. format(str, sizeof(str), "* Paramedic %s takes their Badge and medic kit from their locker.", sendername);
  7534. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7535. PlayerInfo[playerid][pOnDuty] = 1;
  7536. if(PlayerInfo[playerid][pMember] == 11) FakeFaction[playerid] = 4;
  7537. SetPlayerColor(playerid, TCOLOR_PARAMEDIC);
  7538. SetPlayerHealth(playerid, 100);
  7539. SetPlayerArmour(playerid, 100);
  7540. if(PlayerInfo[playerid][pRank] != 0)
  7541. {
  7542. GivePlayerGun(playerid, WEAPON_SPRAYCAN); // Spray can
  7543. }
  7544. if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] != FACTION_FMD)
  7545. {
  7546. SetPlayerSkin(playerid, 275);
  7547. PlayerInfo[playerid][pModel] = 275;
  7548. PlayerInfo[playerid][pOnDuty] = 1;
  7549. PlayerInfo[playerid][pMember] = FACTION_FMD;
  7550. PlayerInfo[playerid][pRank] = 1;
  7551. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have been given a badge automatically (SAFMD EMR)");
  7552. }
  7553. }
  7554. else if(PlayerInfo[playerid][pOnDuty] == 1)
  7555. {
  7556. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  7557. format(str, sizeof(str), "* Paramedic %s puts their Badge and their medic kit in their locker.", sendername);
  7558. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7559. PlayerInfo[playerid][pOnDuty] = 0;
  7560. SetPlayerColor(playerid, TCOLOR_WHITE);
  7561. }
  7562. return 1;
  7563. }
  7564. if(listitem == 1)
  7565. {
  7566. // Shows faction skin selector
  7567. ShowSkinShop(playerid, false, true, false, false, true);
  7568. return 1;
  7569. }
  7570. if(listitem == 2)
  7571. {
  7572. // Shows civilian skin selector
  7573. ShowSkinShop(playerid, true, false, false, false, false);
  7574. return 1;
  7575. }
  7576. if(listitem == 3)
  7577. {
  7578. ShowPlayerDialog(playerid, DIALOG_LSFMD_GEAR, DIALOG_STYLE_TABLIST, "Gear",
  7579. "Fire Extinguisher\t$50\n\
  7580. Desert eagle\t$1000\n\
  7581. Kevlar\t$2000\n\
  7582. Temporary RRK\tFree\n\
  7583. Radio\t$150\n\
  7584. First aid kit\t$150\n\
  7585. Portable MDC\tFree",
  7586. "Purchase", "Back");
  7587. return 1;
  7588. }
  7589. }
  7590. return 1;
  7591. }
  7592. if(dialogid == DIALOG_LSFMD_GEAR) //LSFMD GEAR
  7593. {
  7594. if(response)
  7595. {
  7596. if(listitem == 0) // Fire Extinguisher
  7597. {
  7598. if(PlayerInfo[playerid][pCash] < 50)
  7599. {
  7600. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7601. TogglePlayerControllable(playerid, true);
  7602. return 1;
  7603. }
  7604. else
  7605. {
  7606. GiveMoney(playerid, -50);
  7607. GivePlayerGun(playerid, 42);
  7608. TogglePlayerControllable(playerid, true);
  7609. }
  7610. }
  7611. if(listitem == 1) // Deagle
  7612. {
  7613. if(PlayerInfo[playerid][pRank] < 1) return SendClientMessage(playerid, COLOR_GREY, "This may only be used by R1s+");
  7614. if(PlayerInfo[playerid][pCash] < 1000)
  7615. {
  7616. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7617. TogglePlayerControllable(playerid, true);
  7618. return 1;
  7619. }
  7620. else
  7621. {
  7622. GiveMoney(playerid, -1000);
  7623. GivePlayerGun(playerid, WEAPON_DEAGLE);
  7624. TogglePlayerControllable(playerid, true);
  7625. }
  7626. }
  7627. if(listitem == 2) //Kevlar
  7628. {
  7629. if(PlayerInfo[playerid][pCash] < 2000)
  7630. {
  7631. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7632. TogglePlayerControllable(playerid, true);
  7633. return 1;
  7634. }
  7635. else
  7636. {
  7637. GiveMoney(playerid, -2000);
  7638. SetPlayerArmour(playerid, 100);
  7639. TogglePlayerControllable(playerid, true);
  7640. }
  7641. }
  7642. if(listitem == 3) // Temp RRK
  7643. {
  7644. if(FMD_RRK_DISABLED)
  7645. return SendClientMessage(playerid, COLOR_GREY, "The RRK system is disabled.");
  7646. if(hasTempRRK[playerid] == 0)
  7647. {
  7648. hasTempRRK[playerid] = 1;
  7649. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have taken a temporary RRK from the lockers.");
  7650. TogglePlayerControllable(playerid, true);
  7651. }
  7652. else return SendClientMessage(playerid, COLOR_GREY, "You already have a temporary RRK.");
  7653. }
  7654. if(listitem == 4) //radio
  7655. {
  7656. if(PlayerInfo[playerid][pCash] < 150)
  7657. {
  7658. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7659. TogglePlayerControllable(playerid, true);
  7660. return 1;
  7661. }
  7662. else
  7663. {
  7664. PlayerInfo[playerid][pRadio] = 1;
  7665. GiveMoney(playerid, -150);
  7666. TogglePlayerControllable(playerid, true);
  7667. }
  7668. }
  7669. if(listitem == 5)
  7670. {
  7671. if(PlayerInfo[playerid][pCash] < 150)
  7672. {
  7673. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7674. TogglePlayerControllable(playerid, true);
  7675. return 1;
  7676. }
  7677. else
  7678. {
  7679. format(str, sizeof(str), "* %s %s has used a first aid kit.", GetPlayerRank(playerid), PlayerICName(playerid));
  7680. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7681. GiveMoney(playerid, -200);
  7682. SetPlayerHealth(playerid, 100.0);
  7683. TogglePlayerControllable(playerid, true);
  7684. }
  7685. }
  7686. if(listitem == 6) // portable mdc
  7687. {
  7688. PlayerInfo[playerid][pPortMDC] = 1;
  7689. SendClientMessage(playerid, COLOR_ORANGE, "You take a portable MDC unit from the locker.");
  7690. SendClientMessage(playerid, COLOR_ORANGE, "(( This will be lost upon death. ))");
  7691. }
  7692. }
  7693. else
  7694. {
  7695. ShowPlayerDialog(playerid, DIALOG_LSFMD_MAIN, DIALOG_STYLE_LIST, "SAFMD", "Duty\nChange Uniform\nOff Duty\nGear", "Select", "Cancel");
  7696. }
  7697. return 1;
  7698. }
  7699. if(dialogid == SANEWSLOCKER)
  7700. {
  7701. if(response)
  7702. {
  7703. if(listitem == 0)
  7704. {
  7705. if(PlayerInfo[playerid][pOnDuty] == 0)
  7706. {
  7707. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  7708. format(str, sizeof(str), "* %s %s takes their Press Pass and camera from their locker.", GetPlayerRank(playerid), sendername);
  7709. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7710. PlayerInfo[playerid][pOnDuty] = 1;
  7711. SetPlayerColor(playerid, TCOLOR_LIGHTBLUE);
  7712. }
  7713. else if(PlayerInfo[playerid][pOnDuty] == 1)
  7714. {
  7715. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  7716. format(str, sizeof(str), "* %s %s places their Press Pass and Camera in their locker.", GetPlayerRank(playerid), sendername);
  7717. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7718. PlayerInfo[playerid][pOnDuty] = 0;
  7719. SetPlayerColor(playerid, TCOLOR_WHITE);
  7720. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  7721. PlayerInfo[playerid][pClothes] = 0;
  7722. }
  7723. return 1;
  7724. }
  7725. if(listitem == 1)
  7726. {
  7727. // Show civilian skin selector
  7728. ShowSkinShop(playerid, true, false, false, false, false);
  7729. return 1;
  7730. }
  7731. if(listitem == 2)
  7732. {
  7733. ShowPlayerDialog(playerid, SANEWSGUNS, DIALOG_STYLE_LIST, "Gear", "Camera\t\t$250\nKevlar Vest \t$500\nRadio\t\t$150\nMace\t\t$25\nFirst Aid Kit \t$150", "Select", "Back");
  7734. return 1;
  7735. }
  7736. }
  7737. return 1;
  7738. }
  7739. if(dialogid == SANEWSGUNS)
  7740. {
  7741. if(response)
  7742. {
  7743. if(listitem == 0) // CAMERA
  7744. {
  7745. if(PlayerInfo[playerid][pCash] < 250)
  7746. {
  7747. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7748. TogglePlayerControllable(playerid, true);
  7749. }
  7750. else
  7751. {
  7752. GiveMoney(playerid, -250);
  7753. GivePlayerGun(playerid, 43);
  7754. TogglePlayerControllable(playerid, true);
  7755. }
  7756. return 1;
  7757. }
  7758. if(listitem == 1) // Kevlar Vest
  7759. {
  7760. if(PlayerInfo[playerid][pCash] < 500)
  7761. {
  7762. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7763. TogglePlayerControllable(playerid, true);
  7764. }
  7765. else
  7766. {
  7767. GiveMoney(playerid, -500);
  7768. SetPlayerArmour(playerid, 100);
  7769. TogglePlayerControllable(playerid, true);
  7770. }
  7771. return 1;
  7772. }
  7773. if(listitem == 2) //radio
  7774. {
  7775. if(PlayerInfo[playerid][pCash] < 150)
  7776. {
  7777. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7778. TogglePlayerControllable(playerid, true);
  7779. return 1;
  7780. }
  7781. else
  7782. {
  7783. PlayerInfo[playerid][pRadio] = 1;
  7784. GiveMoney(playerid, -150);
  7785. TogglePlayerControllable(playerid, true);
  7786. }
  7787. }
  7788. if(listitem == 3) //Mace
  7789. {
  7790. if(PlayerInfo[playerid][pCash] < 25)
  7791. {
  7792. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7793. TogglePlayerControllable(playerid, true);
  7794. return 1;
  7795. }
  7796. else
  7797. {
  7798. GiveMoney(playerid, -25);
  7799. GivePlayerGun(playerid, 41);
  7800. TogglePlayerControllable(playerid, true);
  7801. }
  7802. }
  7803. if(listitem == 4) // Health
  7804. {
  7805. if(PlayerInfo[playerid][pCash] < 150)
  7806. {
  7807. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7808. TogglePlayerControllable(playerid, true);
  7809. }
  7810. else
  7811. {
  7812. GiveMoney(playerid, -150);
  7813. SetPlayerHealth(playerid, 100);
  7814. TogglePlayerControllable(playerid, true);
  7815. }
  7816. return 1;
  7817. }
  7818. }
  7819. else
  7820. {
  7821. ShowPlayerDialog(playerid, SANEWSLOCKER, DIALOG_STYLE_LIST, "SAN", "Duty\nChange Uniform\nGear\n", "Select", "Cancel");
  7822. }
  7823. return 1;
  7824. }
  7825. if(dialogid == 70) //burgershot
  7826. {
  7827. if(response)
  7828. {
  7829. new biz = GetPlayerVirtualWorld(playerid);
  7830. if(strlen(inputtext))
  7831. {
  7832. if(!IsNumeric(inputtext))
  7833. {
  7834. return SendClientMessage(playerid, COLOR_GREY, "You must type a number.");
  7835. }
  7836. if(strcmp(inputtext, "1", true) == 0) //Sprunk
  7837. {
  7838. if(GetMoney(playerid) < 2)
  7839. {
  7840. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  7841. }
  7842. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  7843. displayCenterHUDInfo(playerid, "~r~Sprunk~w~ purchased!~n~type ~y~/usesoda~w~ to use, LMB to drink, press F to drop.", 8); //display for 8 seconds
  7844. GiveMoney(playerid, -2);
  7845. BizInfo[biz][bTill] += 2;
  7846. BizInfo[biz][bProducts] -= 1;
  7847. }
  7848. else if(strcmp(inputtext, "2", true) == 0) //Koolaid
  7849. {
  7850. if(GetMoney(playerid) < 1)
  7851. {
  7852. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  7853. }
  7854. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  7855. displayCenterHUDInfo(playerid, "~r~Koolaid~w~ purchased!~n~type ~y~/usesoda~w~ to use, LMB to drink, press F to drop.", 8); //display for 8 seconds
  7856. GiveMoney(playerid, -1);
  7857. BizInfo[biz][bTill] += 2;
  7858. BizInfo[biz][bProducts] -= 1;
  7859. }
  7860. else if(strcmp(inputtext, "3", true) == 0) //Largo Combo
  7861. {
  7862. if(boughtFoodTimer[playerid])
  7863. {
  7864. return SendClientMessage(playerid, COLOR_GREY, "You must wait 1 minute before buying another Meal.");
  7865. }
  7866. if(GetMoney(playerid) < 25)
  7867. {
  7868. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  7869. }
  7870. if(hasFoodTray[playerid])
  7871. {
  7872. return SendClientMessage(playerid, COLOR_GREY, "You are already holding a meal, type /preparefood then type /eat to eat it.");
  7873. }
  7874. format(str, sizeof(str), "* %s has bought a Meat Stack Meal.", PlayerICName(playerid));
  7875. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7876. displayCenterHUDInfo(playerid, "~r~Meat Stack Meal~w~ purchased!~n~type ~y~/preparefood~w~ to prepare your meal~n~~w~then ~y~/eat~w~ to eat it.", 8); //display for 8 seconds
  7877. hasFoodTray[playerid] = 3; //burgershot
  7878. givePlayerFoodTray(playerid, hasFoodTray[playerid]);
  7879. GiveMoney(playerid, -25);
  7880. BizInfo[biz][bTill] += 2;
  7881. BizInfo[biz][bProducts] -= 1;
  7882. SetTimerEx("boughtFood", 60 *1000, 0, "i", playerid); //1 minute
  7883. boughtFoodTimer[playerid] = true;
  7884. }
  7885. else if(strcmp(inputtext, "4", true) == 0) //Medium Combo
  7886. {
  7887. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  7888. }
  7889. else if(strcmp(inputtext, "5", true) == 0) //Small Combo
  7890. {
  7891. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  7892. }
  7893. else if(strcmp(inputtext, "6", true) == 0) //Salad Meal
  7894. {
  7895. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  7896. }
  7897. if(BizInfo[biz][bProducts] <= 0) SetNoProductsDate(biz);
  7898. }
  7899. }
  7900. return 1;
  7901. }
  7902. if(dialogid == 71) //cluckin bell
  7903. {
  7904. if(response)
  7905. {
  7906. new biz = GetPlayerVirtualWorld(playerid);
  7907. if(strlen(inputtext))
  7908. {
  7909. if(!IsNumeric(inputtext))
  7910. {
  7911. return SendClientMessage(playerid, COLOR_GREY, "You must type a number.");
  7912. }
  7913. if(strcmp(inputtext, "1", true) == 0) //Sprunk
  7914. {
  7915. if(GetMoney(playerid) < 2)
  7916. {
  7917. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  7918. }
  7919. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  7920. displayCenterHUDInfo(playerid, "~r~Sprunk~w~ purchased!~n~type ~y~/usesoda~w~ to use, LMB to drink, press F to drop.", 8); //display for 8 seconds
  7921. GiveMoney(playerid, -2);
  7922. BizInfo[biz][bTill] += 2;
  7923. BizInfo[biz][bProducts] -= 1;
  7924. }
  7925. else if(strcmp(inputtext, "2", true) == 0) //Koolaid
  7926. {
  7927. if(GetMoney(playerid) < 1)
  7928. {
  7929. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  7930. }
  7931. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  7932. displayCenterHUDInfo(playerid, "~r~Koolaid~w~ purchased!~n~type ~y~/usesoda~w~ to use, LMB to drink, press F to drop.", 8); //display for 8 seconds
  7933. GiveMoney(playerid, -1);
  7934. BizInfo[biz][bTill] += 2;
  7935. BizInfo[biz][bProducts] -= 1;
  7936. }
  7937. else if(strcmp(inputtext, "3", true) == 0) //Largo Combo
  7938. {
  7939. if(boughtFoodTimer[playerid])
  7940. {
  7941. return SendClientMessage(playerid, COLOR_GREY, "You must wait 1 minute before buying another Meal.");
  7942. }
  7943. if(GetMoney(playerid) < 25)
  7944. {
  7945. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  7946. }
  7947. if(hasFoodTray[playerid])
  7948. {
  7949. return SendClientMessage(playerid, COLOR_GREY, "You are already holding a meal, type /preparefood then type /eat to eat it.");
  7950. }
  7951. format(str, sizeof(str), "* %s has bought a Cluckin' Huge Meal.", PlayerICName(playerid));
  7952. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7953. displayCenterHUDInfo(playerid, "~r~Cluckin' Huge Meal~w~ purchased!~n~type ~y~/preparefood~w~ to prepare your meal~n~~w~then ~y~/eat~w~ to eat it.", 8); //display for 8 seconds
  7954. hasFoodTray[playerid] = 2; //chicken
  7955. givePlayerFoodTray(playerid, hasFoodTray[playerid]);
  7956. GiveMoney(playerid, -25);
  7957. BizInfo[biz][bTill] += 2;
  7958. BizInfo[biz][bProducts] -= 1;
  7959. SetTimerEx("boughtFood", 60 *1000, 0, "i", playerid); //1 minute
  7960. boughtFoodTimer[playerid] = true;
  7961. }
  7962. else if(strcmp(inputtext, "4", true) == 0) //Medium Combo
  7963. {
  7964. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  7965. }
  7966. else if(strcmp(inputtext, "5", true) == 0) //Small Combo
  7967. {
  7968. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  7969. }
  7970. else if(strcmp(inputtext, "6", true) == 0) //Salad Meal
  7971. {
  7972. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  7973. }
  7974. if(BizInfo[biz][bProducts] <= 0)
  7975. {
  7976. SetNoProductsDate(biz);
  7977. }
  7978. }
  7979. }
  7980. return 1;
  7981. }
  7982. if(dialogid == 72) //pizza stack
  7983. {
  7984. if(response)
  7985. {
  7986. new biz = GetPlayerVirtualWorld(playerid);
  7987. if(strlen(inputtext))
  7988. {
  7989. if(!IsNumeric(inputtext))
  7990. {
  7991. return SendClientMessage(playerid, COLOR_GREY, "You must type a number.");
  7992. }
  7993. if(strcmp(inputtext, "1", true) == 0) //Sprunk
  7994. {
  7995. if(GetMoney(playerid) < 2)
  7996. {
  7997. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  7998. }
  7999. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  8000. displayCenterHUDInfo(playerid, "~r~Sprunk~w~ purchased!~n~type ~y~/usesoda~w~ to use, LMB to drink, press F to drop.", 8); //display for 8 seconds
  8001. GiveMoney(playerid, -2);
  8002. BizInfo[biz][bTill] += 2;
  8003. BizInfo[biz][bProducts] -= 1;
  8004. }
  8005. else if(strcmp(inputtext, "2", true) == 0) //Lemonade
  8006. {
  8007. if(GetMoney(playerid) < 1)
  8008. {
  8009. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  8010. }
  8011. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  8012. displayCenterHUDInfo(playerid, "~r~Lemonade~w~ purchased!~n~type ~y~/usesoda~w~ to use, LMB to drink, press F to drop.", 8); //display for 8 seconds
  8013. GiveMoney(playerid, -1);
  8014. BizInfo[biz][bTill] += 2;
  8015. BizInfo[biz][bProducts] -= 1;
  8016. }
  8017. else if(strcmp(inputtext, "3", true) == 0) //Pizza Take Out
  8018. {
  8019. if(boughtFoodTimer[playerid])
  8020. {
  8021. return SendClientMessage(playerid, COLOR_GREY, "You must wait 1 minute before buying another Meal.");
  8022. }
  8023. if(GetMoney(playerid) < 100)
  8024. {
  8025. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  8026. }
  8027. if(hasFoodTray[playerid])
  8028. {
  8029. return SendClientMessage(playerid, COLOR_GREY, "You are already holding a meal, type /preparefood then type /eat to eat it.");
  8030. }
  8031. format(str, sizeof(str), "* %s has bought a Pizza Take Out Meal.", PlayerICName(playerid));
  8032. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  8033. displayCenterHUDInfo(playerid, "~r~Pizza Take Out Meal~w~ purchased!~n~type ~y~/preparefood~w~ to prepare your meal~n~~w~then ~y~/eat~w~ to eat it.", 8); //display for 8 seconds
  8034. hasFoodTray[playerid] = 1; //pizza
  8035. givePlayerFoodTray(playerid, hasFoodTray[playerid]);
  8036. GiveMoney(playerid, -100);
  8037. BizInfo[biz][bTill] += 2;
  8038. BizInfo[biz][bProducts] -= 1;
  8039. SetTimerEx("boughtFood", 60 *1000, 0, "i", playerid); //1 minute
  8040. boughtFoodTimer[playerid] = true;
  8041. }
  8042. else if(strcmp(inputtext, "4", true) == 0) //Full Rack
  8043. {
  8044. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  8045. }
  8046. else if(strcmp(inputtext, "5", true) == 0) //Double D-Luxe
  8047. {
  8048. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  8049. }
  8050. else if(strcmp(inputtext, "6", true) == 0) //Buster
  8051. {
  8052. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  8053. }
  8054. else if(strcmp(inputtext, "7", true) == 0) //Salad Meal
  8055. {
  8056. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  8057. }
  8058. if(BizInfo[biz][bProducts] <= 0)
  8059. {
  8060. SetNoProductsDate(biz);
  8061. }
  8062. }
  8063. }
  8064. return 1;
  8065. }
  8066. if(dialogid == 75) // Product Dealer
  8067. {
  8068. if(response)
  8069. {
  8070. DisplayDialogForPlayer(playerid, 74);
  8071. return 1;
  8072. }
  8073. return 1;
  8074. }
  8075. if(dialogid == 74) // Product Dealer
  8076. {
  8077. if(response)
  8078. {
  8079. DisplayDialogForPlayer(playerid, 75);
  8080. return 1;
  8081. }
  8082. return 1;
  8083. }
  8084. if(dialogid == 76) //sex shop
  8085. {
  8086. if(response)
  8087. {
  8088. new biz = GetPlayerVirtualWorld(playerid);
  8089. if(BizInfo[biz][bProducts] <= 0)
  8090. return SendClientMessage(playerid, COLOR_GREY, "This business doesn't have any products left.");
  8091. if(listitem == 0) //nitestick
  8092. {
  8093. if(PlayerInfo[playerid][pCash] >= 7000)
  8094. {
  8095. GiveMoney(playerid, -7000);
  8096. BizInfo[biz][bTill] += 7000;
  8097. BizInfo[biz][bProducts] -= 1;
  8098. GivePlayerGun(playerid, 3);
  8099. format(str, sizeof(str), "~r~-$%d", 7000);
  8100. GameTextForPlayer(playerid, str, 5000, 1);
  8101. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8102. displayCenterHUDInfo(playerid, "~r~Nitestick~w~ purchased!~n~enjoy.", 8); //display for 8 seconds
  8103. }
  8104. else
  8105. {
  8106. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8107. }
  8108. }
  8109. if(listitem == 1) //condom
  8110. {
  8111. if(PlayerInfo[playerid][pCash] > 25)
  8112. {
  8113. GiveMoney(playerid, -25);
  8114. BizInfo[biz][bTill] += 25;
  8115. BizInfo[biz][bProducts] -= 1;
  8116. Condom[playerid] ++;
  8117. format(str, sizeof(str), "~r~-$%d", 25);
  8118. GameTextForPlayer(playerid, str, 5000, 1);
  8119. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8120. displayCenterHUDInfo(playerid, "~r~Condom~w~ purchased!~n~~y~Condoms~w~ will automatically be used when you have sex.", 8); //display for 8 seconds
  8121. }
  8122. else
  8123. {
  8124. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8125. }
  8126. }
  8127. if(listitem == 2) //dildo
  8128. {
  8129. if(PlayerInfo[playerid][pCash] >= 1000)
  8130. {
  8131. GiveMoney(playerid, -1000);
  8132. BizInfo[biz][bTill] += 1000;
  8133. BizInfo[biz][bProducts] -= 1;
  8134. GivePlayerGun(playerid, 10);
  8135. format(str, sizeof(str), "~r~-$%d", 1000);
  8136. GameTextForPlayer(playerid, str, 5000, 1);
  8137. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8138. displayCenterHUDInfo(playerid, "~r~Purple Dildo~w~ purchased!~n~enjoy.", 8); //display for 8 seconds
  8139. }
  8140. else
  8141. {
  8142. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8143. }
  8144. }
  8145. if(listitem == 3) //vibrator
  8146. {
  8147. if(PlayerInfo[playerid][pCash] >= 3000)
  8148. {
  8149. GiveMoney(playerid, -3000);
  8150. BizInfo[biz][bTill] += 3000;
  8151. BizInfo[biz][bProducts] -= 1;
  8152. GivePlayerGun(playerid, 13);
  8153. format(str, sizeof(str), "~r~-$%d", 3000);
  8154. GameTextForPlayer(playerid, str, 5000, 1);
  8155. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8156. displayCenterHUDInfo(playerid, "~r~Vibrator~w~ purchased!~n~enjoy.", 8); //display for 8 seconds
  8157. }
  8158. else
  8159. {
  8160. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8161. }
  8162. }
  8163. if(listitem == 4) //small white vibrator
  8164. {
  8165. if(PlayerInfo[playerid][pCash] >= 5000)
  8166. {
  8167. GiveMoney(playerid, -5000);
  8168. BizInfo[biz][bTill] += 5000;
  8169. BizInfo[biz][bProducts] -= 1;
  8170. GivePlayerGun(playerid, 11);
  8171. format(str, sizeof(str), "~r~-$%d", 5000);
  8172. GameTextForPlayer(playerid, str, 5000, 1);
  8173. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8174. displayCenterHUDInfo(playerid, "~r~Small White Vibrator~w~ purchased!~n~enjoy.", 8); //display for 8 seconds
  8175. }
  8176. else
  8177. {
  8178. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8179. }
  8180. }
  8181. if(listitem == 5) //large white vibrator
  8182. {
  8183. if(PlayerInfo[playerid][pCash] >= 7500)
  8184. {
  8185. GiveMoney(playerid, -7500);
  8186. BizInfo[biz][bTill] += 7500;
  8187. BizInfo[biz][bProducts] -= 1;
  8188. GivePlayerGun(playerid, 12);
  8189. format(str, sizeof(str), "~r~-$%d", 7500);
  8190. GameTextForPlayer(playerid, str, 5000, 1);
  8191. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8192. displayCenterHUDInfo(playerid, "~r~Large White Vibrator~w~ purchased!~n~enjoy.", 8); //display for 8 seconds
  8193. }
  8194. else
  8195. {
  8196. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8197. }
  8198. }
  8199. if(listitem == 6) //camera
  8200. {
  8201. if(PlayerInfo[playerid][pCash] >= 10000)
  8202. {
  8203. GiveMoney(playerid, -10000);
  8204. BizInfo[biz][bTill] += 10000;
  8205. BizInfo[biz][bProducts] -= 1;
  8206. GivePlayerGun(playerid, 43);
  8207. format(str, sizeof(str), "~r~-$%d", 10000);
  8208. GameTextForPlayer(playerid, str, 5000, 1);
  8209. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8210. displayCenterHUDInfo(playerid, "~r~Camera~w~ purchased!~n~enjoy.", 8); //display for 8 seconds
  8211. }
  8212. else
  8213. {
  8214. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8215. }
  8216. }
  8217. if(listitem == 7) //gag
  8218. {
  8219. if(PlayerInfo[playerid][pGag] >= 3)
  8220. return SendClientMessage(playerid, COLOR_GREY, "You already have 3 gags.");
  8221. if(PlayerInfo[playerid][pCash] >= 15000)
  8222. {
  8223. GiveMoney(playerid, -15000);
  8224. BizInfo[biz][bTill] += 15000;
  8225. BizInfo[biz][bProducts] -= 1;
  8226. format(str, sizeof(str), "~r~-$%d", 15000);
  8227. GameTextForPlayer(playerid, str, 5000, 1);
  8228. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8229. displayCenterHUDInfo(playerid, "~r~Gag~w~ purchased!~n~enjoy.", 8); //display for 8 seconds
  8230. PlayerInfo[playerid][pGag]++;
  8231. }
  8232. else
  8233. {
  8234. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8235. }
  8236. }
  8237. if(BizInfo[biz][bProducts] <= 0) SetNoProductsDate(biz);
  8238. }
  8239. return 1;
  8240. }
  8241. if(dialogid == 77) //buy clothes
  8242. {
  8243. if(response)
  8244. {
  8245. if(!IsAtClothShop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not at a clothes shop.");
  8246. new biz = GetPlayerVirtualWorld(playerid);
  8247. if(!IsNumeric(inputtext))
  8248. {
  8249. SendClientMessage(playerid, COLOR_GREY, "You must enter a number for the skin ID.");
  8250. return 1;
  8251. }
  8252. if((strval(inputtext) == 294 && PlayerInfo[playerid][pDonateRank] == 0) ||
  8253. (strval(inputtext) == 295 && PlayerInfo[playerid][pDonateRank] == 0) ||
  8254. (strval(inputtext) == 167) ||
  8255. (strval(inputtext) == 0) ||
  8256. (strval(inputtext) >= 265 && strval(inputtext) <= 267) ||
  8257. (strval(inputtext) == 165) ||
  8258. (strval(inputtext) == 166) ||
  8259. (strval(inputtext) >= 280 && strval(inputtext) <= 288) ||
  8260. (strval(inputtext) >= 274 && strval(inputtext) <= 279) ||
  8261. (strval(inputtext) >= 163 && strval(inputtext) <= 166) ||
  8262. (strval(inputtext) >= 268 && strval(inputtext) <= 271) ||
  8263. (strval(inputtext) == 296) ||
  8264. (strval(inputtext) == 71)) return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this skin.");
  8265. new skin = strval(inputtext);
  8266. if(skin < 0 || skin > 311) return SendClientMessage(playerid, COLOR_GREY, "Skin can't be below 0 or above 311.");
  8267. PlayerTextDrawDestroy(playerid, pModel_t[playerid]);
  8268. pModelState[playerid] = 999;
  8269. pModel_t[playerid] = CreatePlayerTextDraw(playerid, 220.0, 250.0, "_");
  8270. PlayerTextDrawFont(playerid, pModel_t[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
  8271. PlayerTextDrawTextSize(playerid, pModel_t[playerid], 200.0, 200.0);
  8272. PlayerTextDrawSetPreviewModel(playerid, pModel_t[playerid], skin);
  8273. PlayerTextDrawUseBox(playerid, pModel_t[playerid], 0);
  8274. PlayerTextDrawBackgroundColor(playerid, pModel_t[playerid], 0x00000000);
  8275. PlayerTextDrawShow(playerid, pModel_t[playerid]);
  8276. pModelState[playerid] = 2;
  8277. pModelRot[playerid][0] = 0;
  8278. pModelRot[playerid][1] = 0;
  8279. pModelRot[playerid][2] = 0;
  8280. pModelTimer[playerid] = SetTimerEx("UpdatePreviewModel", 1000, 1, "i", playerid);
  8281. ShowPlayerDialog(playerid, 771, DIALOG_STYLE_MSGBOX, "Are you sure?", "Are you sure you would like to buy this skin for $500?\n\n{F5DA81}NOTE: Below is a preview of the skin.", "Purchase", "Cancel");
  8282. SetPVarInt(playerid, "buyskinbincobiz", biz);
  8283. SetPVarInt(playerid, "buyskinbinco", skin);
  8284. return 1;
  8285. }
  8286. return 1;
  8287. }
  8288. if(dialogid == 771)
  8289. {
  8290. new skin = GetPVarInt(playerid, "buyskinbinco");
  8291. if(isRestrictedModel(skin))
  8292. {
  8293. SendClientMessage(playerid, COLOR_GREY, "* You have been caught attempting to exploit.");
  8294. SendClientMessage(playerid, COLOR_GREY, "* Exploiting is against the server rules, please don't do it.");
  8295. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has attempted to buy a restricted skin.", PlayerName(playerid));
  8296. ABroadCast(COLOR_WHITE, str, 1);
  8297. return 1;
  8298. }
  8299. new biz = GetPVarInt(playerid, "buyskinbincobiz");
  8300. PlayerTextDrawDestroy(playerid, pModel_t[playerid]);
  8301. pModelState[playerid] = 999;
  8302. if(!response)
  8303. {
  8304. DeletePVar(playerid, "buyskinbinco");
  8305. DeletePVar(playerid, "buyskinbincobiz");
  8306. return 1;
  8307. }
  8308. else
  8309. {
  8310. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You bought a new set of clothes for $1000.");
  8311. GiveMoney(playerid, -1000);
  8312. BizInfo[biz][bTill] += 1000;
  8313. BizInfo[biz][bProducts] -= 1;
  8314. SetPlayerSkin(playerid, skin);
  8315. PlayerInfo[playerid][pClothes] = 0;
  8316. PlayerInfo[playerid][pModel] = skin;
  8317. DeletePVar(playerid, "buyskinbinco");
  8318. DeletePVar(playerid, "buyskinbincobiz");
  8319. }
  8320. if(BizInfo[biz][bProducts] <= 0)
  8321. {
  8322. SetNoProductsDate(biz);
  8323. }
  8324. return 1;
  8325. }
  8326. if(dialogid == 78) //admin authorization
  8327. {
  8328. if(gAdminAuthorized[playerid] == 1)
  8329. {
  8330. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Your admin account has already been authorized.");
  8331. return 1;
  8332. }
  8333. if(response)
  8334. {
  8335. if(!strlen(inputtext))
  8336. {
  8337. DisplayDialogForPlayer(playerid, 78); //admin authorization
  8338. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You must enter your security code.");
  8339. return 1;
  8340. }
  8341. if(strlen(inputtext) >= 50)
  8342. {
  8343. DisplayDialogForPlayer(playerid, 78); //admin authorization
  8344. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Security code is too long.");
  8345. return 0;
  8346. }
  8347. if(PlayerInfo[playerid][pSecKey] != strval(inputtext))
  8348. {
  8349. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Security Key does not match. You have been kicked as a result.");
  8350. KickEx(playerid);
  8351. return 1;
  8352. }
  8353. else
  8354. {
  8355. gAdminAuthorized[playerid] = 1;
  8356. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Your admin account has successfully been authorized.");
  8357. if(!strmatch(adminMOTD, "None"))
  8358. {
  8359. format(str, sizeof(str), "Admin MOTD: %s", adminMOTD);
  8360. SendClientMessage(playerid, COLOR_YELLOW, str);
  8361. }
  8362. }
  8363. }
  8364. else
  8365. {
  8366. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You have left the server.");
  8367. KickEx(playerid);
  8368. }
  8369. return 1;
  8370. }
  8371. if(dialogid == 79) // Help
  8372. {
  8373. if(response)
  8374. {
  8375. if(listitem == 0) // Account
  8376. {
  8377. new hstr[1024];
  8378. format(hstr, sizeof(hstr), "{007BD0}Account Help:{B4B5B7}\n", hstr);
  8379. format(hstr, sizeof(hstr), "%sThe following commands are related to your player account:\n", hstr);
  8380. format(hstr, sizeof(hstr), "%s\n{007BD0}/stats{B4B5B7} - Displays your player statistics, such as your level/money/job/faction.", hstr);
  8381. format(hstr, sizeof(hstr), "%s\n{007BD0}/skills{B4B5B7} - Displays your job skill levels, these are seperate from your main level and can be leveled by doing jobs.", hstr);
  8382. format(hstr, sizeof(hstr), "%s\n{007BD0}/buylevel{B4B5B7} - Upgrades your main level, leveling up means higher paychecks and offers many perks.", hstr);
  8383. format(hstr, sizeof(hstr), "%s\n{007BD0}/upgrade{B4B5B7} - Gives your account special perks such as higher spawn health/armor.", hstr);
  8384. format(hstr, sizeof(hstr), "%s\n{007BD0}/changepass{B4B5B7} - Changes your login password, do not to use the same password on other servers.", hstr);
  8385. ShowPlayerDialog(playerid, 80, DIALOG_STYLE_MSGBOX, "Account", hstr, "Ok", "Back");
  8386. return 1;
  8387. }
  8388. if(listitem == 1) // General
  8389. {
  8390. new hstr[4000];
  8391. format(hstr, sizeof(hstr), "{007BD0}General Help:{B4B5B7}\n", hstr);
  8392. format(hstr, sizeof(hstr), "%sThe following commands are general commands:\n", hstr);
  8393. format(hstr, sizeof(hstr), "%s\n{007BD0}/pay{B4B5B7} - Pay money to another player.", hstr);
  8394. format(hstr, sizeof(hstr), "%s\n{007BD0}/wiretransfer{B4B5B7} - Transfer money to another players bank account.", hstr);
  8395. format(hstr, sizeof(hstr), "%s\n{007BD0}/(ad)vertise{B4B5B7} - Creates an advertisment for the whole server (useful for buying or selling something).", hstr);
  8396. format(hstr, sizeof(hstr), "%s\n{007BD0}/give{B4B5B7} - Gives something to another player.", hstr);
  8397. format(hstr, sizeof(hstr), "%s\n{007BD0}/drop{B4B5B7} - Lets you drop things, such as weapons, drugs.", hstr);
  8398. format(hstr, sizeof(hstr), "%s\n{007BD0}/get{B4B5B7} - Lets you pickup things which have been dropped.", hstr);
  8399. //format(hstr, sizeof(hstr), "%s\n{007BD0}/pickpocket{B4B5B7} - Steal things from other players, useful if you are roleplaying a thief.", hstr);
  8400. format(hstr, sizeof(hstr), "%s\n{007BD0}/tie{B4B5B7} - Ties up a player (you must be driving and they must be in your vehicle).", hstr);
  8401. format(hstr, sizeof(hstr), "%s\n{007BD0}/untie{B4B5B7} - Unties a player, a player will automatically untie after 5 minutes of using /tie.", hstr);
  8402. format(hstr, sizeof(hstr), "%s\n{007BD0}/blindfold{B4B5B7} - Lets you blindfold another player, preventing them from seeing anything.", hstr);
  8403. format(hstr, sizeof(hstr), "%s\n{007BD0}/unblindfold{B4B5B7} - Removes a blindfold from a player.", hstr);
  8404. format(hstr, sizeof(hstr), "%s\n{007BD0}/frisk{B4B5B7} - Frisks a player to show you what they are carrying.", hstr);
  8405. format(hstr, sizeof(hstr), "%s\n{007BD0}/time{B4B5B7} - Displays current server time, when used in jail it will display your remaining jail time.", hstr);
  8406. format(hstr, sizeof(hstr), "%s\n{007BD0}/eat{B4B5B7} - Eats from a foodtray.", hstr);
  8407. format(hstr, sizeof(hstr), "%s\n{007BD0}/animlist{B4B5B7} - Displays a list of animations (useful for roleplaying).", hstr);
  8408. format(hstr, sizeof(hstr), "%s\n{007BD0}/contract{B4B5B7} - Places a hit on someone, when a hitman kills them they lose half of the contract price.", hstr);
  8409. format(hstr, sizeof(hstr), "%s\n{007BD0}/flipcoin{B4B5B7} - Flips a coin.", hstr);
  8410. format(hstr, sizeof(hstr), "%s\n{007BD0}/rules{B4B5B7} - Shows the rules of the server.", hstr);
  8411. format(hstr, sizeof(hstr), "%s\n{007BD0}/breakin{B4B5B7} - Used to break in to houses, businesses and player owned vehicles.", hstr);
  8412. format(hstr, sizeof(hstr), "%s\n{007BD0}/id{B4B5B7} - Displays a players id, name, ping.", hstr);
  8413. format(hstr, sizeof(hstr), "%s\n{007BD0}/cancel{B4B5B7} - Can be used to cancel offers or things that another player might be offering you.", hstr);
  8414. format(hstr, sizeof(hstr), "%s\n{007BD0}/kill{B4B5B7} - Sends you on a trip to hospital.", hstr);
  8415. format(hstr, sizeof(hstr), "%s\n{007BD0}/eject{B4B5B7} - Ejects a player from your vehicle if you are the driver.", hstr);
  8416. format(hstr, sizeof(hstr), "%s\n{007BD0}/carradio{B4B5B7} - Changes the car radio.", hstr);
  8417. format(hstr, sizeof(hstr), "%s\n{007BD0}/hood{B4B5B7} - Open/close the hood of a vehicle.", hstr);
  8418. format(hstr, sizeof(hstr), "%s\n{007BD0}/trunk{B4B5B7} - Open/close the trunk of a vehicle.", hstr);
  8419. format(hstr, sizeof(hstr), "%s\n{007BD0}/lights{B4B5B7} - Turns the lights off/on on any vehicle.", hstr);
  8420. format(hstr, sizeof(hstr), "%s\n{007BD0}/admins{B4B5B7} - Displays a list of admins online.", hstr);
  8421. format(hstr, sizeof(hstr), "%s\n{007BD0}/report{B4B5B7} - Sends a message to any admins.", hstr);
  8422. format(hstr, sizeof(hstr), "%s\n{007BD0}/helpers{B4B5B7} - Displays a list of helpers online.", hstr);
  8423. format(hstr, sizeof(hstr), "%s\n{007BD0}/helpme{B4B5B7} - Sends a message to any helpers.", hstr);
  8424. format(hstr, sizeof(hstr), "%s\n{007BD0}/clearmychat{B4B5B7} - Clear your own chat.", hstr);
  8425. format(hstr, sizeof(hstr), "%s\n{007BD0}/usedrug{B4B5B7} - Uses the specified drug..", hstr);
  8426. format(hstr, sizeof(hstr), "%s\n{007BD0}/sex{B4B5B7} - Offer to have sex with another player.", hstr);
  8427. format(hstr, sizeof(hstr), "%s\n{007BD0}/service{B4B5B7} - Contact the local services (EMS, Mechanic, Police)", hstr);
  8428. format(hstr, sizeof(hstr), "%s\n{007BD0}/points{B4B5B7} - Displays a list of capturable businesses, gangs who control them get money when they're used.", hstr);
  8429. format(hstr, sizeof(hstr), "%s\n{007BD0}/families{B4B5B7} - Displays a list of gangs online.", hstr);
  8430. format(hstr, sizeof(hstr), "%s\n{007BD0}/pickweed{B4B5B7} - Pick from a weed plant.", hstr);
  8431. format(hstr, sizeof(hstr), "%s\n{007BD0}/checkweed{B4B5B7} - Shows how much weed a weed plant has produced.", hstr);
  8432. format(hstr, sizeof(hstr), "%s\n{007BD0}/getdrink{B4B5B7} - Allows you to purchase a drink.", hstr);
  8433. format(hstr, sizeof(hstr), "%s\n{007BD0}/requestnewbieunmute{B4B5B7} - Request an unmute from the newbie chat channel.", hstr);
  8434. format(hstr, sizeof(hstr), "%s\n{007BD0}/requestadunmute{B4B5B7} - Request an unmute from the advertisement system.", hstr);
  8435. //format(hstr, sizeof(hstr), "%s\n{007BD0}/cancelreport{B4B5B7} - Cancel your current active report.", hstr);
  8436. format(hstr, sizeof(hstr), "%s\n{007BD0}/inmates{B4B5B7} - Check who is in the IC prison.", hstr);
  8437. format(hstr, sizeof(hstr), "%s\n{007BD0}/blocknumber{B4B5B7} - Block a number from calling/SMS'ing you.", hstr);
  8438. format(hstr, sizeof(hstr), "%s\n{007BD0}/unblocknumber{B4B5B7} - Unblock a number you have previously stopped from calling/SMS'ing you.", hstr);
  8439. format(hstr, sizeof(hstr), "%s\n{007BD0}/blocklist{B4B5B7} - View a list of all number you have blocked.", hstr);
  8440. format(hstr, sizeof(hstr), "%s\n{007BD0}/factions{B4B5B7} - View a list of all factions, and how many members are online.", hstr);
  8441. format(hstr, sizeof(hstr), "%s\n{007BD0}/lightfire{B4B5B7} - Light a camp fire.", hstr);
  8442. format(hstr, sizeof(hstr), "%s\n{007BD0}/putoutfire{B4B5B7} - Put out your camp fire.", hstr);
  8443. format(hstr, sizeof(hstr), "%s\n{007BD0}/removebug{B4B5B7} - Removes a surveillance bug from another player.", hstr);
  8444. ShowPlayerDialog(playerid, 81, DIALOG_STYLE_MSGBOX, "General", hstr, "Ok", "Back");
  8445. return 1;
  8446. }
  8447. if(listitem == 2) // Chat
  8448. {
  8449. new hstr[1024];
  8450. format(hstr, sizeof(hstr), "{007BD0}Chat Help:{B4B5B7}\n", hstr);
  8451. format(hstr, sizeof(hstr), "%sThe following commands are related to interaction or chat:\n", hstr);
  8452. format(hstr, sizeof(hstr), "%s\n{007BD0}/me{B4B5B7} - For performing actions in character.", hstr);
  8453. format(hstr, sizeof(hstr), "%s\n{007BD0}/do{B4B5B7} - For performing actions in character.", hstr);
  8454. format(hstr, sizeof(hstr), "%s\n{007BD0}/whisper{B4B5B7} - Whispers to other players in range.", hstr);
  8455. format(hstr, sizeof(hstr), "%s\n{007BD0}(/o)oc{B4B5B7} - Speaks in the global out of character chat channel.", hstr);
  8456. format(hstr, sizeof(hstr), "%s\n{007BD0}(/s)hout{B4B5B7} - Speaks at a bigger range.", hstr);
  8457. format(hstr, sizeof(hstr), "%s\n{007BD0}(/l)ow{B4B5B7} - Speaks at a smaller range.", hstr);
  8458. format(hstr, sizeof(hstr), "%s\n{007BD0}/b{B4B5B7} - This is for speaking out of character locally.", hstr);
  8459. format(hstr, sizeof(hstr), "%s\n{007BD0}/intercom{B4B5B7} - Speaks to passengers if you are using a vehicle with an intercom (shamal/cargobob).", hstr);
  8460. format(hstr, sizeof(hstr), "%s\n{007BD0}/speakerphone{B4B5B7} - Allows you to turn on the phones speaker while taking a call.", hstr);
  8461. ShowPlayerDialog(playerid, 82, DIALOG_STYLE_MSGBOX, "Chat", hstr, "Ok", "Back");
  8462. return 1;
  8463. }
  8464. if(listitem == 3) // Toggle
  8465. {
  8466. new hstr[1024];
  8467. format(hstr, sizeof(hstr), "{007BD0}Toggle Help:{B4B5B7}\n", hstr);
  8468. format(hstr, sizeof(hstr), "%sThe following commands are for toggling things on or off:\n", hstr);
  8469. format(hstr, sizeof(hstr), "%s\n{007BD0}/togooc{B4B5B7} - Toggles on/off the global out of character chat.", hstr);
  8470. format(hstr, sizeof(hstr), "%s\n{007BD0}/tognewbie{B4B5B7} - Toggles on/off the newbie chat.", hstr);
  8471. format(hstr, sizeof(hstr), "%s\n{007BD0}/togfam{B4B5B7} - Toggles on/off the family chat.", hstr);
  8472. format(hstr, sizeof(hstr), "%s\n{007BD0}/togwhisper{B4B5B7} - Toggles on/off whisper chat.", hstr);
  8473. format(hstr, sizeof(hstr), "%s\n{007BD0}/togphone{B4B5B7} - Toggles on/off your cellphone.", hstr);
  8474. format(hstr, sizeof(hstr), "%s\n{007BD0}/togwt{B4B5B7} - Toggles on/off walkie talkie chat.", hstr);
  8475. format(hstr, sizeof(hstr), "%s\n{007BD0}/toghelper{B4B5B7} - Toggles on/off helper chat.", hstr);
  8476. format(hstr, sizeof(hstr), "%s\n{007BD0}/togfl{B4B5B7} - Toggles on/off faction leader chat.", hstr);
  8477. format(hstr, sizeof(hstr), "%s\n{007BD0}/togtester{B4B5B7} - Toggles on/off the beta tester chat.", hstr);
  8478. format(hstr, sizeof(hstr), "%s\n{007BD0}/togautochat{B4B5B7} - Toggles on/off automatic chat animations when typing on foot or in vehicles.", hstr);
  8479. format(hstr, sizeof(hstr), "%s\n{007BD0}/tognames{B4B5B7} - Toggles on/off nametags.", hstr);
  8480. format(hstr, sizeof(hstr), "%s\n{007BD0}/togradios{B4B5B7} - Toggles on/off radio streams from boomboxes and car radios.", hstr);
  8481. format(hstr, sizeof(hstr), "%s\n{007BD0}/togfuelhud{B4B5B7} - Toggles on/off the vehicle fuel hud.", hstr);
  8482. format(hstr, sizeof(hstr), "%s\n{007BD0}/togspeedhud{B4B5B7} - Toggles on/off the vehicle speed hud.", hstr);
  8483. format(hstr, sizeof(hstr), "%s\n{007BD0}/togvhealthhud{B4B5B7} - Toggles on/off the vehicle health hud.", hstr);
  8484. format(hstr, sizeof(hstr), "%s\n{007BD0}/togdept{B4B5B7} - Toggles on/off the department radio chat.", hstr);
  8485. format(hstr, sizeof(hstr), "%s\n{007BD0}/togradio{B4B5B7} - Toggles on/off the faction radio chat.", hstr);
  8486. ShowPlayerDialog(playerid, 83, DIALOG_STYLE_MSGBOX, "Toggle", hstr, "Ok", "Back");
  8487. return 1;
  8488. }
  8489. if(listitem == 4) // Bank
  8490. {
  8491. new hstr[1024];
  8492. format(hstr, sizeof(hstr), "{007BD0}Bank Help:{B4B5B7}\n", hstr);
  8493. format(hstr, sizeof(hstr), "%sThe following commands are for banking:\n", hstr);
  8494. format(hstr, sizeof(hstr), "%s\n{007BD0}/withdraw{B4B5B7} - Withdraws money from your bank account.", hstr);
  8495. format(hstr, sizeof(hstr), "%s\n{007BD0}/deposit{B4B5B7} - Deposits money to your bank account.", hstr);
  8496. format(hstr, sizeof(hstr), "%s\n{007BD0}/atm{B4B5B7} - Lets you withdraw money from atm machines.", hstr);
  8497. format(hstr, sizeof(hstr), "%s\n{007BD0}/wiretransfer{B4B5B7} - Transfers money to another persons bank account.", hstr);
  8498. ShowPlayerDialog(playerid, 84, DIALOG_STYLE_MSGBOX, "Bank", hstr, "Ok", "Back");
  8499. return 1;
  8500. }
  8501. if(listitem == 5) // Job
  8502. {
  8503. ShowPlayerDialog(playerid, DIALOG_JOBHELP, DIALOG_STYLE_LIST, "Job Help", "Detective\nLawyer\nDrug Dealer\nMechanic\nBodyguard\nArms Dealer\nBoxer\nTaxi Driver\nDrug Smuggler\nProduct Dealer\nWaste Collector\nPizza Deliver", "Ok", "Back");
  8504. return 1;
  8505. }
  8506. if(listitem == 6) // Faction
  8507. {
  8508. if(PlayerInfo[playerid][pMember] == 0)
  8509. {
  8510. ShowHelpDialog(playerid);
  8511. SendClientMessage(playerid, COLOR_GREY, "You are not a member of a Faction.");
  8512. return 1;
  8513. }
  8514. if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) // SAPD
  8515. {
  8516. new hstr[1800];
  8517. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8518. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8519. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8520. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8521. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/m)egaphone{B4B5B7} - Types a message in the megaphone.", hstr);
  8522. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/su)spect{B4B5B7} - Make a player a suspect.", hstr);
  8523. format(hstr, sizeof(hstr), "%s\n{007BD0}/SAPD{B4B5B7} - Used to go on duty.", hstr);
  8524. format(hstr, sizeof(hstr), "%s\n{007BD0}/cuff{B4B5B7} - Cuffs a player.", hstr);
  8525. format(hstr, sizeof(hstr), "%s\n{007BD0}/badge{B4B5B7} - Hide or show your badge.", hstr);
  8526. format(hstr, sizeof(hstr), "%s\n{007BD0}/detain{B4B5B7} - Detains a player.", hstr);
  8527. format(hstr, sizeof(hstr), "%s\n{007BD0}/sdtazer{B4B5B7} - Equips tazer gun.", hstr);
  8528. format(hstr, sizeof(hstr), "%s\n{007BD0}/handtazer{B4B5B7} - Equips stun weapon.", hstr);
  8529. format(hstr, sizeof(hstr), "%s\n{007BD0}/showbadge{B4B5B7} - Shows your badge to another player.", hstr);
  8530. format(hstr, sizeof(hstr), "%s\n{007BD0}/take{B4B5B7} - Takes things from another player.", hstr);
  8531. format(hstr, sizeof(hstr), "%s\n{007BD0}/ticket{B4B5B7} - Offers another player a ticket.", hstr);
  8532. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/gov)ernment{B4B5B7} - Displays a government message to the server.", hstr);
  8533. format(hstr, sizeof(hstr), "%s\n{007BD0}/deliver{B4B5B7} - Delivers a player to prison.", hstr);
  8534. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8535. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8536. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8537. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8538. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployspikes{B4B5B7} - Deploys road spikes.", hstr);
  8539. format(hstr, sizeof(hstr), "%s\n{007BD0}/deletespike(s){B4B5B7} - Deletes road spikes.", hstr);
  8540. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployroadblock{B4B5B7} - Deploys roadblock.", hstr);
  8541. format(hstr, sizeof(hstr), "%s\n{007BD0}/deleteroadblock(s){B4B5B7} - Deletes roadblocks.", hstr);
  8542. format(hstr, sizeof(hstr), "%s\n{007BD0}/opencell{B4B5B7} - Opens nearby jail cells.", hstr);
  8543. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8544. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8545. format(hstr, sizeof(hstr), "%s\n{007BD0}/pdcalls{B4B5B7} - Show a list of 911 calls that have occurred.", hstr);
  8546. format(hstr, sizeof(hstr), "%s\n{007BD0}/flashlight{B4B5B7} - Give functionality for the flashlight system.", hstr);
  8547. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8548. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8549. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Done", "Back");
  8550. return 1;
  8551. }
  8552. if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) //fbi
  8553. {
  8554. new hstr[2500];
  8555. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8556. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8557. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8558. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8559. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/m)egaphone{B4B5B7} - Types a message in the megaphone.", hstr);
  8560. format(hstr, sizeof(hstr), "%s\n{007BD0}/fbi{B4B5B7} - Used to go on duty.", hstr);
  8561. format(hstr, sizeof(hstr), "%s\n{007BD0}/fbiuc{B4B5B7} - Request a new undercover identity.", hstr);
  8562. format(hstr, sizeof(hstr), "%s\n{007BD0}/cuff{B4B5B7} - Cuffs a player.", hstr);
  8563. format(hstr, sizeof(hstr), "%s\n{007BD0}/detain{B4B5B7} - Detains a player.", hstr);
  8564. format(hstr, sizeof(hstr), "%s\n{007BD0}/sdtazer{B4B5B7} - Equips tazer gun.", hstr);
  8565. format(hstr, sizeof(hstr), "%s\n{007BD0}/handtazer{B4B5B7} - Equips stun weapon.", hstr);
  8566. format(hstr, sizeof(hstr), "%s\n{007BD0}/showbadge{B4B5B7} - Shows your badge to another player.", hstr);
  8567. format(hstr, sizeof(hstr), "%s\n{007BD0}/take{B4B5B7} - Takes things from another player.", hstr);
  8568. format(hstr, sizeof(hstr), "%s\n{007BD0}/ticket{B4B5B7} - Offers another player a ticket.", hstr);
  8569. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/gov)ernment{B4B5B7} - Displays a government message to the server.", hstr);
  8570. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8571. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8572. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8573. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8574. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployspikes{B4B5B7} - Deploys road spikes.", hstr);
  8575. format(hstr, sizeof(hstr), "%s\n{007BD0}/deletespike(s){B4B5B7} - Deletes road spikes.", hstr);
  8576. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployroadblock{B4B5B7} - Deploys roadblock.", hstr);
  8577. format(hstr, sizeof(hstr), "%s\n{007BD0}/deleteroadblock(s){B4B5B7} - Deletes roadblocks.", hstr);
  8578. format(hstr, sizeof(hstr), "%s\n{007BD0}/sate{B4B5B7} - Enables satellite mode while in a surveillance van.", hstr);
  8579. format(hstr, sizeof(hstr), "%s\n{007BD0}/badge{B4B5B7} - Hide or show your badge.", hstr);
  8580. format(hstr, sizeof(hstr), "%s\n{007BD0}/seizebiz{B4B5B7} - Shuts down a business.", hstr);
  8581. format(hstr, sizeof(hstr), "%s\n{007BD0}/opencell{B4B5B7} - Opens nearby jail cells.", hstr);
  8582. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8583. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8584. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8585. format(hstr, sizeof(hstr), "%s\n{007BD0}/plantbug{B4B5B7} - Plants a bug on a player.", hstr);
  8586. format(hstr, sizeof(hstr), "%s\n{007BD0}/removebug{B4B5B7} - Removes a surveillance bug from another player.", hstr);
  8587. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8588. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8589. return 1;
  8590. }
  8591. if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) //SASD
  8592. {
  8593. new hstr[1800];
  8594. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8595. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8596. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8597. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8598. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/m)egaphone{B4B5B7} - Types a message in the megaphone.", hstr);
  8599. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/su)spect{B4B5B7} - Make a player a suspect.", hstr);
  8600. format(hstr, sizeof(hstr), "%s\n{007BD0}/sasd{B4B5B7} - Used to go on duty.", hstr);
  8601. format(hstr, sizeof(hstr), "%s\n{007BD0}/cuff{B4B5B7} - Cuffs a player.", hstr);
  8602. format(hstr, sizeof(hstr), "%s\n{007BD0}/detain{B4B5B7} - Detains a player.", hstr);
  8603. format(hstr, sizeof(hstr), "%s\n{007BD0}/sdtazer{B4B5B7} - Equips tazer gun.", hstr);
  8604. format(hstr, sizeof(hstr), "%s\n{007BD0}/handtazer{B4B5B7} - Equips stun weapon.", hstr);
  8605. format(hstr, sizeof(hstr), "%s\n{007BD0}/showbadge{B4B5B7} - Shows your badge to another player.", hstr);
  8606. format(hstr, sizeof(hstr), "%s\n{007BD0}/take{B4B5B7} - Takes things from another player.", hstr);
  8607. format(hstr, sizeof(hstr), "%s\n{007BD0}/ticket{B4B5B7} - Offers another player a ticket.", hstr);
  8608. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/gov)ernment{B4B5B7} - Displays a government message to the server.", hstr);
  8609. format(hstr, sizeof(hstr), "%s\n{007BD0}/deliver{B4B5B7} - Delivers a player to prison.", hstr);
  8610. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8611. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8612. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8613. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8614. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployspikes{B4B5B7} - Deploys road spikes.", hstr);
  8615. format(hstr, sizeof(hstr), "%s\n{007BD0}/deletespike(s){B4B5B7} - Deletes road spikes.", hstr);
  8616. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployroadblock{B4B5B7} - Deploys roadblock.", hstr);
  8617. format(hstr, sizeof(hstr), "%s\n{007BD0}/deleteroadblock(s){B4B5B7} - Deletes roadblocks.", hstr);
  8618. format(hstr, sizeof(hstr), "%s\n{007BD0}/opencell{B4B5B7} - Opens nearby jail cells.", hstr);
  8619. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8620. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8621. format(hstr, sizeof(hstr), "%s\n{007BD0}/pdcalls{B4B5B7} - Show a list of 911 calls that have occurred.", hstr);
  8622. format(hstr, sizeof(hstr), "%s\n{007BD0}/flashlight{B4B5B7} - Give functionality for the flashlight system.", hstr);
  8623. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8624. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8625. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8626. return 1;
  8627. }
  8628. if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) // LSFMD
  8629. {
  8630. new hstr[1500];
  8631. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8632. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8633. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8634. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8635. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/m)egaphone{B4B5B7} - Types a message in the megaphone.", hstr);
  8636. format(hstr, sizeof(hstr), "%s\n{007BD0}/SAFMD{B4B5B7} - Used to go on duty.", hstr);
  8637. format(hstr, sizeof(hstr), "%s\n{007BD0}/EMScalls{B4B5B7} - Lists all injured people.", hstr);
  8638. if(!FMD_RRK_DISABLED) {
  8639. format(hstr, sizeof(hstr), "%s\n{007BD0}/getrrk{B4B5B7} - Gets a rapid response kit.", hstr);
  8640. format(hstr, sizeof(hstr), "%s\n{007BD0}/droprrk{B4B5B7} - Drops a rapid response kit.", hstr);
  8641. format(hstr, sizeof(hstr), "%s\n{007BD0}/pickrrk{B4B5B7} - Picks up a rapid response kit.", hstr);
  8642. format(hstr, sizeof(hstr), "%s\n{007BD0}/userrk{B4B5B7} - Uses a rapid response kit.", hstr);
  8643. format(hstr, sizeof(hstr), "%s\n{007BD0}/placerrk{B4B5B7} - Places a rapid response kit.", hstr);
  8644. format(hstr, sizeof(hstr), "%s\n{007BD0}/usetemprrk{B4B5B7} - Uses a temporary RRK on a person (must have one first)", hstr);
  8645. }
  8646. else {
  8647. format(hstr, sizeof(hstr), "%s\n{007BD0}/transferpatient{B4B5B7} - Transfers a patient into the hospital.", hstr);
  8648. format(hstr, sizeof(hstr), "%s\n{007BD0}/releasepatient{B4B5B7} - Releases a patient from the hospital.", hstr);
  8649. format(hstr, sizeof(hstr), "%s\n{007BD0}/morphine{B4B5B7} - Injects morphine into a patient.", hstr);
  8650. format(hstr, sizeof(hstr), "%s\n{007BD0}/checkpatient{B4B5B7} - Checks the pulse of a patient.", hstr);
  8651. }
  8652. format(hstr, sizeof(hstr), "%s\n{007BD0}/stretcher{B4B5B7} - Places a person on a stretcher.", hstr);
  8653. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8654. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8655. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8656. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8657. format(hstr, sizeof(hstr), "%s\n{007BD0}/showbadge{B4B5B7} - Shows your badge to another player.", hstr);
  8658. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8659. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8660. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8661. format(hstr, sizeof(hstr), "%s\n{007BD0}/gml{B4B5B7} - Issue a marijuana license.", hstr);
  8662. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8663. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8664. return 1;
  8665. }
  8666. if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14) // SANG
  8667. {
  8668. new hstr[1800];
  8669. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8670. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8671. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8672. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8673. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/m)egaphone{B4B5B7} - Types a message in the megaphone.", hstr);
  8674. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/gov)ernment{B4B5B7} - Displays a government message to the server.", hstr);
  8675. format(hstr, sizeof(hstr), "%s\n{007BD0}/sang{B4B5B7} - SANG lockers.", hstr);
  8676. format(hstr, sizeof(hstr), "%s\n{007BD0}/cuff{B4B5B7} - Cuffs a player.", hstr);
  8677. format(hstr, sizeof(hstr), "%s\n{007BD0}/detain{B4B5B7} - Detains a player.", hstr);
  8678. format(hstr, sizeof(hstr), "%s\n{007BD0}/sdtazer{B4B5B7} - Equips tazer gun.", hstr);
  8679. format(hstr, sizeof(hstr), "%s\n{007BD0}/handtazer{B4B5B7} - Equips stun weapon.", hstr);
  8680. format(hstr, sizeof(hstr), "%s\n{007BD0}/showbadge{B4B5B7} - Shows your badge to another player.", hstr);
  8681. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8682. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8683. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8684. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployspikes{B4B5B7} - Deploys road spikes.", hstr);
  8685. format(hstr, sizeof(hstr), "%s\n{007BD0}/deletespike(s){B4B5B7} - Deletes road spikes.", hstr);
  8686. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployroadblock{B4B5B7} - Deploys roadblock.", hstr);
  8687. format(hstr, sizeof(hstr), "%s\n{007BD0}/deleteroadblock(s){B4B5B7} - Deletes roadblocks.", hstr);
  8688. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8689. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8690. format(hstr, sizeof(hstr), "%s\n{007BD0}/registerprisoner{B4B5B7} - Register prisoner.", hstr);
  8691. format(hstr, sizeof(hstr), "%s\n{007BD0}/prisonlist{B4B5B7} - List prisoner.", hstr);
  8692. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8693. return 1;
  8694. }
  8695. if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6) //Senate
  8696. {
  8697. new hstr[1536];
  8698. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8699. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8700. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/gov)ernment{B4B5B7} - Public Service Announcement.", hstr);
  8701. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8702. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8703. format(hstr, sizeof(hstr), "%s\n{007BD0}/setbadgenumber{B4B5B7} - Setup your badge number.", hstr);
  8704. format(hstr, sizeof(hstr), "%s\n{007BD0}/govlocker{B4B5B7} - Used to go on duty.", hstr);
  8705. format(hstr, sizeof(hstr), "%s\n{007BD0}/settax{B4B5B7} - Sets the income tax.", hstr);
  8706. format(hstr, sizeof(hstr), "%s\n{007BD0}/taxwithdraw{B4B5B7} - Withdraws money from the treasury.", hstr);
  8707. format(hstr, sizeof(hstr), "%s\n{007BD0}/facdeposit{B4B5B7} - Deposits money into faction bank accounts.", hstr);
  8708. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8709. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8710. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8711. format(hstr, sizeof(hstr), "%s\n{007BD0}/showbadge{B4B5B7} - Shows your badge to another player.", hstr);
  8712. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8713. format(hstr, sizeof(hstr), "%s\n{007BD0}/l(ocal)r(adio){B4B5B7} - Speak on the faction's local radio.", hstr);
  8714. format(hstr, sizeof(hstr), "%s\n{007BD0}/seizebiz{B4B5B7} - Seize down a business.", hstr);
  8715. format(hstr, sizeof(hstr), "%s\n{007BD0}/(g)ive(w)eapon(l)icense.", hstr);
  8716. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8717. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8718. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8719. return 1;
  8720. }
  8721. if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7) //High Court
  8722. {
  8723. new hstr[2000];
  8724. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8725. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8726. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8727. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8728. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8729. format(hstr, sizeof(hstr), "%s\n{007BD0}/invite{B4B5B7} - Invites a member into your faction.", hstr);
  8730. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8731. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8732. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8733. format(hstr, sizeof(hstr), "%s\n{007BD0}/jd{B4B5B7} - Judicial Department locker.", hstr);
  8734. format(hstr, sizeof(hstr), "%s\n{007BD0}/cuff{B4B5B7} - Cuffs a player.", hstr);
  8735. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8736. format(hstr, sizeof(hstr), "%s\n{007BD0}/gavel{B4B5B7} - Bang the gavel on the bench (in courtroom).", hstr);
  8737. format(hstr, sizeof(hstr), "%s\n{007BD0}/seizebiz{B4B5B7} - Seize a business.", hstr);
  8738. format(hstr, sizeof(hstr), "%s\n{007BD0}/seizefunds{B4B5B7} - Seizes funds from a person's bank account.", hstr);
  8739. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8740. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Cancel");
  8741. return 1;
  8742. }
  8743. if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //News Agency
  8744. {
  8745. new hstr[3048];
  8746. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8747. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8748. format(hstr, sizeof(hstr), "%s\n{007BD0}/san{B4B5B7} - Used to go on duty.", hstr);
  8749. format(hstr, sizeof(hstr), "%s\n{007BD0}/news{B4B5B7} - Reports the news.", hstr);
  8750. format(hstr, sizeof(hstr), "%s\n{007BD0}/live{B4B5B7} - Starts a live interview with another player.", hstr);
  8751. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8752. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8753. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8754. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8755. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8756. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8757. format(hstr, sizeof(hstr), "%s\n{007BD0}/sanhotline{B4B5B7} - Toggle off the ability for others to use the hotline.", hstr);
  8758. format(hstr, sizeof(hstr), "%s\n{007BD0}/showp(ress)card{B4B5B7} - Show your SAN press card to someone.", hstr);
  8759. format(hstr, sizeof(hstr), "%s\n{007BD0}/blacklistad{B4B5B7} - Blacklist someone from using advertisements.", hstr);
  8760. format(hstr, sizeof(hstr), "%s\n{007BD0}/unblacklistad{B4B5B7} - Unblackist someone from using advertisements.", hstr);
  8761. format(hstr, sizeof(hstr), "%s\n{007BD0}/sanjingle{B4B5B7} - Play the SAN Jingle.", hstr);
  8762. format(hstr, sizeof(hstr), "%s\n{007BD0}/placecamera{B4B5B7} - Place the SAN camera.", hstr);
  8763. format(hstr, sizeof(hstr), "%s\n{007BD0}/startbroadcast{B4B5B7} - Start the broadcast for live news (camera must be present).", hstr);
  8764. format(hstr, sizeof(hstr), "%s\n{007BD0}/endbroadcast{B4B5B7} - End the broadcast for live news (camera must be present).", hstr);
  8765. format(hstr, sizeof(hstr), "%s\n{007BD0}/pickupcamera{B4B5B7} - Pick up the SAN camera.", hstr);
  8766. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8767. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8768. return 1;
  8769. }
  8770. if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) //San Andreas Taxi Company
  8771. {
  8772. new hstr[1024];
  8773. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8774. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8775. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8776. format(hstr, sizeof(hstr), "%s\n{007BD0}/fare{B4B5B7} - Sets your fare.", hstr);
  8777. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8778. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8779. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8780. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8781. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8782. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8783. format(hstr, sizeof(hstr), "%s\n{007BD0}/taxisign{B4B5B7} - Puts a taxi sign on a vehicle.", hstr);
  8784. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8785. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8786. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8787. return 1;
  8788. }
  8789. if(PlayerInfo[playerid][pGroup] == GROUP_S9) // Sector 9
  8790. {
  8791. new hstr[1024];
  8792. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8793. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8794. format(hstr, sizeof(hstr), "%s\n{007BD0}/disguise{B4B5B7} - Used to change clothes.", hstr);
  8795. format(hstr, sizeof(hstr), "%s\n{007BD0}/mask{B4B5B7} - Used to hide your name.", hstr);
  8796. format(hstr, sizeof(hstr), "%s\n{007BD0}/sate{B4B5B7} - Only works in an S9 or FBI vehicle. Satellite.", hstr);
  8797. format(hstr, sizeof(hstr), "%s\n{007BD0}/changefreq{B4B5B7} - Used to listen in to faction radios.", hstr);
  8798. format(hstr, sizeof(hstr), "%s\n{007BD0}/profile{B4B5B7} - Used to view a player's profile.", hstr);
  8799. format(hstr, sizeof(hstr), "%s\n{007BD0}/s9{B4B5B7} - Used to access S9 lockers at the HQ.", hstr);
  8800. format(hstr, sizeof(hstr), "%s\n{007BD0}/shows9badge{B4B5B7} - Shows your S9 badge. Use with caution.", hstr);
  8801. format(hstr, sizeof(hstr), "%s\n{007BD0}/plantbug{B4B5B7} - Used to plant a bug on a player. Listen in by sitting in an FBI or S9 vehicle.", hstr);
  8802. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - (Un)invites a member of your faction.", hstr);
  8803. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8804. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8805. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8806. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8807. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8808. format(hstr, sizeof(hstr), "%s\n{007BD0}/placejammer{B4B5B7} - Places a jammer on the ground.");
  8809. format(hstr, sizeof(hstr), "%s\n{007BD0}/removejammer{B4B5B7} - Picks up a jammer from the ground.");
  8810. format(hstr, sizeof(hstr), "%s\n{007BD0}/crushjammer{B4B5B7} - Crushes a jammer from the ground.");
  8811. format(hstr, sizeof(hstr), "%s\n{007BD0}/removejammer{B4B5B7} - Picks up a jammer from the ground.");
  8812. format(hstr, sizeof(hstr), "%s\n{007BD0}/jammer{B4B5B7} - Checks if a jammer is around you..");
  8813. format(hstr, sizeof(hstr), "%s\n{007BD0}/s9uc{B4B5B7} - Hides your crimes and tickets from the MDC.");
  8814. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8815. return 1;
  8816. }
  8817. if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15) //Drug Lords
  8818. {
  8819. new hstr[1024];
  8820. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8821. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8822. format(hstr, sizeof(hstr), "%s\n{007BD0}/sas{B4B5B7} - Used to access your lockers.", hstr);
  8823. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8824. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8825. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8826. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8827. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8828. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8829. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8830. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8831. return 1;
  8832. }
  8833. if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12) //DEA
  8834. {
  8835. new hstr[1800];
  8836. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8837. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8838. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8839. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8840. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/m)egaphone{B4B5B7} - Types a message in the megaphone.", hstr);
  8841. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/su)spect{B4B5B7} - Make a player a suspect.", hstr);
  8842. format(hstr, sizeof(hstr), "%s\n{007BD0}/dea{B4B5B7} - Used to go on duty.", hstr);
  8843. format(hstr, sizeof(hstr), "%s\n{007BD0}/cuff{B4B5B7} - Cuffs a player.", hstr);
  8844. format(hstr, sizeof(hstr), "%s\n{007BD0}/detain{B4B5B7} - Detains a player.", hstr);
  8845. format(hstr, sizeof(hstr), "%s\n{007BD0}/sdtazer{B4B5B7} - Equips tazer gun.", hstr);
  8846. format(hstr, sizeof(hstr), "%s\n{007BD0}/handtazer{B4B5B7} - Equips stun weapon.", hstr);
  8847. format(hstr, sizeof(hstr), "%s\n{007BD0}/showbadge{B4B5B7} - Shows your badge to another player.", hstr);
  8848. format(hstr, sizeof(hstr), "%s\n{007BD0}/take{B4B5B7} - Takes things from another player.", hstr);
  8849. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/gov)ernment{B4B5B7} - Displays a government message to the server.", hstr);
  8850. format(hstr, sizeof(hstr), "%s\n{007BD0}/deliver{B4B5B7} - Delivers a player to prison.", hstr);
  8851. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8852. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8853. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8854. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8855. format(hstr, sizeof(hstr), "%s\n{007BD0}/sate{B4B5B7} - Enables satellite mode while in a surveillance van.", hstr);
  8856. format(hstr, sizeof(hstr), "%s\n{007BD0}/opencell{B4B5B7} - Opens nearby jail cells.", hstr);
  8857. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8858. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8859. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8860. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8861. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8862. return 1;
  8863. }
  8864. if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13) //ATF
  8865. {
  8866. new hstr[1800];
  8867. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8868. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8869. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8870. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8871. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/m)egaphone{B4B5B7} - Types a message in the megaphone.", hstr);
  8872. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/su)spect{B4B5B7} - Make a player a suspect.", hstr);
  8873. format(hstr, sizeof(hstr), "%s\n{007BD0}/atf{B4B5B7} - Used to go on duty.", hstr);
  8874. format(hstr, sizeof(hstr), "%s\n{007BD0}/cuff{B4B5B7} - Cuffs a player.", hstr);
  8875. format(hstr, sizeof(hstr), "%s\n{007BD0}/detain{B4B5B7} - Detains a player.", hstr);
  8876. format(hstr, sizeof(hstr), "%s\n{007BD0}/sdtazer{B4B5B7} - Equips tazer gun.", hstr);
  8877. format(hstr, sizeof(hstr), "%s\n{007BD0}/handtazer{B4B5B7} - Equips stun weapon.", hstr);
  8878. format(hstr, sizeof(hstr), "%s\n{007BD0}/showbadge{B4B5B7} - Shows your badge to another player.", hstr);
  8879. format(hstr, sizeof(hstr), "%s\n{007BD0}/take{B4B5B7} - Takes things from another player.", hstr);
  8880. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/gov)ernment{B4B5B7} - Displays a government message to the server.", hstr);
  8881. format(hstr, sizeof(hstr), "%s\n{007BD0}/deliver{B4B5B7} - Delivers a player to prison.", hstr);
  8882. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8883. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8884. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8885. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8886. format(hstr, sizeof(hstr), "%s\n{007BD0}/sate{B4B5B7} - Enables satellite mode while in a surveillance van.", hstr);
  8887. format(hstr, sizeof(hstr), "%s\n{007BD0}/opencell{B4B5B7} - Opens nearby jail cells.", hstr);
  8888. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8889. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8890. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8891. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8892. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8893. return 1;
  8894. }
  8895. return 1;
  8896. }
  8897. if(listitem == 7) // Family
  8898. {
  8899. if(PlayerInfo[playerid][pFMember] == 255)
  8900. {
  8901. ShowHelpDialog(playerid);
  8902. SendClientMessage(playerid, COLOR_GREY, "You are not a member of a Family.");
  8903. return 1;
  8904. }
  8905. new hstr[1400];
  8906. format(hstr, sizeof(hstr), "{007BD0}Family Help:{B4B5B7}\n", hstr);
  8907. format(hstr, sizeof(hstr), "%sThe following commands are specific to your family:\n", hstr);
  8908. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/f)amily{B4B5B7} - Displays a message in family chat.", hstr);
  8909. format(hstr, sizeof(hstr), "%s\n{007BD0}/fwithdraw{B4B5B7} - Withdraws money from your family bank account.", hstr);
  8910. format(hstr, sizeof(hstr), "%s\n{007BD0}/famdeposit{B4B5B7} - Deposits money into your families bank account.", hstr);
  8911. format(hstr, sizeof(hstr), "%s\n{007BD0}/fsafe{B4B5B7} - Allows you to access your family safe.", hstr);
  8912. format(hstr, sizeof(hstr), "%s\n{007BD0}/fstats{B4B5B7} - Displays the contents of your families safe.", hstr);
  8913. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8914. format(hstr, sizeof(hstr), "%s\n{007BD0}/togfam{B4B5B7} - Used to toggle the family chat for yourself.", hstr);
  8915. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8916. format(hstr, sizeof(hstr), "%s\n{007BD0}/createtag{B4B5B7} - Create a graffiti tag.", hstr);
  8917. format(hstr, sizeof(hstr), "%s\n{007BD0}/removetag{B4B5B7} - remove a graffiti tag.", hstr);
  8918. if(PlayerInfo[playerid][pRank] >= 5)
  8919. {
  8920. format(hstr, sizeof(hstr), "%s\n{007BD0}/fmute{B4B5B7} - Used to mute a player from the (/f) chat.", hstr);
  8921. format(hstr, sizeof(hstr), "%s\n{007BD0}/funmute{B4B5B7} - Used to unmute a player from the (/f) chat.", hstr);
  8922. format(hstr, sizeof(hstr), "%s\n{007BD0}/togfamchat{B4B5B7} - Used to toggle the family chat for all members.", hstr);
  8923. format(hstr, sizeof(hstr), "%s\n{007BD0}/adjust{B4B5B7} - Used to adjust multiple things regarding your family.", hstr);
  8924. format(hstr, sizeof(hstr), "%s\n{007BD0}/tags{B4B5B7} - Used to display your current family's tags.", hstr);
  8925. }
  8926. ShowPlayerDialog(playerid, 86, DIALOG_STYLE_MSGBOX, "Other", hstr, "Ok", "Back");
  8927. return 1;
  8928. }
  8929. if(listitem == 8) // Other
  8930. {
  8931. new hstr[1024];
  8932. format(hstr, sizeof(hstr), "{007BD0}Other Help:{B4B5B7}\n", hstr);
  8933. format(hstr, sizeof(hstr), "%sThe following commands are miscellaneous:\n", hstr);
  8934. format(hstr, sizeof(hstr), "%s\n{007BD0}/cellphonehelp(s){B4B5B7} - Displays the cellphone commands.", hstr);
  8935. format(hstr, sizeof(hstr), "%s\n{007BD0}/househelp{B4B5B7} - Displays the house commands.", hstr);
  8936. format(hstr, sizeof(hstr), "%s\n{007BD0}/fishhelp{B4B5B7} - Displays the fishing commands.", hstr);
  8937. format(hstr, sizeof(hstr), "%s\n{007BD0}/irchelp{B4B5B7} - Displays the irc commands.", hstr);
  8938. format(hstr, sizeof(hstr), "%s\n{007BD0}/carhelp{B4B5B7} - Displays the car commands.", hstr);
  8939. format(hstr, sizeof(hstr), "%s\n{007BD0}/radiohelp{B4B5B7} - Displays the radio station commands.", hstr);
  8940. format(hstr, sizeof(hstr), "%s\n{007BD0}/grouphelp{B4B5B7} - Displays the group commands.", hstr);
  8941. ShowPlayerDialog(playerid, 88, DIALOG_STYLE_MSGBOX, "Other", hstr, "Ok", "Back");
  8942. return 1;
  8943. }
  8944. if(listitem == 9) // Business
  8945. {
  8946. new hstr[1024];
  8947. format(hstr, sizeof(hstr), "{007BD0}Business Help:{B4B5B7}\n", hstr);
  8948. format(hstr, sizeof(hstr), "%sThe following commands are for businesses owners:\n", hstr);
  8949. format(hstr, sizeof(hstr), "%s\n{007BD0}/sellbiz(s){B4B5B7} - Sells a business.", hstr);
  8950. format(hstr, sizeof(hstr), "%s\n{007BD0}/sellbiztomarket{B4B5B7} - Sells a business to the market.", hstr);
  8951. format(hstr, sizeof(hstr), "%s\n{007BD0}/biz{B4B5B7} - Allows you to set properties of your business.", hstr);
  8952. format(hstr, sizeof(hstr), "%s\n{007BD0}/buybiz{B4B5B7} - Buys a business.", hstr);
  8953. ShowPlayerDialog(playerid, 89, DIALOG_STYLE_MSGBOX, "Gambling", hstr, "Ok", "Back");
  8954. return 1;
  8955. }
  8956. if(listitem == 10) // Gambling
  8957. {
  8958. new hstr[1024];
  8959. format(hstr, sizeof(hstr), "{007BD0}Gambling Help:{B4B5B7}\n", hstr);
  8960. format(hstr, sizeof(hstr), "%sThe following commands are for gambling:\n", hstr);
  8961. format(hstr, sizeof(hstr), "%s\n{007BD0}/showcard(s){B4B5B7} - Shows card to another player.", hstr);
  8962. format(hstr, sizeof(hstr), "%s\n{007BD0}/cards{B4B5B7} - Shows you a list of your cards.", hstr);
  8963. format(hstr, sizeof(hstr), "%s\n{007BD0}/discard{B4B5B7} - Discards a card.", hstr);
  8964. format(hstr, sizeof(hstr), "%s\n{007BD0}/dealcards{B4B5B7} - Deals cards to another player.", hstr);
  8965. format(hstr, sizeof(hstr), "%s\n{007BD0}/shuffle{B4B5B7} - Shuffles your deck of cards.", hstr);
  8966. ShowPlayerDialog(playerid, 90, DIALOG_STYLE_MSGBOX, "Gambling", hstr, "Ok", "Back");
  8967. return 1;
  8968. }
  8969. if(listitem == 11) // Admin
  8970. {
  8971. if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to view this.");
  8972. new hstr[1024];
  8973. format(hstr, sizeof(hstr), "{007BD0}Admin Help:{B4B5B7}\n", hstr);
  8974. format(hstr, sizeof(hstr), "%sThe following commands are for admins:\n", hstr);
  8975. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/a)dmin{B4B5B7} - Displays a message in the admin chat.", hstr);
  8976. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/ah)elp{B4B5B7} - Displays a list of admins commands.", hstr);
  8977. format(hstr, sizeof(hstr), "%s\n{007BD0}/ahousehelp{B4B5B7} - Displays the admin house commands.", hstr);
  8978. format(hstr, sizeof(hstr), "%s\n{007BD0}/apropertyhelp{B4B5B7} - Displays the admin property commands.", hstr);
  8979. format(hstr, sizeof(hstr), "%s\n{007BD0}/agaragehelp{B4B5B7} - Displays the admin garage commands.", hstr);
  8980. format(hstr, sizeof(hstr), "%s\n{007BD0}/agatehelp{B4B5B7} - Displays the admin gate commands.", hstr);
  8981. format(hstr, sizeof(hstr), "%s\n{007BD0}/nametag{B4B5B7} - Set a colored nametag above your name.", hstr);
  8982. format(hstr, sizeof(hstr), "%s\n{007BD0}/newbietag{B4B5B7} - Set your tag in the newbie chat.", hstr);
  8983. ShowPlayerDialog(playerid, 87, DIALOG_STYLE_MSGBOX, "Admin", hstr, "Ok", "Back");
  8984. return 1;
  8985. }
  8986. if(listitem == 12) // Helper
  8987. {
  8988. if(PlayerInfo[playerid][pHelper] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to view this.");
  8989. new hstr[1024];
  8990. format(hstr, sizeof(hstr), "{007BD0}Helper Help:{B4B5B7}\n", hstr);
  8991. format(hstr, sizeof(hstr), "%sThe following commands are for helpers:\n", hstr);
  8992. format(hstr, sizeof(hstr), "%s\n{007BD0}/helpers{B4B5B7} - Lists all helpers and their helper score.", hstr);
  8993. format(hstr, sizeof(hstr), "%s\n{007BD0}/newbies{B4B5B7} - Lists all newbies.", hstr);
  8994. format(hstr, sizeof(hstr), "%s\n{007BD0}/gotonewbie{B4B5B7} - Teleports to a newbie to see if they need help.", hstr);
  8995. format(hstr, sizeof(hstr), "%s\n{007BD0}/hgoto{B4B5B7} - Teleports to areas.", hstr);
  8996. format(hstr, sizeof(hstr), "%s\n{007BD0}/nmute{B4B5B7} - Mutes a player from the newbie chat.", hstr);
  8997. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/h)helper(c)hat{B4B5B7} - Displays a message in the helper chat.", hstr);
  8998. format(hstr, sizeof(hstr), "%s\n{007BD0}/nwarn{B4B5B7} - Newbie chat warns a player.", hstr);
  8999. format(hstr, sizeof(hstr), "%s\n{007BD0}/ncheck{B4B5B7} - Checks a players newbie warnings.", hstr);
  9000. format(hstr, sizeof(hstr), "%s\n{007BD0}/(n)(r)emove(w)arnings{B4B5B7} - Removes a players newbie warnings.", hstr);
  9001. format(hstr, sizeof(hstr), "%s\n{007BD0}/nonewbie{B4B5B7} - Enables or disables the newbie chat.", hstr);
  9002. format(hstr, sizeof(hstr), "%s\n{007BD0}/makehelper{B4B5B7} - Makes a player a helper.", hstr);
  9003. format(hstr, sizeof(hstr), "%s\n{007BD0}/omakehelper{B4B5B7} - Makes a player a helper.", hstr);
  9004. format(hstr, sizeof(hstr), "%s\n{007BD0}/helperhelp{B4B5B7} - Displays all the helper commands.", hstr);
  9005. format(hstr, sizeof(hstr), "%s\n{007BD0}/nametag{B4B5B7} - Set a colored nametag above your name.", hstr);
  9006. format(hstr, sizeof(hstr), "%s\n{007BD0}/newbietag{B4B5B7} - Set your tag in the newbie chat.", hstr);
  9007. ShowPlayerDialog(playerid, 87, DIALOG_STYLE_MSGBOX, "Helper", hstr, "Ok", "Back");
  9008. return 1;
  9009. }
  9010. if(listitem == 13) // Developer
  9011. {
  9012. if(PlayerInfo[playerid][pDev] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to view this.");
  9013. new hstr[1024];
  9014. format(hstr, sizeof(hstr), "{007BD0}Developer Help:{B4B5B7}\n", hstr);
  9015. format(hstr, sizeof(hstr), "%sThe following commands are for developers:\n", hstr);
  9016. format(hstr, sizeof(hstr), "%s\n{007BD0}/(d)ev(c)hat{B4B5B7} - Displays a message in the developer chat.", hstr);
  9017. format(hstr, sizeof(hstr), "%s\n{007BD0}/viewhouseint{B4B5B7} - View house interiors.", hstr);
  9018. format(hstr, sizeof(hstr), "%s\n{007BD0}/devs{B4B5B7} - Lists all developers.", hstr);
  9019. format(hstr, sizeof(hstr), "%s\n{007BD0}/makedev{B4B5B7} - Makes a player a developer.", hstr);
  9020. format(hstr, sizeof(hstr), "%s\n{007BD0}/devhelp{B4B5B7} - Displays all the developer commands.", hstr);
  9021. format(hstr, sizeof(hstr), "%s\n{007BD0}/nametag{B4B5B7} - Set a colored nametag above your name.", hstr);
  9022. format(hstr, sizeof(hstr), "%s\n{007BD0}/newbietag{B4B5B7} - Set your tag in the newbie chat.", hstr);
  9023. ShowPlayerDialog(playerid, 87, DIALOG_STYLE_MSGBOX, "Developer", hstr, "Ok", "Back");
  9024. return 1;
  9025. }
  9026. if(listitem == 14) // Beta Tester
  9027. {
  9028. if(PlayerInfo[playerid][pTester] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to view this.");
  9029. new hstr[1024];
  9030. format(hstr, sizeof(hstr), "{007BD0}Beta Tester Help:{B4B5B7}\n", hstr);
  9031. format(hstr, sizeof(hstr), "%sThe following commands are for beta testers:\n", hstr);
  9032. format(hstr, sizeof(hstr), "%s\n{007BD0}/(t)est(c)hat{B4B5B7} - Displays a message in the beta tester chat.", hstr);
  9033. format(hstr, sizeof(hstr), "%s\n{007BD0}/testers{B4B5B7} - Lists all beta testers.", hstr);
  9034. format(hstr, sizeof(hstr), "%s\n{007BD0}/togtester{B4B5B7} - Enables or disables the beta tester chat.", hstr);
  9035. format(hstr, sizeof(hstr), "%s\n{007BD0}/acceptbug{B4B5B7} - Accepts a bug report.", hstr);
  9036. format(hstr, sizeof(hstr), "%s\n{007BD0}/treturn{B4B5B7} - Returns you to your original position.", hstr);
  9037. format(hstr, sizeof(hstr), "%s\n{007BD0}/bugmute{B4B5B7} - Mutes a player from reporting bugs.", hstr);
  9038. format(hstr, sizeof(hstr), "%s\n{007BD0}/maketester{B4B5B7} - Makes a player a beta tester.", hstr);
  9039. format(hstr, sizeof(hstr), "%s\n{007BD0}/nametag{B4B5B7} - Set a colored nametag above your name.", hstr);
  9040. format(hstr, sizeof(hstr), "%s\n{007BD0}/newbietag{B4B5B7} - Set your tag in the newbie chat.", hstr);
  9041. ShowPlayerDialog(playerid, 87, DIALOG_STYLE_MSGBOX, "Beta Tester", hstr, "Ok", "Back");
  9042. return 1;
  9043. }
  9044. if(listitem == 15) // VIP
  9045. {
  9046. if(PlayerInfo[playerid][pDonateRank] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to view this.");
  9047. new hstr[1024];
  9048. format(hstr, sizeof(hstr), "{007BD0}VIP Help:{B4B5B7}\n", hstr);
  9049. format(hstr, sizeof(hstr), "%sThe following commands are for vips:\n", hstr);
  9050. format(hstr, sizeof(hstr), "%s\n{007BD0}/purchase{B4B5B7} - Purchase Items from the VIP Club or Blackmarket.", hstr);
  9051. format(hstr, sizeof(hstr), "%s\n{007BD0}/getgift{B4B5B7} - Gets a random gift from the VIP Club.", hstr);
  9052. format(hstr, sizeof(hstr), "%s\n{007BD0}/(v)ip(c)hat{B4B5B7} - Displays a message in the VIP chat.", hstr);
  9053. format(hstr, sizeof(hstr), "%s\n{007BD0}/togvc{B4B5B7} - Hides or shows the VIP chat.", hstr);
  9054. format(hstr, sizeof(hstr), "%s\n{007BD0}/viptime{B4B5B7} - Displays your VIP join or expiry date.", hstr);
  9055. format(hstr, sizeof(hstr), "%s\n{007BD0}/vip{B4B5B7} - Set VIP nametag and other things.", hstr);
  9056. format(hstr, sizeof(hstr), "%s\n{007BD0}/nametag{B4B5B7} - Set a colored nametag above your name.", hstr);
  9057. format(hstr, sizeof(hstr), "%s\n{007BD0}/newbietag{B4B5B7} - Set your tag in the newbie chat.", hstr);
  9058. ShowPlayerDialog(playerid, 87, DIALOG_STYLE_MSGBOX, "VIP", hstr, "Ok", "Back");
  9059. return 1;
  9060. }
  9061. if(listitem == 16) // Character
  9062. {
  9063. new hstr[1024];
  9064. format(hstr, sizeof(hstr), "{007BD0}Character Help{B4B5B7}\n", hstr);
  9065. format(hstr, sizeof(hstr), "%s\n{007BD0}/appearance{B4B5B7} - sets and displays your own/others set appearances.", hstr);
  9066. format(hstr, sizeof(hstr), "%s\n{007BD0}/walkstyle{B4B5B7} - sets your character's walk style.", hstr);
  9067. format(hstr, sizeof(hstr), "%s\n{007BD0}/namechange{B4B5B7} - inside the city hall, this allows you to change your name.", hstr);
  9068. format(hstr, sizeof(hstr), "%s\n{007BD0}/inventory{B4B5B7} - displays inventory items.", hstr);
  9069. format(hstr, sizeof(hstr), "%s\n{007BD0}/animlist{B4B5B7} - displays all available animations.", hstr);
  9070. format(hstr, sizeof(hstr), "%s\n{007BD0}/licenses{B4B5B7} - displays your licenses.", hstr);
  9071. format(hstr, sizeof(hstr), "%s\n{007BD0}/showlicenses{B4B5B7} - lets you show your licenses to another player", hstr);
  9072. format(hstr, sizeof(hstr), "%s\n{007BD0}/gear{B4B5B7} - allows you to manage your character's gear, remember to /buygear first.", hstr);
  9073. ShowPlayerDialog(playerid, 393, DIALOG_STYLE_MSGBOX, "Character", hstr, "Ok", "Back");
  9074. return 1;
  9075. }
  9076. if(listitem == 17) // drugs
  9077. {
  9078. new hstr[1024];
  9079. format(hstr, sizeof(hstr), "{007BD0}Drug Help{B4B5B7}\n", hstr);
  9080. format(hstr, sizeof(hstr), "%s\n{007BD0}/inv{B4B5B7} - List all the drugs in your inventory.", hstr);
  9081. format(hstr, sizeof(hstr), "%s\n{007BD0}/dropdrug{B4B5B7} - Allows you to drop drugs on the floor.", hstr);
  9082. format(hstr, sizeof(hstr), "%s\n{007BD0}/takedrug{B4B5B7} - Picks up nearby drugs off of the floor.", hstr);
  9083. format(hstr, sizeof(hstr), "%s\n{007BD0}/givedrug{B4B5B7} - Gives a drug to a specified player.", hstr);
  9084. format(hstr, sizeof(hstr), "%s\n{007BD0}/usedrug{B4B5B7} - Uses a specific drug.", hstr);
  9085. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Drugs", hstr, "Ok", "Close");
  9086. }
  9087. if(listitem == 18) // insurance
  9088. {
  9089. new hstr[1024];
  9090. format(hstr, sizeof(hstr), "{007BD0}Insurance Help{B4B5B7}\n", hstr);
  9091. format(hstr, sizeof(hstr), "%s\n{007BD0}/buyinsurance{B4B5B7} - Buy insurance (must be used in the All Saints Hospital)", hstr);
  9092. format(hstr, sizeof(hstr), "%s\n{007BD0}/myinsurance{B4B5B7} - Displays your insurance uses.", hstr);
  9093. format(hstr, sizeof(hstr), "%s\n{B4B5B7}Insurance makes your recovery time in the hospital faster and reduces your hospital bill by 25 percents.", hstr);
  9094. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Insurance", hstr, "Ok", "Close");
  9095. }
  9096. }
  9097. return 1;
  9098. }
  9099. if(dialogid == 80) //Account
  9100. {
  9101. if(!response)
  9102. ShowHelpDialog(playerid);
  9103. return 1;
  9104. }
  9105. if(dialogid == 81) //General
  9106. {
  9107. if(!response)
  9108. ShowHelpDialog(playerid);
  9109. return 1;
  9110. }
  9111. if(dialogid == 82) //Chat
  9112. {
  9113. if(!response)
  9114. ShowHelpDialog(playerid);
  9115. return 1;
  9116. }
  9117. if(dialogid == 83) //Toggles
  9118. {
  9119. if(!response)
  9120. ShowHelpDialog(playerid);
  9121. return 1;
  9122. }
  9123. if(dialogid == 84) //Bank
  9124. {
  9125. if(!response)
  9126. ShowHelpDialog(playerid);
  9127. return 1;
  9128. }
  9129. if(dialogid == 85) //Faction
  9130. {
  9131. if(!response)
  9132. ShowHelpDialog(playerid);
  9133. return 1;
  9134. }
  9135. if(dialogid == 86) //Family
  9136. {
  9137. if(!response)
  9138. ShowHelpDialog(playerid);
  9139. return 1;
  9140. }
  9141. if(dialogid == 87) //Other
  9142. {
  9143. if(!response)
  9144. ShowHelpDialog(playerid);
  9145. return 1;
  9146. }
  9147. if(dialogid == 88) //Biz
  9148. {
  9149. if(!response)
  9150. ShowHelpDialog(playerid);
  9151. return 1;
  9152. }
  9153. if(dialogid == 89) //Gambling
  9154. {
  9155. if(!response)
  9156. ShowHelpDialog(playerid);
  9157. return 1;
  9158. }
  9159. if(dialogid == 90) //Admin
  9160. {
  9161. if(!response)
  9162. ShowHelpDialog(playerid);
  9163. return 1;
  9164. }
  9165. if(dialogid == 393) //Character
  9166. {
  9167. if(!response)
  9168. ShowHelpDialog(playerid);
  9169. return 1;
  9170. }
  9171. //guide
  9172. if(dialogid == DIALOGID_GUIDE_MAIN) //main guide screen
  9173. {
  9174. if(response)
  9175. {
  9176. if(listitem == 0) // How to make money
  9177. {
  9178. new hstr[2048];
  9179. format(hstr, sizeof(hstr), "%s{007BD0}Jobs{FFFFFF}\n", hstr);
  9180. format(hstr, sizeof(hstr), "%sThere are multiple ways to make money on this server, the most common way of making money is getting a job.\n", hstr);
  9181. format(hstr, sizeof(hstr), "%sThe most popular job for new players is the {FFFF91}Bodyguard Job{FFFFFF}, this job allows you to sell vests to other players for quick money.\n", hstr);
  9182. format(hstr, sizeof(hstr), "%sMost jobs have a skill level which can be leveled up by doing the job, the higher your skill level the more money you can make while doing it.\n", hstr);
  9183. format(hstr, sizeof(hstr), "%sYou can quit your job at any time, when you quit a job you don't lose the skill level.\n", hstr);
  9184. format(hstr, sizeof(hstr), "%sYou can get a job by going to the job location and typing /getjob.\n", hstr);
  9185. format(hstr, sizeof(hstr), "%sTo see a list of jobs and their locations, type {FFFF91}/jobhelp{FFFFFF}.\n\n", hstr);
  9186. format(hstr, sizeof(hstr), "%s{007BD0}Activities & Missions{FFFFFF}\n", hstr);
  9187. format(hstr, sizeof(hstr), "%sActivities are things you can do on the side while having a job such as fish at the Pier or sell cars at the Crane in Ocean Docks. Activities like\n", hstr);
  9188. format(hstr, sizeof(hstr), "%sfishing or selling cars will also raise your skill level resulting in more money or less cooldown time the next time you do it.\n", hstr);
  9189. format(hstr, sizeof(hstr), "%sTo sell cars at the crane type {FFFF91}/dropcar{FFFFFF}.\n", hstr);
  9190. format(hstr, sizeof(hstr), "%s{007BD0}Paycheck{FFFFFF}\n", hstr);
  9191. format(hstr, sizeof(hstr), "%sYou start with $10,000 on hand and $20,000 which you can {FFFF91}/withdraw{FFFFFF} from the bank. You can also withdraw money from ATMs.\n", hstr);
  9192. format(hstr, sizeof(hstr), "%sEvery 1 hour you will get a paycheck and 1 respect point, the amount of money you get on paycheck depends on your main level.\n", hstr);
  9193. format(hstr, sizeof(hstr), "%sWhen you have enough money to {FFFF91}/buylevel{FFFFFF} your paycheck money will increase.", hstr);
  9194. ShowPlayerDialog(playerid, DIALOGID_GUIDE_MONEY, DIALOG_STYLE_MSGBOX, "How to make money", hstr, "Ok", "Back");
  9195. return 1;
  9196. }
  9197. if(listitem == 1) // Getting guns
  9198. {
  9199. new hstr[512];
  9200. format(hstr, sizeof(hstr), "%s{007BD0}Getting guns{FFFFFF}\n", hstr);
  9201. format(hstr, sizeof(hstr), "%s{D14545}Warning: You must play for at least 2 hours before you can get a weapon, this was added to help minimize deathmatching.{FFFFFF}\n\n", hstr);
  9202. format(hstr, sizeof(hstr), "%sYou can buy weapons from Ammunations or Arms Dealers. If you are an {FFFF91}Arms Dealer{FFFFFF} you can create your own weapons and sell them to\n", hstr);
  9203. format(hstr, sizeof(hstr), "%syourself or players. You must be at least level 2 before buying legal from an Ammunation.", hstr);
  9204. ShowPlayerDialog(playerid, DIALOGID_GUIDE_GUNS, DIALOG_STYLE_MSGBOX, "Getting guns", hstr, "Ok", "Back");
  9205. return 1;
  9206. }
  9207. if(listitem == 2) // Joining a faction or gang
  9208. {
  9209. new hstr[512];
  9210. format(hstr, sizeof(hstr), "{007BD0}Joining a faction or gang:{FFFFFF}\n", hstr);
  9211. format(hstr, sizeof(hstr), "%sTo join a gang or faction you need to be invited by the leader, being friends with the gangs members will increase your chance of being invited.\n", hstr);
  9212. format(hstr, sizeof(hstr), "%sGrove Street and Ballas are both public gangs and are good if you want to quickly join one.\n", hstr);
  9213. format(hstr, sizeof(hstr), "%sYou can display a list of gangs by typing {FFFF91}/families{FFFFFF}.", hstr);
  9214. format(hstr, sizeof(hstr), "%s\nJoining factions requires filling out an application on the forums at {8D8DFF}gta-ecrp.com/forums.", hstr);
  9215. ShowPlayerDialog(playerid, DIALOGID_GUIDE_FACTION, DIALOG_STYLE_MSGBOX, "Joining a faction or gang", hstr, "Ok", "Back");
  9216. return 1;
  9217. }
  9218. if(listitem == 3) // How to roleplay
  9219. {
  9220. new hstr[612];
  9221. format(hstr, sizeof(hstr), "{007BD0}How to roleplay:{FFFFFF}\n", hstr);
  9222. format(hstr, sizeof(hstr), "%sThe fastest way to learn how to roleplay is to watch other people doing it.\n", hstr);
  9223. format(hstr, sizeof(hstr), "%sYou will earn the respect of other players quickly if you are a good roleplayer. You will also find it easier to join factions and gangs.\n", hstr);
  9224. format(hstr, sizeof(hstr), "%sThere are commands which can help improve your roleplay skills quickly that you should familiarize yourself with.\n", hstr);
  9225. format(hstr, sizeof(hstr), "%s{FFFF91}/me{FFFFFF} - Can be used to do actions (example: /me rolls up on Smo with an AK47.).\n", hstr);
  9226. format(hstr, sizeof(hstr), "%s{FFFF91}/do{FFFFFF} - For describing the situation. (example: /do The stick is brown.\n", hstr);
  9227. format(hstr, sizeof(hstr), "%s{FFFF91}/animhelp{FFFFFF} - displays a list of animations.", hstr);
  9228. ShowPlayerDialog(playerid, DIALOGID_GUIDE_ROLEPLAY, DIALOG_STYLE_MSGBOX, "How to roleplay", hstr, "Ok", "Back");
  9229. return 1;
  9230. }
  9231. if(listitem == 4) // How to level up
  9232. {
  9233. new hstr[812];
  9234. format(hstr, sizeof(hstr), "{007BD0}How to level up:{FFFFFF}\n", hstr);
  9235. format(hstr, sizeof(hstr), "%sYou can level up by getting respect points and the amount of money it costs to {FFFF91}/buylevel{FFFFFF}.\n", hstr);
  9236. format(hstr, sizeof(hstr), "%sEach paycheck you will be given 1 respect point, you can earn the money by doing jobs, missions, fishing or /dropcar.\n", hstr);
  9237. format(hstr, sizeof(hstr), "%sLeveling up your account will allow you to make more money on paycheck, get upgrade points as well as unlock features like:\n", hstr);
  9238. format(hstr, sizeof(hstr), "%sThe ability to buy weapons from Ammunations. (Level 2)\n", hstr);
  9239. format(hstr, sizeof(hstr), "%sThe ability to place a {FFFF91}/contract{FFFFFF} on another player (when a player has contract on their head they become a target and will lose half the contract\n", hstr);
  9240. format(hstr, sizeof(hstr), "%sprice if they are killed by a hitman).\n", hstr);
  9241. format(hstr, sizeof(hstr), "%sUnlock more commands ({FFFF91}/wiretransfer{FFFFFF} etc).", hstr);
  9242. format(hstr, sizeof(hstr), "%sYou can type {FFFF91}/stats{FFFFFF} to display your account stats, more commands are listed in {FFFF91}/help{FFFFFF}.\n", hstr);
  9243. ShowPlayerDialog(playerid, DIALOGID_GUIDE_LEVEL, DIALOG_STYLE_MSGBOX, "How to level up", hstr, "Ok", "Back");
  9244. return 1;
  9245. }
  9246. }
  9247. viewingGuide[playerid] = 0;
  9248. return 1;
  9249. }
  9250. if(dialogid == DIALOGID_GUIDE_MONEY)
  9251. {
  9252. if(!response)
  9253. {
  9254. ShowPlayerDialog(playerid, DIALOGID_GUIDE_MAIN, DIALOG_STYLE_LIST, "Guide", "How to make money\nGetting guns\nJoining a gang or faction\nHow to roleplay\nHow to level up", "Ok", "Cancel");
  9255. return 1;
  9256. }
  9257. SendClientMessage(playerid, COLOR_WHITE, "Type {7DAEFF}/guide{FFFFFF} if you want to view this again, use ({7DAEFF}/newb{FFFFFF})ie to ask questions in the newbie chat channel.");
  9258. viewingGuide[playerid] = 0;
  9259. }
  9260. if(dialogid == DIALOGID_GUIDE_GUNS)
  9261. {
  9262. if(!response)
  9263. {
  9264. ShowPlayerDialog(playerid, DIALOGID_GUIDE_MAIN, DIALOG_STYLE_LIST, "Guide", "How to make money\nGetting guns\nJoining a gang or faction\nHow to roleplay\nHow to level up", "Ok", "Cancel");
  9265. return 1;
  9266. }
  9267. SendClientMessage(playerid, COLOR_WHITE, "Type {7DAEFF}/guide{FFFFFF} if you want to view this again, use ({7DAEFF}/newb{FFFFFF})ie to ask questions in the newbie chat channel.");
  9268. viewingGuide[playerid] = 0;
  9269. }
  9270. if(dialogid == DIALOGID_GUIDE_FACTION)
  9271. {
  9272. if(!response)
  9273. {
  9274. ShowPlayerDialog(playerid, DIALOGID_GUIDE_MAIN, DIALOG_STYLE_LIST, "Guide", "How to make money\nGetting guns\nJoining a gang or faction\nHow to roleplay\nHow to level up", "Ok", "Cancel");
  9275. return 1;
  9276. }
  9277. SendClientMessage(playerid, COLOR_WHITE, "Type {7DAEFF}/guide{FFFFFF} if you want to view this again, use ({7DAEFF}/newb{FFFFFF})ie to ask questions in the newbie chat channel.");
  9278. viewingGuide[playerid] = 0;
  9279. }
  9280. if(dialogid == DIALOGID_GUIDE_ROLEPLAY)
  9281. {
  9282. if(!response)
  9283. {
  9284. ShowPlayerDialog(playerid, DIALOGID_GUIDE_MAIN, DIALOG_STYLE_LIST, "Guide", "How to make money\nGetting guns\nJoining a gang or faction\nHow to roleplay\nHow to level up", "Ok", "Cancel");
  9285. return 1;
  9286. }
  9287. SendClientMessage(playerid, COLOR_WHITE, "Type {7DAEFF}/guide{FFFFFF} if you want to view this again, use ({7DAEFF}/newb{FFFFFF})ie to ask questions in the newbie chat channel.");
  9288. viewingGuide[playerid] = 0;
  9289. }
  9290. if(dialogid == DIALOGID_GUIDE_LEVEL)
  9291. {
  9292. if(!response)
  9293. {
  9294. ShowPlayerDialog(playerid, DIALOGID_GUIDE_MAIN, DIALOG_STYLE_LIST, "Guide", "How to make money\nGetting guns\nJoining a gang or faction\nHow to roleplay\nHow to level up", "Ok", "Cancel");
  9295. return 1;
  9296. }
  9297. SendClientMessage(playerid, COLOR_WHITE, "Type {7DAEFF}/guide{FFFFFF} if you want to view this again, use ({7DAEFF}/newb{FFFFFF})ie to ask questions in the newbie chat channel.");
  9298. viewingGuide[playerid] = 0;
  9299. }
  9300. if(dialogid == DIALOG_SENATE_MAIN) //Senate
  9301. {
  9302. if(response)
  9303. {
  9304. if(listitem == 0)
  9305. {
  9306. if(PlayerInfo[playerid][pOnDuty] == 0) //if player is off duty, set them them on
  9307. {
  9308. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9309. format(str, sizeof(str), "* %s retrieves his equipment from his locker and equips his badge & body camera.", sendername);
  9310. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  9311. SetPlayerColor(playerid, TCOLOR_SENATE);
  9312. if(PlayerInfo[playerid][pMember] == 11) FakeFaction[playerid] = 6;
  9313. GivePlayerGun(playerid, 24);
  9314. SetPlayerArmour(playerid, 100.0);
  9315. PlayerInfo[playerid][pOnDuty] = 1;
  9316. TogglePlayerControllable(playerid, true);
  9317. if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] != FACTION_GOV)
  9318. {
  9319. SetPlayerSkin(playerid, 165);
  9320. PlayerInfo[playerid][pModel] = 165;
  9321. PlayerInfo[playerid][pOnDuty] = 1;
  9322. PlayerInfo[playerid][pMember] = FACTION_GOV;
  9323. PlayerInfo[playerid][pRank] = 1;
  9324. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have been given a badge automatically (GOV Security)");
  9325. }
  9326. }
  9327. else if(PlayerInfo[playerid][pOnDuty] == 1) //if player is on duty, set them off
  9328. {
  9329. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9330. format(str, sizeof(str), "* %s places his equipment inside his locker and removes his badge & body camera.", sendername);
  9331. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  9332. SetPlayerColor(playerid, TCOLOR_WHITE);
  9333. PlayerInfo[playerid][pGun2] = 0;
  9334. ResetPlayerWeapons(playerid);
  9335. ClearGuns(playerid);
  9336. SetPlayerArmour(playerid, 0.0);
  9337. PlayerInfo[playerid][pOnDuty] = 0;
  9338. TogglePlayerControllable(playerid, true);
  9339. // Shows civilian skin selector
  9340. ShowSkinShop(playerid, true, false, false, false, false);
  9341. }
  9342. }
  9343. if(listitem == 1)
  9344. {
  9345. // Shows faction skin selector
  9346. ShowSkinShop(playerid, false, true, false, false, true);
  9347. }
  9348. if(listitem == 2)
  9349. {
  9350. ShowPlayerDialog(playerid, DIALOG_SENATE_ARMORY, DIALOG_STYLE_LIST, "Armory", "Deagle\t\t$500\nM4\t\t$6,000\nKevlar\t\t$150\nFirst Aid Kit\t$200", "Select", "Back"); // Senate Locker
  9351. }
  9352. }
  9353. return 1;
  9354. }
  9355. if(dialogid == DIALOG_SENATE_ARMORY)
  9356. {
  9357. if(response)
  9358. {
  9359. if(listitem == 0) // Deagle
  9360. {
  9361. if(PlayerInfo[playerid][pCash] < 500)
  9362. {
  9363. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9364. TogglePlayerControllable(playerid, true);
  9365. return 1;
  9366. }
  9367. else
  9368. {
  9369. GiveMoney(playerid, -500);
  9370. GivePlayerGun(playerid, 24);
  9371. TogglePlayerControllable(playerid, true);
  9372. }
  9373. }
  9374. if(listitem == 1) //M4
  9375. {
  9376. if(PlayerInfo[playerid][pRank] < 2) return SendClientMessage(playerid, -1, "Only R2+ have access to this locker");
  9377. if(PlayerInfo[playerid][pCash] < 6000)
  9378. {
  9379. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9380. TogglePlayerControllable(playerid, true);
  9381. return 1;
  9382. }
  9383. else
  9384. {
  9385. GiveMoney(playerid, -6000);
  9386. GivePlayerGun(playerid, 31);
  9387. TogglePlayerControllable(playerid, true);
  9388. }
  9389. }
  9390. if(listitem == 2) //kevlar
  9391. {
  9392. if(PlayerInfo[playerid][pCash] < 150)
  9393. {
  9394. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9395. TogglePlayerControllable(playerid, true);
  9396. return 1;
  9397. }
  9398. else
  9399. {
  9400. SetPlayerArmour(playerid, 100);
  9401. GiveMoney(playerid, -150);
  9402. TogglePlayerControllable(playerid, true);
  9403. }
  9404. }
  9405. if(listitem == 3)
  9406. {
  9407. if(PlayerInfo[playerid][pCash] < 200)
  9408. {
  9409. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9410. TogglePlayerControllable(playerid, true);
  9411. return 1;
  9412. }
  9413. else
  9414. {
  9415. SetPlayerHealth(playerid, 100);
  9416. GiveMoney(playerid, -200);
  9417. TogglePlayerControllable(playerid, true);
  9418. }
  9419. }
  9420. }
  9421. else
  9422. {
  9423. ShowPlayerDialog(playerid, DIALOG_SENATE_MAIN, DIALOG_STYLE_LIST, "Government", "Duty\nChange Uniform\nArmory", "Select", "Cancel"); // Senate Locker
  9424. }
  9425. return 1;
  9426. }
  9427. if(dialogid == DIALOG_HC_MAIN) //High Court
  9428. {
  9429. if(response)
  9430. {
  9431. if(listitem == 0)
  9432. {
  9433. if(PlayerInfo[playerid][pOnDuty] == 0) //if player is off duty, set them them on
  9434. {
  9435. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9436. format(str, sizeof(str), "* %s takes their equipment from the locker.", sendername);
  9437. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  9438. SetPlayerColor(playerid, TCOLOR_HIGHCOURT);
  9439. SetPlayerArmour(playerid, 100.0);
  9440. PlayerInfo[playerid][pOnDuty] = 1;
  9441. TogglePlayerControllable(playerid, true);
  9442. }
  9443. else if(PlayerInfo[playerid][pOnDuty] == 1) //if player is on duty, set them off
  9444. {
  9445. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9446. format(str, sizeof(str), "* %s places their equipment in the locker.", sendername);
  9447. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  9448. SetPlayerColor(playerid, TCOLOR_WHITE);
  9449. ResetPlayerWeapons(playerid);
  9450. ClearGuns(playerid);
  9451. SetPlayerArmour(playerid, 0.0);
  9452. PlayerInfo[playerid][pOnDuty] = 0;
  9453. TogglePlayerControllable(playerid, true);
  9454. }
  9455. }
  9456. if(listitem == 1)
  9457. {
  9458. ShowSkinShop(playerid, false, true, false, false, true);
  9459. }
  9460. if(listitem == 2)
  9461. {
  9462. ShowPlayerDialog(playerid, DIALOG_HC_ARMORY, DIALOG_STYLE_TABLIST, "Armory", "First aid kit\tFree\nKevlar vest\tFree\nDesert Eagle\t$500\nMP5\t$1,000\nShotgun\t$1,000\nMace\t$25\nPortable MDC\tFREE", "Select", "Back"); //HC Locker
  9463. }
  9464. }
  9465. return 1;
  9466. }
  9467. if(dialogid == DIALOG_HC_ARMORY)
  9468. {
  9469. if(response)
  9470. {
  9471. if(listitem == 0) // HP
  9472. {
  9473. SetPlayerHealth(playerid, 100);
  9474. }
  9475. if(listitem == 1) // Kevlar
  9476. {
  9477. if(PlayerInfo[playerid][pCash] < 1000)
  9478. {
  9479. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9480. TogglePlayerControllable(playerid, true);
  9481. return 1;
  9482. }
  9483. else
  9484. {
  9485. SetPlayerArmour(playerid, 100);
  9486. GiveMoney(playerid, -1000);
  9487. }
  9488. }
  9489. if(listitem == 2) //Deagle
  9490. {
  9491. GivePlayerGun(playerid, 24);
  9492. TogglePlayerControllable(playerid, true);
  9493. }
  9494. if(listitem == 3) //MP5
  9495. {
  9496. if(PlayerInfo[playerid][pCash] < 1000)
  9497. {
  9498. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9499. TogglePlayerControllable(playerid, true);
  9500. return 1;
  9501. }
  9502. else
  9503. {
  9504. GiveMoney(playerid, -1000);
  9505. GivePlayerGun(playerid, 29);
  9506. TogglePlayerControllable(playerid, true);
  9507. }
  9508. }
  9509. if(listitem == 4) //Shotgun
  9510. {
  9511. if(PlayerInfo[playerid][pCash] < 1000)
  9512. {
  9513. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9514. TogglePlayerControllable(playerid, true);
  9515. return 1;
  9516. }
  9517. else
  9518. {
  9519. GiveMoney(playerid, -1000);
  9520. GivePlayerGun(playerid, 25);
  9521. TogglePlayerControllable(playerid, true);
  9522. }
  9523. }
  9524. if(listitem == 5) //Mace
  9525. {
  9526. if(PlayerInfo[playerid][pCash] < 25)
  9527. {
  9528. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9529. TogglePlayerControllable(playerid, true);
  9530. return 1;
  9531. }
  9532. else
  9533. {
  9534. GiveMoney(playerid, -25);
  9535. GivePlayerGun(playerid, 41);
  9536. TogglePlayerControllable(playerid, true);
  9537. }
  9538. }
  9539. if(listitem == 6) // portable mdc
  9540. {
  9541. PlayerInfo[playerid][pPortMDC] = 1;
  9542. SendClientMessage(playerid, COLOR_ORANGE, "You take a portable MDC unit from the locker.");
  9543. SendClientMessage(playerid, COLOR_ORANGE, "(( This will be lost upon death. ))");
  9544. }
  9545. }
  9546. else
  9547. {
  9548. ShowPlayerDialog(playerid, DIALOG_HC_MAIN, DIALOG_STYLE_LIST, "Judicial Department", "Duty\nChange Uniform\nArmory", "Select", "Cancel"); // HC Locker
  9549. }
  9550. return 1;
  9551. }
  9552. if(dialogid == 93) //Tiki Exchange
  9553. {
  9554. if(response)
  9555. {
  9556. if(listitem == 0) // SD Pistol
  9557. {
  9558. if(PlayerInfo[playerid][pConnectTime] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this exchange.");
  9559. if(PlayerInfo[playerid][pTikis] < 1) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9560. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9561. PlayerInfo[playerid][pTikis] -= 1;
  9562. GivePlayerGun(playerid, 23);
  9563. SendClientMessage(playerid, COLOR_GREY, "You exchanged 1 tiki for a Silenced Pistol.");
  9564. return 1;
  9565. }
  9566. if(listitem == 1) // Full Armor
  9567. {
  9568. if(PlayerInfo[playerid][pTikis] < 3) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9569. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9570. PlayerInfo[playerid][pTikis] -= 3;
  9571. SetPlayerArmour(playerid, 100);
  9572. SendClientMessage(playerid, COLOR_GREY, "You exchanged 3 tikis for Full Armor.");
  9573. return 1;
  9574. }
  9575. if(listitem == 2) // 25 Pot
  9576. {
  9577. SendClientMessage(playerid, COLOR_GREY, "This has been disabled.");
  9578. return 1;
  9579. }
  9580. if(listitem == 3) // 25 Crack
  9581. {
  9582. SendClientMessage(playerid, COLOR_GREY, "This has been disabled.");
  9583. return 1;
  9584. }
  9585. if(listitem == 4) // 10,000 materials
  9586. {
  9587. if(PlayerInfo[playerid][pTikis] < 10) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9588. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9589. PlayerInfo[playerid][pTikis] -= 10;
  9590. PlayerInfo[playerid][pMats] += 10000;
  9591. SendClientMessage(playerid, COLOR_GREY, "You exchanged 10 tikis for 10,000 Materials.");
  9592. return 1;
  9593. }
  9594. if(listitem == 5) // $100,000
  9595. {
  9596. if(PlayerInfo[playerid][pTikis] < 12) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9597. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9598. PlayerInfo[playerid][pTikis] -= 12;
  9599. GiveMoney(playerid, 100000);
  9600. SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for $100,000.");
  9601. return 1;
  9602. }
  9603. if(listitem == 6) // Gamble
  9604. {
  9605. if(PlayerInfo[playerid][pTikis] < 12) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9606. new rand = 0 + random(14);
  9607. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9608. PlayerInfo[playerid][pTikis] -= 12;
  9609. if(rand == 0)
  9610. {
  9611. GivePlayerGun(playerid, 28);
  9612. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a Micro SMG.");
  9613. }
  9614. else if(rand == 1)
  9615. {
  9616. GivePlayerGun(playerid, 26);
  9617. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a Sawnoff Shotgun.");
  9618. }
  9619. else if(rand == 2)
  9620. {
  9621. PlayerInfo[playerid][pCash] += 115000;
  9622. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for $115,000.");
  9623. }
  9624. else if(rand == 3)
  9625. {
  9626. PlayerInfo[playerid][pTikis] += 25;
  9627. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for 25 Tikis.");
  9628. }
  9629. else if(rand == 4)
  9630. {
  9631. /*PlayerInfo[playerid][pSHealth] = 100;
  9632. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for Full Armor on spawn.");*/
  9633. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for nothing! Try again, sorry for your luck.");
  9634. }
  9635. else if(rand == 5)
  9636. {
  9637. GivePlayerGun(playerid, 26);
  9638. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a Sawnoff Shotgun.");
  9639. }
  9640. else if(rand == 6)
  9641. {
  9642. GivePlayerGun(playerid, 26);
  9643. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a Sawnoff Shotgun.");
  9644. }
  9645. else if(rand == 7)
  9646. {
  9647. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for nothing! Try again, sorry for your luck.");
  9648. }
  9649. else if(rand == 8)
  9650. {
  9651. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for nothing! Try again, sorry for your luck.");
  9652. }
  9653. else if(rand == 9)
  9654. {
  9655. GivePlayerGun(playerid, 26);
  9656. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a Sawnoff Shotgun.");
  9657. }
  9658. else if(rand == 10)
  9659. {
  9660. GivePlayerGun(playerid, 32);
  9661. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a Tec 9.");
  9662. }
  9663. else if(rand == 11)
  9664. {
  9665. PlayerInfo[playerid][gTicket] = 5;
  9666. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for 5 Gear Tickets.");
  9667. }
  9668. else if(rand == 12)
  9669. {
  9670. PlayerInfo[playerid][pMats] += 50000;
  9671. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for 50,000 Materials.");
  9672. }
  9673. else if(rand == 13)
  9674. {
  9675. PlayerInfo[playerid][pSHP] = 100;
  9676. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for Full Health on spawn.");
  9677. }
  9678. else
  9679. {
  9680. PlayerInfo[playerid][pSHP] = 100;
  9681. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for Full Health on spawn.");
  9682. }
  9683. }
  9684. if(listitem == 7) // Mace
  9685. {
  9686. if(PlayerInfo[playerid][pTikis] < 12) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9687. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9688. PlayerInfo[playerid][pTikis] -= 12;
  9689. GivePlayerGun(playerid, 41);
  9690. SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a mace.");
  9691. return 1;
  9692. }
  9693. if(listitem == 8) // Voodoo Magic
  9694. {
  9695. if(PlayerInfo[playerid][pTikis] < 25) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9696. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9697. PlayerInfo[playerid][pTikis] -= 25;
  9698. VoodooSpell[playerid] = 1;
  9699. SendClientMessage(playerid, COLOR_GREY, "You exchanged 25 tikis for Voodoo Magic (/vsetweather).");
  9700. return 1;
  9701. }
  9702. if(listitem == 9) // C4
  9703. {
  9704. SendClientMessage(playerid, COLOR_GREY, "This has been disabled.");
  9705. return 1;
  9706. }
  9707. if(listitem == 10) // Gear Ticket
  9708. {
  9709. if(PlayerInfo[playerid][pTikis] < 6) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9710. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9711. PlayerInfo[playerid][pTikis] -= 6;
  9712. PlayerInfo[playerid][gTicket] += 1;
  9713. SendClientMessage(playerid, COLOR_GREY, "You exchanged 6 tikis for a Gear Ticket.");
  9714. return 1;
  9715. }
  9716. if(listitem == 11) // Large Boombox
  9717. {
  9718. if(PlayerInfo[playerid][pTikis] < 6) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9719. if(PlayerInfo[playerid][pStereo]) return SendClientMessage(playerid, COLOR_GREY, "You already have a Large Boombox.");
  9720. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9721. PlayerInfo[playerid][pTikis] -= 6;
  9722. PlayerInfo[playerid][pStereo] = 4;
  9723. SendClientMessage(playerid, COLOR_GREY, "You exchanged 6 tikis for a Large Boombox.");
  9724. return 1;
  9725. }
  9726. if(listitem == 12) // TEC 9
  9727. {
  9728. if(PlayerInfo[playerid][pConnectTime] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this exchange.");
  9729. if(PlayerInfo[playerid][pTikis] < 12) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9730. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9731. PlayerInfo[playerid][pTikis] -= 12;
  9732. GivePlayerGun(playerid, 28);
  9733. SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a TEC 9.");
  9734. return 1;
  9735. }
  9736. if(listitem == 13) // Grenade
  9737. {
  9738. return SendClientMessage(playerid, COLOR_GREY, "Grenades are currently disabled!");
  9739. }
  9740. if(listitem == 14) // RPG
  9741. {
  9742. return SendClientMessage(playerid, COLOR_GREY, "RPG is currently disabled!");
  9743. }
  9744. if(listitem == 15) // Silver VIP
  9745. {
  9746. if(PlayerInfo[playerid][pTikis] < 40) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9747. //give vip
  9748. new Year, Month, Day;
  9749. getdate(Year, Month, Day);
  9750. if(Month == 1 && Day >= 29) return SendClientMessage(playerid, COLOR_GREY, "You cannot get Silver VIP today.");
  9751. //take tikis
  9752. PlayerInfo[playerid][pTikis] -= 40;
  9753. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9754. SendClientMessage(playerid, COLOR_GREY, "You exchanged 40 tikis for Silver VIP.");
  9755. PlayerInfo[playerid][pDonateRank] = 2;
  9756. PlayerInfo[playerid][pTag] = NTAG_SVIP;
  9757. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has purchased silver VIP from the Tiki Store.", PlayerName(playerid));
  9758. ABroadCast(COLOR_WHITE, str, 1);
  9759. format(str, 32, "%02d/%02d/%d", Month, Day, Year);
  9760. strmid(PlayerInfo[playerid][pVIPJoinDate], str, 0, strlen(str), 255);
  9761. format(str, 32, "%02d/%02d/%d", Month +1, Day, Year);
  9762. strmid(PlayerInfo[playerid][pVIPExpDate], str, 0, strlen(str), 255);
  9763. if(Month == 12)
  9764. {
  9765. format(PlayerInfo[playerid][pVIPExpDate], 32, "%02d/%02d/%d", 1, Day, Year +1);
  9766. }
  9767. format(str, sizeof(str), "Join Date: %s, Expire Date: %s", PlayerInfo[playerid][pVIPJoinDate], PlayerInfo[playerid][pVIPExpDate]);
  9768. SendClientMessage(playerid, COLOR_GRAD2, str);
  9769. return 1;
  9770. }
  9771. if(listitem == 16) // Knife
  9772. {
  9773. if(PlayerInfo[playerid][pConnectTime] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this exchange.");
  9774. if(PlayerInfo[playerid][pTikis] < 15) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9775. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9776. PlayerInfo[playerid][pTikis] -= 15;
  9777. GivePlayerGun(playerid, 4);
  9778. SendClientMessage(playerid, COLOR_GREY, "You exchanged 15 tikis for a Knife.");
  9779. return 1;
  9780. }
  9781. }
  9782. return 1;
  9783. }
  9784. if(dialogid == 94) //Pickpocket
  9785. {
  9786. if(response)
  9787. {
  9788. new giveplayerid = Robbing[playerid];
  9789. if(IsPlayerConnected(giveplayerid) && BeingRobbed[giveplayerid] == playerid)
  9790. {
  9791. if(IsPlayerInRangeOfPlayer(1.0, playerid, giveplayerid))
  9792. {
  9793. if(listitem == 0) // Cash
  9794. {
  9795. if(PlayerInfo[giveplayerid][pCash] > 0)
  9796. {
  9797. new lvl = convertToLevel(JOBID_THIEF, PlayerInfo[playerid][pThieveSkill]);
  9798. new randmoney = lvl * random(PlayerInfo[giveplayerid][pCash] / 20);
  9799. if(randmoney < 0 || randmoney > 500000)
  9800. {
  9801. SendClientMessage(playerid, COLOR_GREY, "That dropped the money.");
  9802. Robbing[playerid] = 999;
  9803. BeingRobbed[giveplayerid] = 999;
  9804. return 1;
  9805. }
  9806. format(str, sizeof(str), "~w~Robbed %s~n~~g~$%d stolen.", PlayerICName(giveplayerid), randmoney);
  9807. displayCenterHUDInfo(playerid, str, 8);
  9808. format(str, sizeof(str), "~w~Robbed by %s~n~~r~$%d lost.", PlayerICName(playerid), randmoney);
  9809. displayCenterHUDInfo(giveplayerid, str, 8);
  9810. GiveMoney(playerid, randmoney);
  9811. GiveMoney(giveplayerid, -randmoney);
  9812. }
  9813. else
  9814. {
  9815. DisplayDialogForPlayer(playerid, 94);
  9816. return SendClientMessage(playerid, COLOR_GREY, "That player does not have any money on them.");
  9817. }
  9818. }
  9819. if(listitem == 1) // Crack
  9820. {
  9821. if(PlayerInfo[giveplayerid][pCocaine] > 0)
  9822. {
  9823. new lvl = convertToLevel(JOBID_THIEF, PlayerInfo[playerid][pThieveSkill]);
  9824. new randcrack = lvl * random(PlayerInfo[giveplayerid][pCocaine] / 5);
  9825. if(randcrack < 0 || randcrack > 500000)
  9826. {
  9827. SendClientMessage(playerid, COLOR_GREY, "That dropped the crack.");
  9828. Robbing[playerid] = 999;
  9829. BeingRobbed[giveplayerid] = 999;
  9830. return 1;
  9831. }
  9832. format(str, sizeof(str), "~w~Robbed %s~n~~g~%d grams of crack stolen.", PlayerICName(giveplayerid), randcrack);
  9833. displayCenterHUDInfo(playerid, str, 8);
  9834. format(str, sizeof(str), "~w~Robbed by %s~n~~r~%d grams of crak lost.", PlayerICName(playerid), randcrack);
  9835. displayCenterHUDInfo(giveplayerid, str, 8);
  9836. PlayerInfo[playerid][pCocaine] -= randcrack;
  9837. PlayerInfo[giveplayerid][pCocaine] += randcrack;
  9838. }
  9839. else
  9840. {
  9841. DisplayDialogForPlayer(playerid, 94);
  9842. return SendClientMessage(playerid, COLOR_GREY, "That player does not have any crack on them.");
  9843. }
  9844. }
  9845. if(listitem == 2) // Pot
  9846. {
  9847. if(PlayerInfo[giveplayerid][pCannabis] > 0)
  9848. {
  9849. new lvl = convertToLevel(JOBID_THIEF, PlayerInfo[playerid][pThieveSkill]);
  9850. new randpot = lvl * random(PlayerInfo[giveplayerid][pCannabis] / 5);
  9851. if(randpot < 0 || randpot > 500000)
  9852. {
  9853. SendClientMessage(playerid, COLOR_GREY, "That dropped the pot.");
  9854. Robbing[playerid] = 999;
  9855. BeingRobbed[giveplayerid] = 999;
  9856. return 1;
  9857. }
  9858. format(str, sizeof(str), "~w~Robbed %s~n~~g~%d grams of pot stolen.", PlayerICName(giveplayerid), randpot);
  9859. displayCenterHUDInfo(playerid, str, 8);
  9860. format(str, sizeof(str), "~w~Robbed by %s~n~~r~%d grams of pot lost.", PlayerICName(playerid), randpot);
  9861. displayCenterHUDInfo(giveplayerid, str, 8);
  9862. PlayerInfo[playerid][pCannabis] -= randpot;
  9863. PlayerInfo[giveplayerid][pCannabis] += randpot;
  9864. }
  9865. else
  9866. {
  9867. DisplayDialogForPlayer(playerid, 94);
  9868. return SendClientMessage(playerid, COLOR_GREY, "That player does not have any pot on them.");
  9869. }
  9870. }
  9871. if(listitem == 3) // Materials
  9872. {
  9873. if(PlayerInfo[giveplayerid][pMats] > 0)
  9874. {
  9875. new lvl = convertToLevel(JOBID_THIEF, PlayerInfo[playerid][pThieveSkill]);
  9876. new randmats = lvl * random(PlayerInfo[giveplayerid][pMats] / 20);
  9877. if(randmats < 0 || randmats > 500000)
  9878. {
  9879. SendClientMessage(playerid, COLOR_GREY, "That dropped the materials.");
  9880. Robbing[playerid] = 999;
  9881. BeingRobbed[giveplayerid] = 999;
  9882. return 1;
  9883. }
  9884. format(str, sizeof(str), "~w~Robbed %s~n~~g~%d materials stolen.", PlayerICName(giveplayerid), randmats);
  9885. displayCenterHUDInfo(playerid, str, 8);
  9886. format(str, sizeof(str), "~w~Robbed by %s~n~~r~%d materials lost.", PlayerICName(playerid), randmats);
  9887. displayCenterHUDInfo(giveplayerid, str, 8);
  9888. PlayerInfo[playerid][pMats] -= randmats;
  9889. PlayerInfo[giveplayerid][pMats] += randmats;
  9890. }
  9891. else
  9892. {
  9893. DisplayDialogForPlayer(playerid, 94);
  9894. return SendClientMessage(playerid, COLOR_GREY, "That player does not have any materials on them.");
  9895. }
  9896. }
  9897. Robbing[playerid] = 999;
  9898. BeingRobbed[giveplayerid] = 999;
  9899. PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
  9900. PlayerPlaySound(giveplayerid, 1145, 0.0, 0.0, 0.0);
  9901. PlayerInfo[playerid][pThieveSkill] ++;
  9902. if(PlayerInfo[playerid][pThieveSkill] == 50)
  9903. {
  9904. SendClientMessage(playerid, COLOR_YELLOW, "* Your Pick Pocket Skill is now Level 2, you will now earn more when stealing.");
  9905. }
  9906. else if(PlayerInfo[playerid][pThieveSkill] == 250)
  9907. {
  9908. SendClientMessage(playerid, COLOR_YELLOW, "* Your Pick Pocket Skill is now Level 3, you will now earn more when stealing.");
  9909. }
  9910. else if(PlayerInfo[playerid][pThieveSkill] == 500)
  9911. {
  9912. SendClientMessage(playerid, COLOR_YELLOW, "* Your Pick Pocket Skill is now Level 4, you will now earn more when stealing.");
  9913. }
  9914. else if(PlayerInfo[playerid][pThieveSkill] == 1000)
  9915. {
  9916. SendClientMessage(playerid, COLOR_YELLOW, "* Your Pick Pocket Skill is now Level 5, you will now earn more when stealing.");
  9917. }
  9918. }
  9919. else
  9920. {
  9921. Robbing[playerid] = 999;
  9922. BeingRobbed[giveplayerid] = 999;
  9923. RobbingX[playerid] = 0.0;
  9924. RobbingY[playerid] = 0.0;
  9925. RobbingZ[playerid] = 0.0;
  9926. SendClientMessage(playerid, COLOR_GREY, "That player is not in range.");
  9927. return 1;
  9928. }
  9929. }
  9930. }
  9931. else
  9932. {
  9933. Robbing[playerid] = 999;
  9934. RobbingX[playerid] = 0.0;
  9935. RobbingY[playerid] = 0.0;
  9936. RobbingZ[playerid] = 0.0;
  9937. }
  9938. return 1;
  9939. }
  9940. if(dialogid == DIALOG_STATS1) //inv dialog
  9941. {
  9942. if(response)
  9943. {
  9944. return 0;
  9945. }
  9946. new rod[20], bait[20], baita, line[20], line1[1000], line2[1000], line3[1000];
  9947. format(rod, sizeof(rod), "%s", GetFishingRodName(PlayerInfo[playerid][pFishRod]));
  9948. format(bait, sizeof(bait), "%s", GetFishingBaitName(PlayerInfo[playerid][pBait]));
  9949. format(line, sizeof(line), "%s", GetFishingLineName(PlayerInfo[playerid][pLine]));
  9950. baita = PlayerInfo[playerid][pBaitAmount];
  9951. if(baita == 0)
  9952. bait = "None";
  9953. new packages = Packages[playerid];
  9954. new crates = Crates[playerid];
  9955. format(line1, sizeof(line1), "{007BD0}[Inventory] {CBCCCE}Materials:[%d] Cannabis:[%d.0g] Cocaine:[%d.0g] Meth[%d.0g] Package:[%d] Crates:[%d] Seeds:[%d] Products:[%d]", PlayerInfo[playerid][pMats], PlayerInfo[playerid][pCannabis], PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pMeth], packages, crates, PlayerInfo[playerid][pPotSeeds], PlayerInfo[playerid][pProducts]);
  9956. format(line2, sizeof(line2), "{007BD0}[Inventory] {D8D8D8}Ropes:[%d] Blindfolds:[%d] Cigars:[%d] Sprunk:[%d] Spraycan:[%d] Screw Driver:[%d] Deck of Cards:[%d] WTc:[%d]", PlayerInfo[playerid][pRope], PlayerInfo[playerid][pBlindfolds], PlayerInfo[playerid][pCigars], PlayerInfo[playerid][pSprunk], PlayerInfo[playerid][pSpraycan], PlayerInfo[playerid][pScrew], PlayerInfo[playerid][pDeck], PlayerInfo[playerid][pWTc]);
  9957. format(line3, sizeof(line3), "{007BD0}[Inventory] {D8D8D8}Fishing Rod:[%s] Bait:[%s] Bait Left:[%d] Fishing Line:[%s] Stereo:[%d] Box of Matches:[%d] Jerry Can:[%d]", rod, bait, baita, line, PlayerInfo[playerid][pStereo], PlayerInfo[playerid][pMatches], PlayerInfo[playerid][pJerrycan]);
  9958. SendClientMessage(playerid, COLOR_WHITE, line1);
  9959. SendClientMessage(playerid, COLOR_WHITE, line2);
  9960. SendClientMessage(playerid, COLOR_WHITE, line3);
  9961. return 1;
  9962. }
  9963. if(dialogid == DIALOG_STATS) //stats dialog
  9964. {
  9965. if(response)
  9966. {
  9967. return 0;
  9968. }
  9969. ShowStats(playerid, viewingStatsOf[playerid], true);
  9970. return 1;
  9971. }
  9972. if(dialogid == DIALOG_SKILLS) //skills dialog
  9973. {
  9974. if(response)
  9975. {
  9976. return 0;
  9977. }
  9978. return 1;
  9979. }
  9980. if(dialogid == 99)
  9981. {
  9982. if(response)
  9983. {
  9984. SetTimerEx("Timer_UseBM", 30000, 0, "i", playerid);
  9985. SendClientMessage(playerid, COLOR_GREY, "You must wait 30 seconds before purchasing another weapon.");
  9986. UseBMTimer[playerid] = 1;
  9987. if(listitem == 0) // Deagle
  9988. {
  9989. if(PlayerInfo[playerid][pCash] < 80000)
  9990. {
  9991. TogglePlayerControllable(playerid, true);
  9992. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9993. }
  9994. else
  9995. {
  9996. GiveMoney(playerid, -80000);
  9997. GivePlayerGun(playerid, 24);
  9998. TogglePlayerControllable(playerid, true);
  9999. }
  10000. }
  10001. if(listitem == 1) // AK
  10002. {
  10003. if(PlayerInfo[playerid][pCash] < 150000)
  10004. {
  10005. TogglePlayerControllable(playerid, true);
  10006. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10007. }
  10008. else
  10009. {
  10010. GiveMoney(playerid, -150000);
  10011. GivePlayerGun(playerid, 30);
  10012. TogglePlayerControllable(playerid, true);
  10013. }
  10014. }
  10015. if(listitem == 2) //TEC9
  10016. {
  10017. if(PlayerInfo[playerid][pCash] < 100000)
  10018. {
  10019. TogglePlayerControllable(playerid, true);
  10020. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10021. }
  10022. else
  10023. {
  10024. GiveMoney(playerid, -100000);
  10025. GivePlayerGun(playerid, 32);
  10026. TogglePlayerControllable(playerid, true);
  10027. }
  10028. }
  10029. if(listitem == 3) //UZI
  10030. {
  10031. if(PlayerInfo[playerid][pCash] < 100000)
  10032. {
  10033. TogglePlayerControllable(playerid, true);
  10034. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10035. }
  10036. else
  10037. {
  10038. GiveMoney(playerid, -100000);
  10039. GivePlayerGun(playerid, 28);
  10040. TogglePlayerControllable(playerid, true);
  10041. }
  10042. }
  10043. }
  10044. return 1;
  10045. }
  10046. if(dialogid == 100)
  10047. {
  10048. if(response)
  10049. {
  10050. BMPurchased[playerid] += 1;
  10051. if(BMPurchased[playerid] == 2)
  10052. {
  10053. SetTimerEx("Timer_UseBM", 30000, 0, "i", playerid);
  10054. UseBMTimer[playerid] = 1;
  10055. SendClientMessage(playerid, COLOR_GREY, "You must wait 30 seconds before purchasing another weapon.");
  10056. }
  10057. if(listitem == 0) // Deagle
  10058. {
  10059. if(PlayerInfo[playerid][pCash] < 60000)
  10060. {
  10061. TogglePlayerControllable(playerid, true);
  10062. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10063. }
  10064. else
  10065. {
  10066. GiveMoney(playerid, -60000);
  10067. GivePlayerGun(playerid, 24);
  10068. TogglePlayerControllable(playerid, true);
  10069. }
  10070. }
  10071. if(listitem == 1) // Knife
  10072. {
  10073. if(PlayerInfo[playerid][pCash] < 1000000)
  10074. {
  10075. TogglePlayerControllable(playerid, true);
  10076. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10077. }
  10078. else
  10079. {
  10080. GiveMoney(playerid, -1000000);
  10081. GivePlayerGun(playerid, 4);
  10082. TogglePlayerControllable(playerid, true);
  10083. }
  10084. }
  10085. if(listitem == 2) // AK
  10086. {
  10087. if(PlayerInfo[playerid][pCash] < 100000)
  10088. {
  10089. TogglePlayerControllable(playerid, true);
  10090. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10091. }
  10092. else
  10093. {
  10094. GiveMoney(playerid, -100000);
  10095. GivePlayerGun(playerid, 30);
  10096. TogglePlayerControllable(playerid, true);
  10097. }
  10098. }
  10099. if(listitem == 3) //TEC9
  10100. {
  10101. if(PlayerInfo[playerid][pCash] < 50000)
  10102. {
  10103. TogglePlayerControllable(playerid, true);
  10104. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10105. }
  10106. else
  10107. {
  10108. GiveMoney(playerid, -50000);
  10109. GivePlayerGun(playerid, 32);
  10110. TogglePlayerControllable(playerid, true);
  10111. }
  10112. }
  10113. if(listitem == 4) //UZI
  10114. {
  10115. if(PlayerInfo[playerid][pCash] < 50000)
  10116. {
  10117. TogglePlayerControllable(playerid, true);
  10118. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10119. }
  10120. else
  10121. {
  10122. GiveMoney(playerid, -50000);
  10123. GivePlayerGun(playerid, 28);
  10124. TogglePlayerControllable(playerid, true);
  10125. }
  10126. }
  10127. }
  10128. return 1;
  10129. }
  10130. if(dialogid == 3325)
  10131. {
  10132. if(response)
  10133. {
  10134. BMPurchased[playerid] += 1;
  10135. if(BMPurchased[playerid] == 2)
  10136. {
  10137. SetTimerEx("Timer_UseBM", 30000, 0, "i", playerid);
  10138. UseBMTimer[playerid] = 1;
  10139. SendClientMessage(playerid, COLOR_GREY, "You must wait 30 seconds before purchasing another weapon.");
  10140. }
  10141. if(listitem == 0) // Deagle
  10142. {
  10143. if(PlayerInfo[playerid][pCash] < 30000)
  10144. {
  10145. TogglePlayerControllable(playerid, true);
  10146. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10147. }
  10148. else
  10149. {
  10150. GiveMoney(playerid, -30000);
  10151. GivePlayerGun(playerid, 24);
  10152. TogglePlayerControllable(playerid, true);
  10153. }
  10154. }
  10155. if(listitem == 1) // Knife
  10156. {
  10157. if(PlayerInfo[playerid][pCash] < 600000)
  10158. {
  10159. TogglePlayerControllable(playerid, true);
  10160. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10161. }
  10162. else
  10163. {
  10164. GiveMoney(playerid, -600000);
  10165. GivePlayerGun(playerid, 4);
  10166. TogglePlayerControllable(playerid, true);
  10167. }
  10168. }
  10169. if(listitem == 2) // AK
  10170. {
  10171. if(PlayerInfo[playerid][pCash] < 60000)
  10172. {
  10173. TogglePlayerControllable(playerid, true);
  10174. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10175. }
  10176. else
  10177. {
  10178. GiveMoney(playerid, -60000);
  10179. GivePlayerGun(playerid, 30);
  10180. TogglePlayerControllable(playerid, true);
  10181. }
  10182. }
  10183. if(listitem == 3) //TEC9
  10184. {
  10185. if(PlayerInfo[playerid][pCash] < 25000)
  10186. {
  10187. TogglePlayerControllable(playerid, true);
  10188. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10189. }
  10190. else
  10191. {
  10192. GiveMoney(playerid, -25000);
  10193. GivePlayerGun(playerid, 32);
  10194. TogglePlayerControllable(playerid, true);
  10195. }
  10196. }
  10197. if(listitem == 4) //UZI
  10198. {
  10199. if(PlayerInfo[playerid][pCash] < 50000)
  10200. {
  10201. TogglePlayerControllable(playerid, true);
  10202. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10203. }
  10204. else
  10205. {
  10206. GiveMoney(playerid, -25000);
  10207. GivePlayerGun(playerid, 28);
  10208. TogglePlayerControllable(playerid, true);
  10209. }
  10210. }
  10211. if(listitem == 5) //Sniper
  10212. {
  10213. if(PlayerInfo[playerid][pCash] < 80000)
  10214. {
  10215. TogglePlayerControllable(playerid, true);
  10216. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10217. }
  10218. else
  10219. {
  10220. GiveMoney(playerid, -80000);
  10221. GivePlayerGun(playerid, 34);
  10222. TogglePlayerControllable(playerid, true);
  10223. }
  10224. }
  10225. }
  10226. return 1;
  10227. }
  10228. if(dialogid == 101)
  10229. {
  10230. if(response)
  10231. Dialog_NeonResponse(playerid, listitem);
  10232. return 1;
  10233. }
  10234. if(dialogid == 102)
  10235. {
  10236. if(response)
  10237. {
  10238. switch(listitem)
  10239. {
  10240. case 0: // Fishing Rod
  10241. {
  10242. DisplayDialogForPlayer(playerid, 103);
  10243. }
  10244. case 1: // Fishing Bait
  10245. {
  10246. DisplayDialogForPlayer(playerid, 104);
  10247. }
  10248. case 2: // Fishing Line
  10249. {
  10250. DisplayDialogForPlayer(playerid, 105);
  10251. }
  10252. }
  10253. }
  10254. return 1;
  10255. }
  10256. if(dialogid == 103)
  10257. {
  10258. if(response)
  10259. {
  10260. switch(listitem)
  10261. {
  10262. case 0: // Old Rod
  10263. {
  10264. if(PlayerInfo[playerid][pCash] < 200)
  10265. {
  10266. TogglePlayerControllable(playerid, true);
  10267. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10268. }
  10269. else
  10270. {
  10271. GiveMoney(playerid, -200);
  10272. PlayerInfo[playerid][pFishRod] = 1;
  10273. TogglePlayerControllable(playerid, true);
  10274. SendClientMessage(playerid, COLOR_GREY, "You purchased an old rod.");
  10275. }
  10276. }
  10277. case 1: // Beginners Rod
  10278. {
  10279. if(PlayerInfo[playerid][pCash] < 1000)
  10280. {
  10281. TogglePlayerControllable(playerid, true);
  10282. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10283. }
  10284. else
  10285. {
  10286. GiveMoney(playerid, -1000);
  10287. PlayerInfo[playerid][pFishRod] = 2;
  10288. TogglePlayerControllable(playerid, true);
  10289. SendClientMessage(playerid, COLOR_GREY, "You purchased a beginners rod.");
  10290. }
  10291. }
  10292. case 2: // Fisherman's Rod
  10293. {
  10294. if(PlayerInfo[playerid][pCash] < 5000)
  10295. {
  10296. TogglePlayerControllable(playerid, true);
  10297. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10298. }
  10299. else
  10300. {
  10301. GiveMoney(playerid, -5000);
  10302. PlayerInfo[playerid][pFishRod] = 3;
  10303. TogglePlayerControllable(playerid, true);
  10304. SendClientMessage(playerid, COLOR_GREY, "You purchased a fishermans rod.");
  10305. }
  10306. }
  10307. case 3: // Elite Rod
  10308. {
  10309. if(PlayerInfo[playerid][pCash] < 15000)
  10310. {
  10311. TogglePlayerControllable(playerid, true);
  10312. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10313. }
  10314. else
  10315. {
  10316. GiveMoney(playerid, -15000);
  10317. PlayerInfo[playerid][pFishRod] = 4;
  10318. TogglePlayerControllable(playerid, true);
  10319. SendClientMessage(playerid, COLOR_GREY, "You purchased an elite rod.");
  10320. }
  10321. }
  10322. }
  10323. }
  10324. return 1;
  10325. }
  10326. if(dialogid == 104)
  10327. {
  10328. if(response)
  10329. {
  10330. switch(listitem)
  10331. {
  10332. case 0: // Weak Bait
  10333. {
  10334. if(PlayerInfo[playerid][pCash] < 150)
  10335. {
  10336. TogglePlayerControllable(playerid, true);
  10337. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10338. }
  10339. else
  10340. {
  10341. GiveMoney(playerid, -150);
  10342. PlayerInfo[playerid][pBait] = 1;
  10343. TogglePlayerControllable(playerid, true);
  10344. SendClientMessage(playerid, COLOR_GREY, "You purchased 10 pieces of weak bait.");
  10345. PlayerInfo[playerid][pBaitAmount] = 10;
  10346. }
  10347. }
  10348. case 1: // Regular Bait
  10349. {
  10350. if(PlayerInfo[playerid][pCash] < 500)
  10351. {
  10352. TogglePlayerControllable(playerid, true);
  10353. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10354. }
  10355. else
  10356. {
  10357. GiveMoney(playerid, -500);
  10358. PlayerInfo[playerid][pBait] = 2;
  10359. TogglePlayerControllable(playerid, true);
  10360. SendClientMessage(playerid, COLOR_GREY, "You purchased 10 pieces of regular bait.");
  10361. PlayerInfo[playerid][pBaitAmount] = 10;
  10362. }
  10363. }
  10364. case 2: // Strong Bait
  10365. {
  10366. if(PlayerInfo[playerid][pCash] < 1500)
  10367. {
  10368. TogglePlayerControllable(playerid, true);
  10369. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10370. }
  10371. else
  10372. {
  10373. GiveMoney(playerid, -1500);
  10374. PlayerInfo[playerid][pBait] = 3;
  10375. TogglePlayerControllable(playerid, true);
  10376. SendClientMessage(playerid, COLOR_GREY, "You purchased 10 pieces of strong bait.");
  10377. PlayerInfo[playerid][pBaitAmount] = 10;
  10378. }
  10379. }
  10380. case 3: // Elite Bait
  10381. {
  10382. if(PlayerInfo[playerid][pCash] < 2500)
  10383. {
  10384. TogglePlayerControllable(playerid, true);
  10385. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10386. }
  10387. else
  10388. {
  10389. GiveMoney(playerid, -2500);
  10390. PlayerInfo[playerid][pBait] = 4;
  10391. TogglePlayerControllable(playerid, true);
  10392. SendClientMessage(playerid, COLOR_GREY, "You purchased 10 pieces of elite bait.");
  10393. PlayerInfo[playerid][pBaitAmount] = 10;
  10394. }
  10395. }
  10396. }
  10397. }
  10398. return 1;
  10399. }
  10400. if(dialogid == 105)
  10401. {
  10402. if(response)
  10403. {
  10404. switch(listitem)
  10405. {
  10406. case 0: // Fishing Line
  10407. {
  10408. if(PlayerInfo[playerid][pCash] < 1000)
  10409. {
  10410. TogglePlayerControllable(playerid, true);
  10411. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10412. }
  10413. else
  10414. {
  10415. GiveMoney(playerid, -1000);
  10416. PlayerInfo[playerid][pLine] = 1;
  10417. TogglePlayerControllable(playerid, true);
  10418. SendClientMessage(playerid, COLOR_GREY, "You purchased a fishing line.");
  10419. }
  10420. }
  10421. }
  10422. }
  10423. return 1;
  10424. }
  10425. if(dialogid == 107) //donut store
  10426. {
  10427. if(response)
  10428. {
  10429. new biz = GetPlayerVirtualWorld(playerid);
  10430. if(strlen(inputtext))
  10431. {
  10432. if(!IsNumeric(inputtext))
  10433. {
  10434. return SendClientMessage(playerid, COLOR_GREY, "You must type a number.");
  10435. }
  10436. if(strcmp(inputtext, "1", true) == 0) //Sprunk
  10437. {
  10438. if(GetMoney(playerid) < 2)
  10439. {
  10440. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  10441. }
  10442. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  10443. displayCenterHUDInfo(playerid, "~r~Sprunk~w~ purchased!~n~type ~y~/usesoda~w~ to use, LMB to drink, press F to drop.", 8); //display for 8 seconds
  10444. GiveMoney(playerid, -2);
  10445. BizInfo[biz][bTill] += 2;
  10446. BizInfo[biz][bProducts] -= 1;
  10447. }
  10448. else if(strcmp(inputtext, "2", true) == 0) //Coffee
  10449. {
  10450. if(GetMoney(playerid) < 5)
  10451. {
  10452. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  10453. }
  10454. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  10455. displayCenterHUDInfo(playerid, "~r~Coffee~w~ purchased!~n~type ~y~/usesoda~w~ to use, LMB to drink, press F to drop.", 8); //display for 8 seconds
  10456. GiveMoney(playerid, -1);
  10457. BizInfo[biz][bTill] += 2;
  10458. BizInfo[biz][bProducts] -= 1;
  10459. }
  10460. else if(strcmp(inputtext, "3", true) == 0) //Donut Tray
  10461. {
  10462. if(boughtFoodTimer[playerid])
  10463. {
  10464. return SendClientMessage(playerid, COLOR_GREY, "You must wait 1 minute before buying another Meal.");
  10465. }
  10466. if(GetMoney(playerid) < 100)
  10467. {
  10468. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  10469. }
  10470. if(hasFoodTray[playerid])
  10471. {
  10472. return SendClientMessage(playerid, COLOR_GREY, "You are already holding a meal, type /preparefood then type /eat to eat it.");
  10473. }
  10474. if(IsACop(playerid))
  10475. {
  10476. displayCenterHUDInfo(playerid, "~r~Donut Tray~w~ purchased!~n~type ~y~/preparefood~w~ to prepare your meal~n~~w~then ~y~/eat~w~ to eat it.", 8); //display for 8 seconds
  10477. format(str, sizeof(str), "* %s has bought a Donut Tray.", PlayerICName(playerid));
  10478. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  10479. GiveMoney(playerid, -70);
  10480. }
  10481. else
  10482. {
  10483. displayCenterHUDInfo(playerid, "~r~Donut Tray~w~ purchased!~n~type ~y~/preparefood~w~ to prepare your meal~n~~w~then ~y~/eat~w~ to eat it.", 8); //display for 8 seconds
  10484. format(str, sizeof(str), "* %s has bought a Donut Tray.", PlayerICName(playerid));
  10485. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  10486. GiveMoney(playerid, -100);
  10487. }
  10488. hasFoodTray[playerid] = 4; //donuts
  10489. givePlayerFoodTray(playerid, hasFoodTray[playerid]);
  10490. BizInfo[biz][bTill] += 2;
  10491. BizInfo[biz][bProducts] -= 1;
  10492. SetTimerEx("boughtFood", 60 *1000, 0, "i", playerid); //1 minute
  10493. boughtFoodTimer[playerid] = true;
  10494. }
  10495. if(BizInfo[biz][bProducts] <= 0) SetNoProductsDate(biz);
  10496. }
  10497. }
  10498. return 1;
  10499. }
  10500. //radio stuff
  10501. if(dialogid == 108)
  10502. {
  10503. if(response)
  10504. {
  10505. if(listitem == 0)
  10506. {
  10507. //di.fm
  10508. DisplayDialogForPlayer(playerid, 109);
  10509. }
  10510. else if(listitem == 1)
  10511. {
  10512. //soma.fm
  10513. DisplayDialogForPlayer(playerid, 110);
  10514. }
  10515. else if(listitem == 2)
  10516. {
  10517. //etn.fm
  10518. DisplayDialogForPlayer(playerid, 111);
  10519. }
  10520. else if(listitem == 3)
  10521. {
  10522. //infowars radio
  10523. DisplayDialogForPlayer(playerid, 112);
  10524. }
  10525. else if(listitem == 4)
  10526. {
  10527. // custom
  10528. DisplayDialogForPlayer(playerid, 113);
  10529. }
  10530. else if(listitem == 5)
  10531. {
  10532. // turn off
  10533. usingRadio[playerid] = 0;
  10534. StopAudioStreamForPlayer(playerid);
  10535. }
  10536. }
  10537. return 1;
  10538. }
  10539. if(dialogid == 109)
  10540. {
  10541. //di.fm
  10542. if(response)
  10543. {
  10544. switch(listitem)
  10545. {
  10546. case 0:
  10547. {
  10548. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/classicvocaltrance.pls");
  10549. usingRadio[playerid] = 1;
  10550. }
  10551. case 1:
  10552. {
  10553. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/ukgarage.pls");
  10554. usingRadio[playerid] = 1;
  10555. }
  10556. case 2:
  10557. {
  10558. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/trance.pls");
  10559. usingRadio[playerid] = 1;
  10560. }
  10561. case 3:
  10562. {
  10563. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/vocaltrance.pls");
  10564. usingRadio[playerid] = 1;
  10565. }
  10566. case 4:
  10567. {
  10568. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/techhouse.pls");
  10569. usingRadio[playerid] = 1;
  10570. }
  10571. case 5:
  10572. {
  10573. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/psychill.pls");
  10574. usingRadio[playerid] = 1;
  10575. }
  10576. case 6:
  10577. {
  10578. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/chilloutdreams.pls");
  10579. usingRadio[playerid] = 1;
  10580. }
  10581. case 7:
  10582. {
  10583. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/classictrance.pls");
  10584. usingRadio[playerid] = 1;
  10585. }
  10586. case 8:
  10587. {
  10588. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/eurodance.pls");
  10589. usingRadio[playerid] = 1;
  10590. }
  10591. case 9:
  10592. {
  10593. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/club.pls");
  10594. usingRadio[playerid] = 1;
  10595. }
  10596. case 10:
  10597. {
  10598. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/discohouse.pls");
  10599. usingRadio[playerid] = 1;
  10600. }
  10601. case 11:
  10602. {
  10603. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/dubstep.pls");
  10604. usingRadio[playerid] = 1;
  10605. }
  10606. case 12:
  10607. {
  10608. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/electro.pls");
  10609. usingRadio[playerid] = 1;
  10610. }
  10611. case 13:
  10612. {
  10613. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/chillout.pls");
  10614. usingRadio[playerid] = 1;
  10615. }
  10616. case 14:
  10617. {
  10618. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/classiceurodance.pls");
  10619. usingRadio[playerid] = 1;
  10620. }
  10621. case 15:
  10622. {
  10623. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/house.pls");
  10624. usingRadio[playerid] = 1;
  10625. }
  10626. case 16:
  10627. {
  10628. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/soulfulhouse.pls");
  10629. usingRadio[playerid] = 1;
  10630. }
  10631. case 17:
  10632. {
  10633. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/funkyhouse.pls");
  10634. usingRadio[playerid] = 1;
  10635. }
  10636. case 18:
  10637. {
  10638. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/tribalhouse.pls");
  10639. usingRadio[playerid] = 1;
  10640. }
  10641. case 19:
  10642. {
  10643. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/harddance.pls");
  10644. usingRadio[playerid] = 1;
  10645. }
  10646. case 20:
  10647. {
  10648. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/minimal.pls");
  10649. usingRadio[playerid] = 1;
  10650. }
  10651. case 21:
  10652. {
  10653. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/techno.pls");
  10654. usingRadio[playerid] = 1;
  10655. }
  10656. case 22:
  10657. {
  10658. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/progressive.pls");
  10659. usingRadio[playerid] = 1;
  10660. }
  10661. case 23:
  10662. {
  10663. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/goapsy.pls");
  10664. usingRadio[playerid] = 1;
  10665. }
  10666. case 24:
  10667. {
  10668. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/hardstyle.pls");
  10669. usingRadio[playerid] = 1;
  10670. }
  10671. case 25:
  10672. {
  10673. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/hardcore.pls");
  10674. usingRadio[playerid] = 1;
  10675. }
  10676. case 26:
  10677. {
  10678. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/lounge.pls");
  10679. usingRadio[playerid] = 1;
  10680. }
  10681. case 27:
  10682. {
  10683. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/exposurenyc.pls");
  10684. usingRadio[playerid] = 1;
  10685. }
  10686. case 28:
  10687. {
  10688. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/djmixes.pls");
  10689. usingRadio[playerid] = 1;
  10690. }
  10691. case 29:
  10692. {
  10693. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/drumandbass.pls");
  10694. usingRadio[playerid] = 1;
  10695. }
  10696. case 30:
  10697. {
  10698. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/liquiddnb.pls");
  10699. usingRadio[playerid] = 1;
  10700. }
  10701. case 31:
  10702. {
  10703. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/classictechno.pls");
  10704. usingRadio[playerid] = 1;
  10705. }
  10706. case 32:
  10707. {
  10708. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/breaks.pls");
  10709. usingRadio[playerid] = 1;
  10710. }
  10711. case 33:
  10712. {
  10713. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/ambient.pls");
  10714. usingRadio[playerid] = 1;
  10715. }
  10716. case 34:
  10717. {
  10718. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/spacemusic.pls");
  10719. usingRadio[playerid] = 1;
  10720. }
  10721. case 35:
  10722. {
  10723. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/futuresynthpop.pls");
  10724. usingRadio[playerid] = 1;
  10725. }
  10726. case 36:
  10727. {
  10728. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/oldschoolhouse.pls");
  10729. usingRadio[playerid] = 1;
  10730. }
  10731. case 37:
  10732. {
  10733. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/chiptunes.pls");
  10734. usingRadio[playerid] = 1;
  10735. }
  10736. case 38:
  10737. {
  10738. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/gabber.pls");
  10739. usingRadio[playerid] = 1;
  10740. }
  10741. case 39:
  10742. {
  10743. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/latinhouse.pls");
  10744. usingRadio[playerid] = 1;
  10745. }
  10746. }
  10747. }
  10748. else
  10749. {
  10750. DisplayDialogForPlayer(playerid, 108); //radio main
  10751. }
  10752. return 1;
  10753. }
  10754. // Trunk start
  10755. if(dialogid == TRUNK_PUT_STUFF) //Trunk put stuff
  10756. {
  10757. if(response)
  10758. {
  10759. if(listitem == 0) //Put gun
  10760. {
  10761. if(PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can use this."); //selling to another
  10762. if(IsACop(playerid) == 1 || IsANG(playerid) == 1 || IsAMedic(playerid) == 1 || IsASenate(playerid) || PlayerInfo[playerid][pMember] == FACTION_SANG) return SendClientMessage(playerid, COLOR_GRAD1, "Cops/DEA/SANG/DoC/SAFMD can not use this.");
  10763. ShowPlayerDialog(playerid, TRUNKPUTGUN, DIALOG_STYLE_LIST, "Put a gun in this trunk", "Slot 1\nSlot 2", "Put", "Cancel"); //Trunk put gun
  10764. return 1;
  10765. }
  10766. if(listitem == 1) //Put armor
  10767. {
  10768. if(IsACop(playerid) == 1 || IsANG(playerid) == 1 || IsAMedic(playerid) == 1 || IsASenate(playerid) || PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pMember] == FACTION_SANG) return SendClientMessage(playerid, COLOR_GRAD1, "Cops/DEA/SANG/DoC/SAFMD/News can not use this.");
  10769. new counter = 0;
  10770. new vid;
  10771. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10772. for(new i; i != MAX_VEHICLES; i++)
  10773. {
  10774. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  10775. if(dist)
  10776. {
  10777. vid = i;
  10778. counter++;
  10779. }
  10780. }
  10781. switch(counter)
  10782. {
  10783. case 0:
  10784. {
  10785. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  10786. return 1;
  10787. }
  10788. case 1:
  10789. {
  10790. if(IsPlayerInAnyVehicle(playerid))
  10791. {
  10792. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  10793. return 1;
  10794. }
  10795. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  10796. {
  10797. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  10798. return 1;
  10799. }
  10800. if(TrunkInfo[vid][cTrunkOpened] != 1)
  10801. {
  10802. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  10803. return 1;
  10804. }
  10805. GetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
  10806. if(PlayerInfo[playerid][pArmor] != 0)
  10807. {
  10808. TrunkInfo[vid][cArmor] = PlayerInfo[playerid][pArmor];
  10809. SetPlayerArmour(playerid, 0);
  10810. PlayerInfo[playerid][pArmor] = 0;
  10811. format(str, sizeof(str), "* %s puts a vest in the trunk.", PlayerICName(playerid));
  10812. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  10813. return 1;
  10814. }
  10815. else
  10816. {
  10817. SendClientMessage(playerid, COLOR_GREY, "You haven't got any armour ");
  10818. return 1;
  10819. }
  10820. }
  10821. default:
  10822. {
  10823. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  10824. return 1;
  10825. }
  10826. }
  10827. return 1;
  10828. }
  10829. if(listitem == 2) // Put cocaine
  10830. {
  10831. ShowPlayerDialog(playerid, TRUNK_PUT_COCAINE, DIALOG_STYLE_INPUT, "Put cocaine", "How many grams of cocaine do you want to put?", "Put", "Cancel"); //Trunk put crack
  10832. }
  10833. if(listitem == 3) // Put cannabis
  10834. {
  10835. ShowPlayerDialog(playerid, TRUNK_PUT_CANNABIS, DIALOG_STYLE_INPUT, "Put cannabis", "How many grams of cannabis do you want to put?", "Put", "Cancel"); //Trunk put pot
  10836. }
  10837. if(listitem == 4) // Put meth
  10838. {
  10839. ShowPlayerDialog(playerid, TRUNK_PUT_METH, DIALOG_STYLE_INPUT, "Put meth", "How many grams of meth do you want to put?", "Put", "Cancel"); //Trunk put pot
  10840. }
  10841. if(listitem == 5) // Put xanax
  10842. {
  10843. ShowPlayerDialog(playerid, TRUNK_PUT_XANAX, DIALOG_STYLE_INPUT, "Put xanax", "How many tabs of xanax do you want to put?", "Put", "Cancel"); //Trunk put pot
  10844. }
  10845. if(listitem == 6) //Put food tray
  10846. {
  10847. new counter = 0;
  10848. new vid;
  10849. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10850. for(new i; i != MAX_VEHICLES; i++)
  10851. {
  10852. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  10853. if(dist)
  10854. {
  10855. vid = i;
  10856. counter++;
  10857. }
  10858. }
  10859. switch(counter)
  10860. {
  10861. case 0:
  10862. {
  10863. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  10864. return 1;
  10865. }
  10866. case 1:
  10867. {
  10868. if(IsPlayerInAnyVehicle(playerid))
  10869. {
  10870. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car.");
  10871. return 1;
  10872. }
  10873. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  10874. {
  10875. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  10876. return 1;
  10877. }
  10878. if(TrunkInfo[vid][cTrunkOpened] != 1)
  10879. {
  10880. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first.");
  10881. return 1;
  10882. }
  10883. if(!hasFoodTray[playerid])
  10884. {
  10885. SendClientMessage(playerid, COLOR_GREY, "You are not carrying a food tray.");
  10886. return 1;
  10887. }
  10888. if(TrunkInfo[vid][cFoodtray])
  10889. {
  10890. SendClientMessage(playerid, COLOR_GREY, "There's already a food tray in the trunk.");
  10891. return 1;
  10892. }
  10893. TrunkInfo[vid][cFoodtray] = hasFoodTray[playerid];
  10894. throwAwayFoodTray(playerid);
  10895. format(str, sizeof(str), "* %s puts a food tray in the trunk.", PlayerICName(playerid));
  10896. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  10897. return 1;
  10898. }
  10899. default:
  10900. {
  10901. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range.");
  10902. return 1;
  10903. }
  10904. }
  10905. return 1;
  10906. }
  10907. }
  10908. return 1;
  10909. }
  10910. if(dialogid == TRUNKPUTGUN) //Trunk put gun
  10911. {
  10912. if(response)
  10913. {
  10914. if(listitem == 0) //Put gun 1
  10915. {
  10916. new counter = 0;
  10917. new vid;
  10918. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10919. for(new i; i != MAX_VEHICLES; i++)
  10920. {
  10921. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  10922. if(dist)
  10923. {
  10924. vid = i;
  10925. counter++;
  10926. }
  10927. }
  10928. switch(counter)
  10929. {
  10930. case 0:
  10931. {
  10932. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  10933. }
  10934. case 1:
  10935. {
  10936. if(TrunkInfo[vid][cGun1] == 0)
  10937. {
  10938. if(IsPlayerInAnyVehicle(playerid))
  10939. {
  10940. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  10941. return 1;
  10942. }
  10943. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  10944. {
  10945. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  10946. return 1;
  10947. }
  10948. if(TrunkInfo[vid][cTrunkOpened] != 1)
  10949. {
  10950. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  10951. return 1;
  10952. }
  10953. new buffer[512];
  10954. new gunname[100];
  10955. new gunID = GetPlayerWeapon(playerid);
  10956. new pgun0 = PlayerInfo[playerid][pGun0];
  10957. new pgun1 = PlayerInfo[playerid][pGun1];
  10958. new pgun2 = PlayerInfo[playerid][pGun2];
  10959. new pgun3 = PlayerInfo[playerid][pGun3];
  10960. new pgun4 = PlayerInfo[playerid][pGun4];
  10961. new pgun5 = PlayerInfo[playerid][pGun5];
  10962. new pgun6 = PlayerInfo[playerid][pGun6];
  10963. new pgun7 = PlayerInfo[playerid][pGun7];
  10964. new pgun8 = PlayerInfo[playerid][pGun8];
  10965. new pgun9 = PlayerInfo[playerid][pGun9];
  10966. new pgun10 = PlayerInfo[playerid][pGun10];
  10967. new pgun11 = PlayerInfo[playerid][pGun11];
  10968. new pgun12 = PlayerInfo[playerid][pGun12];
  10969. if(pgun0 != gunID && pgun1 != gunID && pgun2 != gunID && pgun3 != gunID && pgun4 != gunID && pgun5 != gunID && pgun6 != gunID && pgun7 != gunID && pgun8 != gunID && pgun9 != gunID && pgun10 != gunID && pgun11 != gunID && pgun12 != gunID)
  10970. {
  10971. SendClientMessage(playerid, COLOR_GRAD1, "You can't place admin given weapons into a trunk.");
  10972. return 1;
  10973. }
  10974. if(gunID != 0)
  10975. {
  10976. if(gunID == 1)
  10977. {
  10978. PlayerInfo[playerid][pGun0] = 0;
  10979. }
  10980. if(gunID == 2)
  10981. {
  10982. PlayerInfo[playerid][pGun1] = 0;
  10983. }
  10984. if(gunID == 3)
  10985. {
  10986. PlayerInfo[playerid][pGun1] = 0;
  10987. }
  10988. if(gunID == 4)
  10989. {
  10990. PlayerInfo[playerid][pGun1] = 0;
  10991. }
  10992. if(gunID == 5)
  10993. {
  10994. PlayerInfo[playerid][pGun1] = 0;
  10995. }
  10996. if(gunID == 6)
  10997. {
  10998. PlayerInfo[playerid][pGun1] = 0;
  10999. }
  11000. if(gunID == 7)
  11001. {
  11002. PlayerInfo[playerid][pGun1] = 0;
  11003. }
  11004. if(gunID == 8)
  11005. {
  11006. PlayerInfo[playerid][pGun1] = 0;
  11007. }
  11008. if(gunID == 9)
  11009. {
  11010. PlayerInfo[playerid][pGun1] = 0;
  11011. }
  11012. if(gunID == 10)
  11013. {
  11014. PlayerInfo[playerid][pGun10] = 0;
  11015. }
  11016. if(gunID == 11)
  11017. {
  11018. PlayerInfo[playerid][pGun10] = 0;
  11019. }
  11020. if(gunID == 12)
  11021. {
  11022. PlayerInfo[playerid][pGun10] = 0;
  11023. }
  11024. if(gunID == 13)
  11025. {
  11026. PlayerInfo[playerid][pGun10] = 0;
  11027. }
  11028. if(gunID == 14)
  11029. {
  11030. PlayerInfo[playerid][pGun10] = 0;
  11031. }
  11032. if(gunID == 15)
  11033. {
  11034. PlayerInfo[playerid][pGun10] = 0;
  11035. }
  11036. if(gunID == 16)
  11037. {
  11038. PlayerInfo[playerid][pGun8] = 0;
  11039. }
  11040. if(gunID == 17)
  11041. {
  11042. PlayerInfo[playerid][pGun8] = 0;
  11043. }
  11044. if(gunID == 18)
  11045. {
  11046. PlayerInfo[playerid][pGun8] = 0;
  11047. }
  11048. if(gunID == 22)
  11049. {
  11050. PlayerInfo[playerid][pGun2] = 0;
  11051. }
  11052. if(gunID == 23)
  11053. {
  11054. PlayerInfo[playerid][pGun2] = 0;
  11055. }
  11056. if(gunID == 24)
  11057. {
  11058. PlayerInfo[playerid][pGun2] = 0;
  11059. }
  11060. if(gunID == 25)
  11061. {
  11062. PlayerInfo[playerid][pGun3] = 0;
  11063. }
  11064. if(gunID == 26)
  11065. {
  11066. PlayerInfo[playerid][pGun3] = 0;
  11067. }
  11068. if(gunID == 27)
  11069. {
  11070. PlayerInfo[playerid][pGun3] = 0;
  11071. }
  11072. if(gunID == 28)
  11073. {
  11074. PlayerInfo[playerid][pGun4] = 0;
  11075. }
  11076. if(gunID == 29)
  11077. {
  11078. PlayerInfo[playerid][pGun4] = 0;
  11079. }
  11080. if(gunID == 30)
  11081. {
  11082. PlayerInfo[playerid][pGun5] = 0;
  11083. }
  11084. if(gunID == 31)
  11085. {
  11086. PlayerInfo[playerid][pGun5] = 0;
  11087. }
  11088. if(gunID == 32)
  11089. {
  11090. PlayerInfo[playerid][pGun4] = 0;
  11091. }
  11092. if(gunID == 33)
  11093. {
  11094. PlayerInfo[playerid][pGun6] = 0;
  11095. }
  11096. if(gunID == 34)
  11097. {
  11098. PlayerInfo[playerid][pGun6] = 0;
  11099. }
  11100. if(gunID == 35)
  11101. {
  11102. PlayerInfo[playerid][pGun7] = 0;
  11103. }
  11104. if(gunID == 36)
  11105. {
  11106. PlayerInfo[playerid][pGun7] = 0;
  11107. }
  11108. if(gunID == 37)
  11109. {
  11110. PlayerInfo[playerid][pGun7] = 0;
  11111. }
  11112. if(gunID == 38)
  11113. {
  11114. PlayerInfo[playerid][pGun7] = 0;
  11115. }
  11116. if(gunID == 39)
  11117. {
  11118. PlayerInfo[playerid][pGun8] = 0;
  11119. }
  11120. if(gunID == 40)
  11121. {
  11122. PlayerInfo[playerid][pGun12] = 0;
  11123. }
  11124. if(gunID == 41)
  11125. {
  11126. PlayerInfo[playerid][pGun9] = 0;
  11127. }
  11128. if(gunID == 42)
  11129. {
  11130. PlayerInfo[playerid][pGun9] = 0;
  11131. }
  11132. if(gunID == 43)
  11133. {
  11134. PlayerInfo[playerid][pGun9] = 0;
  11135. }
  11136. if(gunID == 44)
  11137. {
  11138. PlayerInfo[playerid][pGun11] = 0;
  11139. }
  11140. if(gunID == 45)
  11141. {
  11142. PlayerInfo[playerid][pGun11] = 0;
  11143. }
  11144. if(gunID == 46)
  11145. {
  11146. PlayerInfo[playerid][pGun11] = 0;
  11147. }
  11148. GetWeaponName(gunID, gunname, sizeof(gunname));
  11149. TrunkInfo[vid][cGun1] = gunID;
  11150. format(buffer, sizeof(buffer), "You have put your %s in the car's trunk.", gunname);
  11151. SendClientMessage(playerid, COLOR_WHITE, buffer);
  11152. SetPlayerWeapons(playerid);
  11153. format(str, sizeof(str), "* %s puts a %s in the trunk.", PlayerICName(playerid), gunname);
  11154. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11155. return 1;
  11156. }
  11157. }
  11158. else
  11159. {
  11160. SendClientMessage(playerid, COLOR_GREY, "This slot is already taken");
  11161. return 1;
  11162. }
  11163. }
  11164. default:
  11165. {
  11166. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11167. return 1;
  11168. }
  11169. }
  11170. return 1;
  11171. }
  11172. if(listitem == 1) //Put gun 2
  11173. {
  11174. new counter = 0;
  11175. new vid;
  11176. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11177. for(new i; i != MAX_VEHICLES; i++)
  11178. {
  11179. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11180. if(dist)
  11181. {
  11182. vid = i;
  11183. counter++;
  11184. }
  11185. }
  11186. switch(counter)
  11187. {
  11188. case 0:
  11189. {
  11190. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11191. }
  11192. case 1:
  11193. {
  11194. if(TrunkInfo[vid][cGun2] == 0)
  11195. {
  11196. if(IsPlayerInAnyVehicle(playerid))
  11197. {
  11198. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  11199. return 1;
  11200. }
  11201. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11202. {
  11203. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11204. return 1;
  11205. }
  11206. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11207. {
  11208. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  11209. return 1;
  11210. }
  11211. new buffer[512];
  11212. new gunname[100];
  11213. new gunID = GetPlayerWeapon(playerid);
  11214. new pgun0 = PlayerInfo[playerid][pGun0];
  11215. new pgun1 = PlayerInfo[playerid][pGun1];
  11216. new pgun2 = PlayerInfo[playerid][pGun2];
  11217. new pgun3 = PlayerInfo[playerid][pGun3];
  11218. new pgun4 = PlayerInfo[playerid][pGun4];
  11219. new pgun5 = PlayerInfo[playerid][pGun5];
  11220. new pgun6 = PlayerInfo[playerid][pGun6];
  11221. new pgun7 = PlayerInfo[playerid][pGun7];
  11222. new pgun8 = PlayerInfo[playerid][pGun8];
  11223. new pgun9 = PlayerInfo[playerid][pGun9];
  11224. new pgun10 = PlayerInfo[playerid][pGun10];
  11225. new pgun11 = PlayerInfo[playerid][pGun11];
  11226. new pgun12 = PlayerInfo[playerid][pGun12];
  11227. if(pgun0 != gunID && pgun1 != gunID && pgun2 != gunID && pgun3 != gunID && pgun4 != gunID && pgun5 != gunID && pgun6 != gunID && pgun7 != gunID && pgun8 != gunID && pgun9 != gunID && pgun10 != gunID && pgun11 != gunID && pgun12 != gunID)
  11228. {
  11229. SendClientMessage(playerid, COLOR_GRAD1, "You can't place admin given weapons into a trunk.");
  11230. return 1;
  11231. }
  11232. if(gunID != 0)
  11233. {
  11234. if(gunID == 1)
  11235. {
  11236. PlayerInfo[playerid][pGun0] = 0;
  11237. }
  11238. if(gunID == 2)
  11239. {
  11240. PlayerInfo[playerid][pGun1] = 0;
  11241. }
  11242. if(gunID == 3)
  11243. {
  11244. PlayerInfo[playerid][pGun1] = 0;
  11245. }
  11246. if(gunID == 4)
  11247. {
  11248. PlayerInfo[playerid][pGun1] = 0;
  11249. }
  11250. if(gunID == 5)
  11251. {
  11252. PlayerInfo[playerid][pGun1] = 0;
  11253. }
  11254. if(gunID == 6)
  11255. {
  11256. PlayerInfo[playerid][pGun1] = 0;
  11257. }
  11258. if(gunID == 7)
  11259. {
  11260. PlayerInfo[playerid][pGun1] = 0;
  11261. }
  11262. if(gunID == 8)
  11263. {
  11264. PlayerInfo[playerid][pGun1] = 0;
  11265. }
  11266. if(gunID == 9)
  11267. {
  11268. PlayerInfo[playerid][pGun1] = 0;
  11269. }
  11270. if(gunID == 10)
  11271. {
  11272. PlayerInfo[playerid][pGun10] = 0;
  11273. }
  11274. if(gunID == 11)
  11275. {
  11276. PlayerInfo[playerid][pGun10] = 0;
  11277. }
  11278. if(gunID == 12)
  11279. {
  11280. PlayerInfo[playerid][pGun10] = 0;
  11281. }
  11282. if(gunID == 13)
  11283. {
  11284. PlayerInfo[playerid][pGun10] = 0;
  11285. }
  11286. if(gunID == 14)
  11287. {
  11288. PlayerInfo[playerid][pGun10] = 0;
  11289. }
  11290. if(gunID == 15)
  11291. {
  11292. PlayerInfo[playerid][pGun10] = 0;
  11293. }
  11294. if(gunID == 16)
  11295. {
  11296. PlayerInfo[playerid][pGun8] = 0;
  11297. }
  11298. if(gunID == 17)
  11299. {
  11300. PlayerInfo[playerid][pGun8] = 0;
  11301. }
  11302. if(gunID == 18)
  11303. {
  11304. PlayerInfo[playerid][pGun8] = 0;
  11305. }
  11306. if(gunID == 22)
  11307. {
  11308. PlayerInfo[playerid][pGun2] = 0;
  11309. }
  11310. if(gunID == 23)
  11311. {
  11312. PlayerInfo[playerid][pGun2] = 0;
  11313. }
  11314. if(gunID == 24)
  11315. {
  11316. PlayerInfo[playerid][pGun2] = 0;
  11317. }
  11318. if(gunID == 25)
  11319. {
  11320. PlayerInfo[playerid][pGun3] = 0;
  11321. }
  11322. if(gunID == 26)
  11323. {
  11324. PlayerInfo[playerid][pGun3] = 0;
  11325. }
  11326. if(gunID == 27)
  11327. {
  11328. PlayerInfo[playerid][pGun3] = 0;
  11329. }
  11330. if(gunID == 28)
  11331. {
  11332. PlayerInfo[playerid][pGun4] = 0;
  11333. }
  11334. if(gunID == 29)
  11335. {
  11336. PlayerInfo[playerid][pGun4] = 0;
  11337. }
  11338. if(gunID == 30)
  11339. {
  11340. PlayerInfo[playerid][pGun5] = 0;
  11341. }
  11342. if(gunID == 31)
  11343. {
  11344. PlayerInfo[playerid][pGun5] = 0;
  11345. }
  11346. if(gunID == 32)
  11347. {
  11348. PlayerInfo[playerid][pGun4] = 0;
  11349. }
  11350. if(gunID == 33)
  11351. {
  11352. PlayerInfo[playerid][pGun6] = 0;
  11353. }
  11354. if(gunID == 34)
  11355. {
  11356. PlayerInfo[playerid][pGun6] = 0;
  11357. }
  11358. if(gunID == 35)
  11359. {
  11360. PlayerInfo[playerid][pGun7] = 0;
  11361. }
  11362. if(gunID == 36)
  11363. {
  11364. PlayerInfo[playerid][pGun7] = 0;
  11365. }
  11366. if(gunID == 37)
  11367. {
  11368. PlayerInfo[playerid][pGun7] = 0;
  11369. }
  11370. if(gunID == 38)
  11371. {
  11372. PlayerInfo[playerid][pGun7] = 0;
  11373. }
  11374. if(gunID == 39)
  11375. {
  11376. PlayerInfo[playerid][pGun8] = 0;
  11377. }
  11378. if(gunID == 40)
  11379. {
  11380. PlayerInfo[playerid][pGun12] = 0;
  11381. }
  11382. if(gunID == 41)
  11383. {
  11384. PlayerInfo[playerid][pGun9] = 0;
  11385. }
  11386. if(gunID == 42)
  11387. {
  11388. PlayerInfo[playerid][pGun9] = 0;
  11389. }
  11390. if(gunID == 43)
  11391. {
  11392. PlayerInfo[playerid][pGun9] = 0;
  11393. }
  11394. if(gunID == 44)
  11395. {
  11396. PlayerInfo[playerid][pGun11] = 0;
  11397. }
  11398. if(gunID == 45)
  11399. {
  11400. PlayerInfo[playerid][pGun11] = 0;
  11401. }
  11402. if(gunID == 46)
  11403. {
  11404. PlayerInfo[playerid][pGun11] = 0;
  11405. }
  11406. GetWeaponName(gunID, gunname, sizeof(gunname));
  11407. TrunkInfo[vid][cGun2] = gunID;
  11408. format(buffer, sizeof(buffer), "You have put your %s in the car's trunk.", gunname);
  11409. SendClientMessage(playerid, COLOR_WHITE, buffer);
  11410. SetPlayerWeapons(playerid);
  11411. format(str, sizeof(str), "* %s puts a %s in the trunk.", PlayerICName(playerid), gunname);
  11412. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11413. return 1;
  11414. }
  11415. }
  11416. else
  11417. {
  11418. SendClientMessage(playerid, COLOR_GREY, "This slot is already taken");
  11419. return 1;
  11420. }
  11421. }
  11422. default:
  11423. {
  11424. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11425. return 1;
  11426. }
  11427. }
  11428. return 1;
  11429. }
  11430. }
  11431. return 1;
  11432. }
  11433. if(dialogid == TRUNKTAKEGUN) //Trunk take gun
  11434. {
  11435. if(response)
  11436. {
  11437. if(listitem == 0) //Take gun 1
  11438. {
  11439. new counter = 0;
  11440. new vid;
  11441. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11442. for(new i; i != MAX_VEHICLES; i++)
  11443. {
  11444. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11445. if(dist)
  11446. {
  11447. vid = i;
  11448. counter++;
  11449. }
  11450. }
  11451. switch(counter)
  11452. {
  11453. case 0:
  11454. {
  11455. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11456. return 1;
  11457. }
  11458. case 1:
  11459. {
  11460. if(IsPlayerInAnyVehicle(playerid))
  11461. {
  11462. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  11463. return 1;
  11464. }
  11465. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11466. {
  11467. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11468. return 1;
  11469. }
  11470. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11471. {
  11472. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  11473. return 1;
  11474. }
  11475. if(TrunkInfo[vid][cGun1] != 0)
  11476. {
  11477. new buffer[512];
  11478. new gunName[100];
  11479. GivePlayerGun(playerid, TrunkInfo[vid][cGun1]);
  11480. GetWeaponName(TrunkInfo[vid][cGun1], gunName, sizeof(gunName));
  11481. format(buffer, sizeof(buffer), "You've taken a %s from the vehicle.", gunName);
  11482. SendClientMessage(playerid, COLOR_WHITE, buffer);
  11483. TrunkInfo[vid][cGun1] = 0;
  11484. format(str, sizeof(str), "* %s takes a %s from the trunk.", PlayerICName(playerid), gunName);
  11485. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11486. return 1;
  11487. }
  11488. else
  11489. {
  11490. SendClientMessage(playerid, COLOR_GREY, "This slot is empty.");
  11491. return 1;
  11492. }
  11493. }
  11494. default:
  11495. {
  11496. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11497. return 1;
  11498. }
  11499. }
  11500. return 1;
  11501. }
  11502. if(listitem == 1) //Take gun 2
  11503. {
  11504. new counter = 0;
  11505. new vid;
  11506. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11507. for(new i; i != MAX_VEHICLES; i++)
  11508. {
  11509. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11510. if(dist)
  11511. {
  11512. vid = i;
  11513. counter++;
  11514. }
  11515. }
  11516. switch(counter)
  11517. {
  11518. case 0:
  11519. {
  11520. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11521. return 1;
  11522. }
  11523. case 1:
  11524. {
  11525. if(IsPlayerInAnyVehicle(playerid))
  11526. {
  11527. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  11528. return 1;
  11529. }
  11530. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11531. {
  11532. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11533. return 1;
  11534. }
  11535. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11536. {
  11537. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  11538. return 1;
  11539. }
  11540. if(TrunkInfo[vid][cGun2] != 0)
  11541. {
  11542. new buffer[512];
  11543. new gunName[100];
  11544. GivePlayerGun(playerid, TrunkInfo[vid][cGun2]);
  11545. GetWeaponName(TrunkInfo[vid][cGun2], gunName, sizeof(gunName));
  11546. format(buffer, sizeof(buffer), "You've taken a %s from the vehicle.", gunName);
  11547. SendClientMessage(playerid, COLOR_WHITE, buffer);
  11548. TrunkInfo[vid][cGun2] = 0;
  11549. format(str, sizeof(str), "* %s takes a %s from the trunk.", PlayerICName(playerid), gunName);
  11550. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11551. return 1;
  11552. }
  11553. else
  11554. {
  11555. SendClientMessage(playerid, COLOR_GREY, "This slot is empty.");
  11556. return 1;
  11557. }
  11558. }
  11559. default:
  11560. {
  11561. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11562. return 1;
  11563. }
  11564. }
  11565. return 1;
  11566. }
  11567. }
  11568. return 1;
  11569. }
  11570. if(dialogid == TRUNK_TAKE_STUFF) //Trunk take stuff
  11571. {
  11572. if(response)
  11573. {
  11574. if(listitem == 0) //Take gun
  11575. {
  11576. if(PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon.");
  11577. ShowPlayerDialog(playerid, TRUNKTAKEGUN, DIALOG_STYLE_LIST, "Take a gun from this trunk", "Slot 1\nSlot 2", "Take", "Cancel"); //Trunk put gun
  11578. return 1;
  11579. }
  11580. if(listitem == 1) //Take armor
  11581. {
  11582. new counter = 0;
  11583. new vid;
  11584. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11585. for(new i; i != MAX_VEHICLES; i++)
  11586. {
  11587. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11588. if(dist)
  11589. {
  11590. vid = i;
  11591. counter++;
  11592. }
  11593. }
  11594. switch(counter)
  11595. {
  11596. case 0:
  11597. {
  11598. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11599. return 1;
  11600. }
  11601. case 1:
  11602. {
  11603. if(IsPlayerInAnyVehicle(playerid))
  11604. {
  11605. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car.");
  11606. return 1;
  11607. }
  11608. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11609. {
  11610. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11611. return 1;
  11612. }
  11613. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11614. {
  11615. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first.");
  11616. return 1;
  11617. }
  11618. if(TrunkInfo[vid][cArmor] != 0)
  11619. {
  11620. SetPlayerArmour(playerid, TrunkInfo[vid][cArmor]);
  11621. PlayerInfo[playerid][pArmor] = TrunkInfo[vid][cArmor];
  11622. TrunkInfo[vid][cArmor] = 0;
  11623. format(str, sizeof(str), "* %s takes a vest from the trunk.", PlayerICName(playerid));
  11624. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11625. return 1;
  11626. }
  11627. else
  11628. {
  11629. SendClientMessage(playerid, COLOR_GREY, "This trunk haven't got any vest inside ");
  11630. return 1;
  11631. }
  11632. }
  11633. default:
  11634. {
  11635. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11636. return 1;
  11637. }
  11638. }
  11639. return 1;
  11640. }
  11641. if(listitem == 2) //Take cocaine
  11642. {
  11643. ShowPlayerDialog(playerid, TRUNK_TAKE_COCAINE, DIALOG_STYLE_INPUT, "Take cocaine", "How many grams of crack do you want to take?", "Take", "Cancel"); //Trunk take crack
  11644. }
  11645. if(listitem == 3) //Take cannabis
  11646. {
  11647. ShowPlayerDialog(playerid, TRUNK_TAKE_CANNABIS, DIALOG_STYLE_INPUT, "Take cannabis", "How many grams of pot do you want to take?", "Take", "Cancel"); //Trunk take pot
  11648. }
  11649. if(listitem == 4) //Take meth
  11650. {
  11651. ShowPlayerDialog(playerid, TRUNK_TAKE_METH, DIALOG_STYLE_INPUT, "Take meth", "How many grams of do you want to take?", "Take", "Cancel"); //Trunk take pot
  11652. }
  11653. if(listitem == 5) //Take xanax
  11654. {
  11655. ShowPlayerDialog(playerid, TRUNK_TAKE_XANAX, DIALOG_STYLE_INPUT, "Take xanax", "How many tabs of xanax do you want to take?", "Take", "Cancel"); //Trunk take pot
  11656. }
  11657. if(listitem == 6) //Take food tray
  11658. {
  11659. new counter = 0;
  11660. new vid;
  11661. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11662. for(new i; i != MAX_VEHICLES; i++)
  11663. {
  11664. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11665. if(dist)
  11666. {
  11667. vid = i;
  11668. counter++;
  11669. }
  11670. }
  11671. switch(counter)
  11672. {
  11673. case 0:
  11674. {
  11675. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11676. return 1;
  11677. }
  11678. case 1:
  11679. {
  11680. if(IsPlayerInAnyVehicle(playerid))
  11681. {
  11682. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car.");
  11683. return 1;
  11684. }
  11685. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11686. {
  11687. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11688. return 1;
  11689. }
  11690. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11691. {
  11692. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first.");
  11693. return 1;
  11694. }
  11695. if(hasFoodTray[playerid])
  11696. {
  11697. SendClientMessage(playerid, COLOR_GREY, "You're already holding a food tray.");
  11698. return 1;
  11699. }
  11700. if(TrunkInfo[vid][cFoodtray])
  11701. {
  11702. hasFoodTray[playerid] = TrunkInfo[vid][cFoodtray];
  11703. givePlayerFoodTray(playerid, TrunkInfo[vid][cFoodtray]);
  11704. TrunkInfo[vid][cFoodtray] = 0;
  11705. format(str, sizeof(str), "* %s takes a food tray from the trunk.", PlayerICName(playerid));
  11706. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11707. return 1;
  11708. }
  11709. else
  11710. {
  11711. SendClientMessage(playerid, COLOR_GREY, "There's no food tray in the trunk.");
  11712. return 1;
  11713. }
  11714. }
  11715. default:
  11716. {
  11717. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11718. return 1;
  11719. }
  11720. }
  11721. return 1;
  11722. }
  11723. }
  11724. return 1;
  11725. }
  11726. if(dialogid == TRUNK_TAKE_COCAINE) // Withdraw cocaine
  11727. {
  11728. if(response)
  11729. {
  11730. new counter = 0;
  11731. new vid;
  11732. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11733. new cocaine = strval(inputtext);
  11734. for(new i; i != MAX_VEHICLES; i++)
  11735. {
  11736. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11737. if(dist)
  11738. {
  11739. vid = i;
  11740. counter++;
  11741. }
  11742. }
  11743. switch(counter)
  11744. {
  11745. case 0:
  11746. {
  11747. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11748. return 1;
  11749. }
  11750. case 1:
  11751. {
  11752. if(IsPlayerInAnyVehicle(playerid))
  11753. {
  11754. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  11755. return 1;
  11756. }
  11757. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11758. {
  11759. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11760. return 1;
  11761. }
  11762. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11763. {
  11764. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  11765. return 1;
  11766. }
  11767. new pcocaine = PlayerInfo[playerid][pCocaine];
  11768. new calc = cocaine + pcocaine;
  11769. if(cocaine < 1)
  11770. {
  11771. SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  11772. return 1;
  11773. }
  11774. if(calc > 25)
  11775. {
  11776. SendClientMessage(playerid, COLOR_GREY, "You can't have that much cocaine on you");
  11777. return 1;
  11778. }
  11779. if(cocaine > TrunkInfo[vid][cCocaine])
  11780. {
  11781. SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the trunk");
  11782. return 1;
  11783. }
  11784. if(TrunkInfo[vid][cCocaine] != 0)
  11785. {
  11786. PlayerInfo[playerid][pCocaine] += cocaine;
  11787. TrunkInfo[vid][cCocaine] -= cocaine;
  11788. format(str, sizeof(str), "* %s takes some cocaine from the trunk.", PlayerICName(playerid));
  11789. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11790. return 1;
  11791. }
  11792. else
  11793. {
  11794. SendClientMessage(playerid, COLOR_GREY, "This trunk haven't got any cocaine inside ");
  11795. return 1;
  11796. }
  11797. }
  11798. default:
  11799. {
  11800. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11801. return 1;
  11802. }
  11803. }
  11804. return 1;
  11805. }
  11806. return 1;
  11807. }
  11808. if(dialogid == TRUNK_PUT_CANNABIS) // Deposit Pot
  11809. {
  11810. if(response)
  11811. {
  11812. new counter = 0;
  11813. new vid;
  11814. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11815. new cannabis = strval(inputtext);
  11816. for(new i; i != MAX_VEHICLES; i++)
  11817. {
  11818. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11819. if(dist)
  11820. {
  11821. vid = i;
  11822. counter++;
  11823. }
  11824. }
  11825. switch(counter)
  11826. {
  11827. case 0:
  11828. {
  11829. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11830. return 1;
  11831. }
  11832. case 1:
  11833. {
  11834. if(IsPlayerInAnyVehicle(playerid))
  11835. {
  11836. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  11837. return 1;
  11838. }
  11839. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11840. {
  11841. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11842. return 1;
  11843. }
  11844. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11845. {
  11846. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  11847. return 1;
  11848. }
  11849. new tCannabis = TrunkInfo[vid][cCannabis];
  11850. new calc = cannabis + tCannabis;
  11851. if(cannabis < 1)
  11852. {
  11853. SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  11854. return 1;
  11855. }
  11856. if(calc > 250)
  11857. {
  11858. SendClientMessage(playerid, COLOR_GREY, "You can't have that much cannabis in your trunk");
  11859. return 1;
  11860. }
  11861. if(cannabis > PlayerInfo[playerid][pCannabis])
  11862. {
  11863. SendClientMessage(playerid, COLOR_GREY, "You don't have that much on you");
  11864. return 1;
  11865. }
  11866. if(PlayerInfo[playerid][pCannabis] != 0)
  11867. {
  11868. PlayerInfo[playerid][pCannabis] -= cannabis;
  11869. TrunkInfo[vid][cCannabis] += cannabis;
  11870. format(str, sizeof(str), "* %s puts some cannabis in the trunk.", PlayerICName(playerid));
  11871. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11872. return 1;
  11873. }
  11874. else
  11875. {
  11876. SendClientMessage(playerid, COLOR_GREY, "You don't have any cannabis on you ");
  11877. return 1;
  11878. }
  11879. }
  11880. default:
  11881. {
  11882. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11883. return 1;
  11884. }
  11885. }
  11886. return 1;
  11887. }
  11888. return 1;
  11889. }
  11890. if(dialogid == TRUNK_PUT_METH) // Withdraw meth
  11891. {
  11892. if(response)
  11893. {
  11894. new counter = 0, vid;
  11895. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11896. new meth = strval(inputtext);
  11897. for(new i; i != MAX_VEHICLES; i++)
  11898. {
  11899. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11900. if(dist)
  11901. {
  11902. vid = i;
  11903. counter++;
  11904. }
  11905. }
  11906. switch(counter)
  11907. {
  11908. case 0:
  11909. {
  11910. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11911. }
  11912. case 1:
  11913. {
  11914. if(IsPlayerInAnyVehicle(playerid))
  11915. return SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  11916. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11917. return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11918. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11919. return SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  11920. new tMeth = TrunkInfo[vid][cMeth];
  11921. new calc = meth + tMeth;
  11922. if(meth < 1)
  11923. return SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  11924. if(calc > 250)
  11925. return SendClientMessage(playerid, COLOR_GREY, "You can't have that much meth in your trunk");
  11926. if(meth > PlayerInfo[playerid][pMeth])
  11927. return SendClientMessage(playerid, COLOR_GREY, "You don't have that much on you");
  11928. if(PlayerInfo[playerid][pMeth] != 0)
  11929. {
  11930. PlayerInfo[playerid][pMeth] -= meth;
  11931. TrunkInfo[vid][cMeth] += meth;
  11932. format(str, sizeof(str), "* %s puts some meth in the trunk.", PlayerICName(playerid));
  11933. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11934. return 1;
  11935. }
  11936. else
  11937. {
  11938. SendClientMessage(playerid, COLOR_GREY, "You don't have any cannabis on you ");
  11939. return 1;
  11940. }
  11941. }
  11942. default:
  11943. {
  11944. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11945. return 1;
  11946. }
  11947. }
  11948. }
  11949. return 1;
  11950. }
  11951. if(dialogid == TRUNK_PUT_COCAINE) //Put Crack
  11952. {
  11953. if(response)
  11954. {
  11955. new counter = 0;
  11956. new vid;
  11957. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11958. new crack = strval(inputtext);
  11959. for(new i; i != MAX_VEHICLES; i++)
  11960. {
  11961. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11962. if(dist)
  11963. {
  11964. vid = i;
  11965. counter++;
  11966. }
  11967. }
  11968. switch(counter)
  11969. {
  11970. case 0:
  11971. {
  11972. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11973. return 1;
  11974. }
  11975. case 1:
  11976. {
  11977. if(IsPlayerInAnyVehicle(playerid))
  11978. {
  11979. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  11980. return 1;
  11981. }
  11982. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11983. {
  11984. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11985. return 1;
  11986. }
  11987. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11988. {
  11989. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  11990. return 1;
  11991. }
  11992. new tcrack = TrunkInfo[vid][cCocaine];
  11993. new calc = crack +tcrack;
  11994. if(crack < 1)
  11995. {
  11996. SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  11997. return 1;
  11998. }
  11999. if(calc > 250)
  12000. {
  12001. SendClientMessage(playerid, COLOR_GREY, "You can't have that much cocaine in your trunk");
  12002. return 1;
  12003. }
  12004. if(crack > PlayerInfo[playerid][pCocaine])
  12005. {
  12006. SendClientMessage(playerid, COLOR_GREY, "You don't have that much on you");
  12007. return 1;
  12008. }
  12009. if(PlayerInfo[playerid][pCocaine] != 0)
  12010. {
  12011. PlayerInfo[playerid][pCocaine] -= crack;
  12012. TrunkInfo[vid][cCocaine] += crack;
  12013. format(str, sizeof(str), "* %s puts some cocaine in the trunk.", PlayerICName(playerid));
  12014. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12015. return 1;
  12016. }
  12017. else
  12018. {
  12019. SendClientMessage(playerid, COLOR_GREY, "You don't have any crack on you ");
  12020. return 1;
  12021. }
  12022. }
  12023. default:
  12024. {
  12025. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  12026. return 1;
  12027. }
  12028. }
  12029. return 1;
  12030. }
  12031. return 1;
  12032. }
  12033. if(dialogid == TRUNK_PUT_XANAX) //Put xanax
  12034. {
  12035. if(response)
  12036. {
  12037. new counter = 0;
  12038. new vid;
  12039. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  12040. new crack = strval(inputtext);
  12041. for(new i; i != MAX_VEHICLES; i++)
  12042. {
  12043. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  12044. if(dist)
  12045. {
  12046. vid = i;
  12047. counter++;
  12048. }
  12049. }
  12050. switch(counter)
  12051. {
  12052. case 0:
  12053. {
  12054. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  12055. return 1;
  12056. }
  12057. case 1:
  12058. {
  12059. if(IsPlayerInAnyVehicle(playerid))
  12060. {
  12061. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  12062. return 1;
  12063. }
  12064. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  12065. {
  12066. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  12067. return 1;
  12068. }
  12069. if(TrunkInfo[vid][cTrunkOpened] != 1)
  12070. {
  12071. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  12072. return 1;
  12073. }
  12074. new tcrack = TrunkInfo[vid][cXanax];
  12075. new calc = crack +tcrack;
  12076. if(crack < 1)
  12077. {
  12078. SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  12079. return 1;
  12080. }
  12081. if(calc > 250)
  12082. {
  12083. SendClientMessage(playerid, COLOR_GREY, "You can't have that much xanax in your trunk");
  12084. return 1;
  12085. }
  12086. if(crack > PlayerInfo[playerid][pXanax])
  12087. {
  12088. SendClientMessage(playerid, COLOR_GREY, "You don't have that much on you");
  12089. return 1;
  12090. }
  12091. if(PlayerInfo[playerid][pXanax] != 0)
  12092. {
  12093. PlayerInfo[playerid][pXanax] -= crack;
  12094. TrunkInfo[vid][cXanax] += crack;
  12095. format(str, sizeof(str), "* %s puts some xanax in the trunk.", PlayerICName(playerid));
  12096. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12097. return 1;
  12098. }
  12099. else
  12100. {
  12101. SendClientMessage(playerid, COLOR_GREY, "You don't have any crack on you ");
  12102. return 1;
  12103. }
  12104. }
  12105. default:
  12106. {
  12107. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  12108. return 1;
  12109. }
  12110. }
  12111. return 1;
  12112. }
  12113. return 1;
  12114. }
  12115. if(dialogid == TRUNK_TAKE_CANNABIS) //Take pot
  12116. {
  12117. if(response)
  12118. {
  12119. new counter = 0;
  12120. new vid;
  12121. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  12122. new pot = strval(inputtext);
  12123. for(new i; i != MAX_VEHICLES; i++)
  12124. {
  12125. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  12126. if(dist)
  12127. {
  12128. vid = i;
  12129. counter++;
  12130. }
  12131. }
  12132. switch(counter)
  12133. {
  12134. case 0:
  12135. {
  12136. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  12137. return 1;
  12138. }
  12139. case 1:
  12140. {
  12141. if(IsPlayerInAnyVehicle(playerid))
  12142. {
  12143. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  12144. return 1;
  12145. }
  12146. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  12147. {
  12148. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  12149. return 1;
  12150. }
  12151. if(TrunkInfo[vid][cTrunkOpened] != 1)
  12152. {
  12153. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  12154. return 1;
  12155. }
  12156. new ppot = PlayerInfo[playerid][pCannabis];
  12157. new calc = pot +ppot;
  12158. if(pot < 1)
  12159. {
  12160. SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  12161. return 1;
  12162. }
  12163. if(calc > 50)
  12164. {
  12165. SendClientMessage(playerid, COLOR_GREY, "You can't have that much cannabis on you");
  12166. return 1;
  12167. }
  12168. if(pot > TrunkInfo[vid][cCannabis])
  12169. {
  12170. SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the trunk");
  12171. return 1;
  12172. }
  12173. if(TrunkInfo[vid][cCannabis] != 0)
  12174. {
  12175. PlayerInfo[playerid][pCannabis] += pot;
  12176. TrunkInfo[vid][cCannabis] -= pot;
  12177. format(str, sizeof(str), "* %s takes some pot from the trunk.", PlayerICName(playerid));
  12178. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12179. return 1;
  12180. }
  12181. else
  12182. {
  12183. SendClientMessage(playerid, COLOR_GREY, "This trunk haven't got any pot inside ");
  12184. return 1;
  12185. }
  12186. }
  12187. default:
  12188. {
  12189. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  12190. return 1;
  12191. }
  12192. }
  12193. return 1;
  12194. }
  12195. return 1;
  12196. }
  12197. if(dialogid == TRUNK_TAKE_METH) //Take Meth
  12198. {
  12199. if(response)
  12200. {
  12201. new counter = 0;
  12202. new vid;
  12203. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  12204. new pot = strval(inputtext);
  12205. for(new i; i != MAX_VEHICLES; i++)
  12206. {
  12207. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  12208. if(dist)
  12209. {
  12210. vid = i;
  12211. counter++;
  12212. }
  12213. }
  12214. switch(counter)
  12215. {
  12216. case 0:
  12217. {
  12218. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  12219. return 1;
  12220. }
  12221. case 1:
  12222. {
  12223. if(IsPlayerInAnyVehicle(playerid))
  12224. {
  12225. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  12226. return 1;
  12227. }
  12228. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  12229. {
  12230. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  12231. return 1;
  12232. }
  12233. if(TrunkInfo[vid][cTrunkOpened] != 1)
  12234. {
  12235. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  12236. return 1;
  12237. }
  12238. new ppot = PlayerInfo[playerid][pMeth];
  12239. new calc = pot +ppot;
  12240. if(pot < 1)
  12241. {
  12242. SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  12243. return 1;
  12244. }
  12245. if(calc > 50)
  12246. {
  12247. SendClientMessage(playerid, COLOR_GREY, "You can't have that much meth on you");
  12248. return 1;
  12249. }
  12250. if(pot > TrunkInfo[vid][cMeth])
  12251. {
  12252. SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the trunk");
  12253. return 1;
  12254. }
  12255. if(TrunkInfo[vid][cMeth] != 0)
  12256. {
  12257. PlayerInfo[playerid][pMeth] += pot;
  12258. TrunkInfo[vid][cMeth] -= pot;
  12259. format(str, sizeof(str), "* %s takes some meth from the trunk.", PlayerICName(playerid));
  12260. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12261. return 1;
  12262. }
  12263. else
  12264. {
  12265. SendClientMessage(playerid, COLOR_GREY, "This trunk haven't got any meth inside ");
  12266. return 1;
  12267. }
  12268. }
  12269. default:
  12270. {
  12271. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  12272. return 1;
  12273. }
  12274. }
  12275. return 1;
  12276. }
  12277. return 1;
  12278. }
  12279. if(dialogid == TRUNK_TAKE_XANAX) //Take XANAX
  12280. {
  12281. if(response)
  12282. {
  12283. new counter = 0;
  12284. new vid;
  12285. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  12286. new pot = strval(inputtext);
  12287. for(new i; i != MAX_VEHICLES; i++)
  12288. {
  12289. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  12290. if(dist)
  12291. {
  12292. vid = i;
  12293. counter++;
  12294. }
  12295. }
  12296. switch(counter)
  12297. {
  12298. case 0:
  12299. {
  12300. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  12301. return 1;
  12302. }
  12303. case 1:
  12304. {
  12305. if(IsPlayerInAnyVehicle(playerid))
  12306. {
  12307. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  12308. return 1;
  12309. }
  12310. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  12311. {
  12312. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  12313. return 1;
  12314. }
  12315. if(TrunkInfo[vid][cTrunkOpened] != 1)
  12316. {
  12317. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  12318. return 1;
  12319. }
  12320. new ppot = PlayerInfo[playerid][pXanax];
  12321. new calc = pot +ppot;
  12322. if(pot < 1)
  12323. {
  12324. SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  12325. return 1;
  12326. }
  12327. if(calc > 50)
  12328. {
  12329. SendClientMessage(playerid, COLOR_GREY, "You can't have that much xanax on you");
  12330. return 1;
  12331. }
  12332. if(pot > TrunkInfo[vid][cXanax])
  12333. {
  12334. SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the trunk");
  12335. return 1;
  12336. }
  12337. if(TrunkInfo[vid][cXanax] != 0)
  12338. {
  12339. PlayerInfo[playerid][pXanax] += pot;
  12340. TrunkInfo[vid][cXanax] -= pot;
  12341. format(str, sizeof(str), "* %s takes some xanax from the trunk.", PlayerICName(playerid));
  12342. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12343. return 1;
  12344. }
  12345. else
  12346. {
  12347. SendClientMessage(playerid, COLOR_GREY, "This trunk haven't got any xanax inside ");
  12348. return 1;
  12349. }
  12350. }
  12351. default:
  12352. {
  12353. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  12354. return 1;
  12355. }
  12356. }
  12357. return 1;
  12358. }
  12359. return 1;
  12360. }
  12361. if(dialogid == TRUNKDIALOG) //Trunk
  12362. {
  12363. if(response)
  12364. {
  12365. if(listitem == 0) //Open / Close
  12366. {
  12367. new engine, lights, alarm, doors, bonnet, boot, objective;
  12368. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  12369. if(TrunkInfo[IsByVehTrunk[playerid]][cTrunkOpened] == 0)
  12370. {
  12371. GetVehicleParamsEx(IsByVehTrunk[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
  12372. SetVehicleParamsEx(IsByVehTrunk[playerid], engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_ON, objective);
  12373. TrunkInfo[IsByVehTrunk[playerid]][cTrunkOpened] = 1;
  12374. format(str, sizeof(str), "* %s has opened the trunk.", PlayerICName(playerid));
  12375. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12376. return 1;
  12377. }
  12378. else if(TrunkInfo[IsByVehTrunk[playerid]][cTrunkOpened] == 1)
  12379. {
  12380. GetVehicleParamsEx(IsByVehTrunk[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
  12381. SetVehicleParamsEx(IsByVehTrunk[playerid], engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_OFF, objective);
  12382. TrunkInfo[IsByVehTrunk[playerid]][cTrunkOpened] = 0;
  12383. format(str, sizeof(str), "* %s has closed the trunk.", PlayerICName(playerid));
  12384. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12385. return 1;
  12386. }
  12387. return 1;
  12388. }
  12389. if(listitem == 1) //Check
  12390. {
  12391. new counter = 0;
  12392. new vid;
  12393. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  12394. for(new i; i != MAX_VEHICLES; i++)
  12395. {
  12396. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  12397. if(dist)
  12398. {
  12399. vid = i;
  12400. counter++;
  12401. }
  12402. }
  12403. switch(counter)
  12404. {
  12405. case 0:
  12406. {
  12407. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  12408. }
  12409. case 1:
  12410. {
  12411. if(IsPlayerInAnyVehicle(playerid))
  12412. {
  12413. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  12414. return 1;
  12415. }
  12416. if(TrunkInfo[vid][cTrunkOpened] != 1)
  12417. {
  12418. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  12419. return 1;
  12420. }
  12421. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  12422. {
  12423. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  12424. return 1;
  12425. }
  12426. new gunname1[64];
  12427. if(TrunkInfo[vid][cGun1] != 0)
  12428. {
  12429. GetWeaponName(TrunkInfo[vid][cGun1], gunname1, sizeof(gunname1));
  12430. }
  12431. else
  12432. {
  12433. gunname1 = "Empty";
  12434. }
  12435. new gunname2[64];
  12436. if(TrunkInfo[vid][cGun2] != 0)
  12437. {
  12438. GetWeaponName(TrunkInfo[vid][cGun2], gunname2, sizeof(gunname2));
  12439. }
  12440. else
  12441. {
  12442. gunname2 = "Empty";
  12443. }
  12444. new coordsstring[128];
  12445. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  12446. format(coordsstring, sizeof(coordsstring), "Gun Slot 1: %s", gunname1);
  12447. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12448. format(coordsstring, sizeof(coordsstring), "Gun Slot 2: %s", gunname2);
  12449. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12450. format(coordsstring, sizeof(coordsstring), "Armor: %0.2f", TrunkInfo[vid][cArmor]);
  12451. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12452. format(coordsstring, sizeof(coordsstring), "Cocaine: %d", TrunkInfo[vid][cCocaine]);
  12453. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12454. format(coordsstring, sizeof(coordsstring), "Cannabis: %d", TrunkInfo[vid][cCannabis]);
  12455. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12456. format(coordsstring, sizeof(coordsstring), "Meth: %d", TrunkInfo[vid][cMeth]);
  12457. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12458. format(coordsstring, sizeof(coordsstring), "Xanax: %d", TrunkInfo[vid][cXanax]);
  12459. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12460. format(coordsstring, sizeof(coordsstring), "Food Tray: %s", getFoodTypeById(TrunkInfo[vid][cFoodtray]));
  12461. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12462. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  12463. format(str, sizeof(str), "* %s looks inside the trunk and checks it.", PlayerICName(playerid));
  12464. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12465. return 1;
  12466. }
  12467. default:
  12468. {
  12469. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  12470. return 1;
  12471. }
  12472. }
  12473. return 1;
  12474. }
  12475. if(listitem == 2) //Put stuff
  12476. {
  12477. ShowPlayerDialog(playerid, TRUNK_PUT_STUFF, DIALOG_STYLE_LIST, "Put a gun in this trunk", "Put gun\nPut vest\nPut cocaine\nPut cannabis\nPut meth\nPut xanax\nPut food tray", "Put", "Cancel"); //Trunk put stuff
  12478. }
  12479. if(listitem == 3) //Take stuff
  12480. {
  12481. ShowPlayerDialog(playerid, TRUNK_TAKE_STUFF, DIALOG_STYLE_LIST, "Take a gun from this trunk", "Take gun\nTake vest\nTake crack\nTake pot\nTake meth\nTake xanax\nTake food tray", "Take", "Cancel"); //Trunk take stuff
  12482. }
  12483. }
  12484. return 1;
  12485. }
  12486. if(dialogid == 110) //somafm
  12487. {
  12488. if(response)
  12489. {
  12490. switch(listitem)
  12491. {
  12492. case 0:
  12493. {
  12494. PlayAudioStreamForPlayer(playerid, "http://somafm.com/groovesalad.pls");
  12495. usingRadio[playerid] = 1;
  12496. }
  12497. case 1:
  12498. {
  12499. PlayAudioStreamForPlayer(playerid, "http://somafm.com/dronezone.pls");
  12500. usingRadio[playerid] = 1;
  12501. }
  12502. case 2:
  12503. {
  12504. PlayAudioStreamForPlayer(playerid, "http://somafm.com/christmas.pls");
  12505. usingRadio[playerid] = 1;
  12506. }
  12507. case 3:
  12508. {
  12509. PlayAudioStreamForPlayer(playerid, "http://somafm.com/lush.pls");
  12510. usingRadio[playerid] = 1;
  12511. }
  12512. case 4:
  12513. {
  12514. PlayAudioStreamForPlayer(playerid, "http://somafm.com/indiepop.pls");
  12515. usingRadio[playerid] = 1;
  12516. }
  12517. case 5:
  12518. {
  12519. PlayAudioStreamForPlayer(playerid, "http://somafm.com/spacestation.pls");
  12520. usingRadio[playerid] = 1;
  12521. }
  12522. case 6:
  12523. {
  12524. PlayAudioStreamForPlayer(playerid, "http://somafm.com/secretagent.pls");
  12525. usingRadio[playerid] = 1;
  12526. }
  12527. case 7:
  12528. {
  12529. PlayAudioStreamForPlayer(playerid, "http://somafm.com/xmasinfrisko.pls");
  12530. usingRadio[playerid] = 1;
  12531. }
  12532. case 8:
  12533. {
  12534. PlayAudioStreamForPlayer(playerid, "http://somafm.com/beatblender.pls");
  12535. usingRadio[playerid] = 1;
  12536. }
  12537. case 9:
  12538. {
  12539. PlayAudioStreamForPlayer(playerid, "http://somafm.com/suburbsofgoa.pls");
  12540. usingRadio[playerid] = 1;
  12541. }
  12542. case 10:
  12543. {
  12544. PlayAudioStreamForPlayer(playerid, "http://somafm.com/bootliquor.pls");
  12545. usingRadio[playerid] = 1;
  12546. }
  12547. case 11:
  12548. {
  12549. PlayAudioStreamForPlayer(playerid, "http://somafm.com/u80s192.pls");
  12550. usingRadio[playerid] = 1;
  12551. }
  12552. case 12:
  12553. {
  12554. PlayAudioStreamForPlayer(playerid, "http://somafm.com/poptron.pls");
  12555. usingRadio[playerid] = 1;
  12556. }
  12557. case 13:
  12558. {
  12559. PlayAudioStreamForPlayer(playerid, "http://somafm.com/cliqhop.pls");
  12560. usingRadio[playerid] = 1;
  12561. }
  12562. case 14:
  12563. {
  12564. PlayAudioStreamForPlayer(playerid, "http://somafm.com/sonicuniverse192.pls");
  12565. usingRadio[playerid] = 1;
  12566. }
  12567. case 15:
  12568. {
  12569. PlayAudioStreamForPlayer(playerid, "http://somafm.com/missioncontrol.pls");
  12570. usingRadio[playerid] = 1;
  12571. }
  12572. case 16:
  12573. {
  12574. PlayAudioStreamForPlayer(playerid, "http://somafm.com/digitalis.pls");
  12575. usingRadio[playerid] = 1;
  12576. }
  12577. case 17:
  12578. {
  12579. PlayAudioStreamForPlayer(playerid, "http://somafm.com/illstreet.pls");
  12580. usingRadio[playerid] = 1;
  12581. }
  12582. case 18:
  12583. {
  12584. PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
  12585. usingRadio[playerid] = 1;
  12586. }
  12587. case 19:
  12588. {
  12589. PlayAudioStreamForPlayer(playerid, "http://somafm.com/doomed.pls");
  12590. usingRadio[playerid] = 1;
  12591. }
  12592. case 20:
  12593. {
  12594. PlayAudioStreamForPlayer(playerid, "http://somafm.com/covers.pls");
  12595. usingRadio[playerid] = 1;
  12596. }
  12597. case 21:
  12598. {
  12599. PlayAudioStreamForPlayer(playerid, "http://somafm.com/480min.pls");
  12600. usingRadio[playerid] = 1;
  12601. }
  12602. case 22:
  12603. {
  12604. PlayAudioStreamForPlayer(playerid, "http://somafm.com/brfm.pls");
  12605. usingRadio[playerid] = 1;
  12606. }
  12607. }
  12608. }
  12609. else
  12610. {
  12611. DisplayDialogForPlayer(playerid, 108); //radio main
  12612. }
  12613. return 1;
  12614. }
  12615. if(dialogid == 111) //etn.fm
  12616. {
  12617. if(response)
  12618. {
  12619. switch(listitem)
  12620. {
  12621. case 0:
  12622. {
  12623. PlayAudioStreamForPlayer(playerid, "http://etn.fm/playlists/etn1beta.m3u");
  12624. usingRadio[playerid] = 1;
  12625. }
  12626. case 1:
  12627. {
  12628. PlayAudioStreamForPlayer(playerid, "http://etn.fm/playlists/etn2beta.m3u");
  12629. usingRadio[playerid] = 1;
  12630. }
  12631. }
  12632. }
  12633. else
  12634. {
  12635. DisplayDialogForPlayer(playerid, 108); //radio main
  12636. }
  12637. return 1;
  12638. }
  12639. if(dialogid == 112) //talk radio
  12640. {
  12641. if(response)
  12642. {
  12643. switch(listitem)
  12644. {
  12645. case 0:
  12646. {
  12647. PlayAudioStreamForPlayer(playerid, "http://www.infowars.com/stream.pls");
  12648. usingRadio[playerid] = 1;
  12649. }
  12650. }
  12651. }
  12652. else
  12653. {
  12654. DisplayDialogForPlayer(playerid, 108); //radio main
  12655. }
  12656. return 1;
  12657. }
  12658. if(dialogid == 113)
  12659. {
  12660. //custom radio
  12661. if(response)
  12662. {
  12663. if(!strlen(inputtext))
  12664. {
  12665. SendClientMessage(playerid, COLOR_WHITE, "You must enter a stream url.");
  12666. DisplayDialogForPlayer(playerid, 113);
  12667. return 1;
  12668. }
  12669. else
  12670. {
  12671. if(strcmp(inputtext, "youtube", true) != -1) return SendClientMessage(playerid, COLOR_GRAD1, "Youtube links are disabled! Try mp3skull.com.");
  12672. PlayAudioStreamForPlayer(playerid, inputtext); // New str seemed redundant.
  12673. usingRadio[playerid] = 1;
  12674. }
  12675. }
  12676. else
  12677. {
  12678. DisplayDialogForPlayer(playerid, 108); //radio main
  12679. }
  12680. return 1;
  12681. }
  12682. if(dialogid == 919)
  12683. {
  12684. if(response == 1)
  12685. {
  12686. if(IsPlayerInRangeOfPoint(playerid, 7.0, 1545.24, -1011.07, 23.65))
  12687. {
  12688. BParkedCar[playerid] = 1;
  12689. SetDynamicObjectRot(BPLG1, 0, 0, -259);
  12690. SetTimer("Timer_BPLgateclose", 3500, false);
  12691. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Watchman: Go ahead and park your car.");
  12692. }
  12693. else if(IsPlayerInRangeOfPoint(playerid, 7.0, 1634.00, -1138.31, 23.68))
  12694. {
  12695. BParkedCar[playerid] = 1;
  12696. SetDynamicObjectRot(BPLG2, 0, 0, 0);
  12697. SetTimer("Timer_BPLgateclose", 3500, false);
  12698. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Watchman: Go ahead and park your car.");
  12699. }
  12700. }
  12701. return 1;
  12702. }
  12703. //calculator
  12704. if(dialogid == DIALOG_CALC_1)
  12705. {
  12706. if(response)
  12707. {
  12708. switch(listitem)
  12709. {
  12710. case 0:
  12711. {
  12712. Calc_Option[playerid] = 1; // Multiply
  12713. ShowPlayerDialog(playerid, DIALOG_CALC_2, DIALOG_STYLE_INPUT, "Calculator", "Please choose a number you would like to multiply.", "Times", "Cancel");
  12714. }
  12715. case 1:
  12716. {
  12717. Calc_Option[playerid] = 2; // Add
  12718. ShowPlayerDialog(playerid, DIALOG_CALC_2, DIALOG_STYLE_INPUT, "Calculator", "Please choose a number you would like to add.", "Plus", "Cancel");
  12719. }
  12720. case 2:
  12721. {
  12722. Calc_Option[playerid] = 3; // Divide
  12723. ShowPlayerDialog(playerid, DIALOG_CALC_2, DIALOG_STYLE_INPUT, "Calculator", "Please choose a number you would like to divide.", "Divided By", "Cancel");
  12724. }
  12725. case 3:
  12726. {
  12727. Calc_Option[playerid] = 4; // Substract
  12728. ShowPlayerDialog(playerid, DIALOG_CALC_2, DIALOG_STYLE_INPUT, "Calculator", "Please choose a number you would like to substract.", "Minus", "Cancel");
  12729. }
  12730. }
  12731. }
  12732. return 1;
  12733. }
  12734. if(dialogid == DIALOG_CALC_2)
  12735. {
  12736. if(IsNumeric(inputtext))
  12737. {
  12738. Calc_Numb1[playerid] = strval(inputtext);
  12739. ShowPlayerDialog(playerid, DIALOG_CALC_3, 1, "Calculator", "Please choose the second number", "Equals", "Cancel");
  12740. return 1;
  12741. }
  12742. }
  12743. if(dialogid == DIALOG_CALC_3)
  12744. {
  12745. if(IsNumeric(inputtext))
  12746. {
  12747. new sz_String[128];
  12748. Calc_Numb2[playerid] = strval(inputtext);
  12749. if(Calc_Option[playerid] == 1) // Multiply
  12750. {
  12751. Calc_Result[playerid] = Calc_Numb1[playerid] * Calc_Numb2[playerid];
  12752. format(sz_String, 128, "Calculator: %d * %d = %d", Calc_Numb1[playerid], Calc_Numb2[playerid], Calc_Result[playerid]);
  12753. }
  12754. if(Calc_Option[playerid] == 2) // Plus
  12755. {
  12756. Calc_Result[playerid] = Calc_Numb1[playerid] + Calc_Numb2[playerid];
  12757. format(sz_String, 128, "Calculator: %d + %d = %d", Calc_Numb1[playerid], Calc_Numb2[playerid], Calc_Result[playerid]);
  12758. }
  12759. if(Calc_Option[playerid] == 3) // Divide
  12760. {
  12761. Calc_Result[playerid] = Calc_Numb1[playerid] / Calc_Numb2[playerid];
  12762. format(sz_String, 128, "Calculator: %d / %d = %d", Calc_Numb1[playerid], Calc_Numb2[playerid], Calc_Result[playerid]);
  12763. }
  12764. if(Calc_Option[playerid] == 4) // Substract
  12765. {
  12766. Calc_Result[playerid] = Calc_Numb1[playerid] - Calc_Numb2[playerid];
  12767. format(sz_String, 128, "Calculator: %d - %d = %d", Calc_Numb1[playerid], Calc_Numb2[playerid], Calc_Result[playerid]);
  12768. }
  12769. SendClientMessage(playerid, COLOR_GREY, sz_String);
  12770. }
  12771. return 1;
  12772. }
  12773. //radio dialogs
  12774. if(dialogid == DIALOG_EDIT_ON)
  12775. {
  12776. if(!response)
  12777. {
  12778. editingBoomboxID[playerid] = -1; //no longer editing
  12779. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12780. return 1;
  12781. }
  12782. if(listitem == 0) //turn on
  12783. {
  12784. switch(BoomboxInfo[editingBoomboxID[playerid]][boomboxTurnedOn])
  12785. {
  12786. case 0: //if off
  12787. {
  12788. //set radio url top default
  12789. if(!BoomboxInfo[editingBoomboxID[playerid]][BoomboxURL]) //radio url is empty, play a random station
  12790. {
  12791. new defaultStation[128];
  12792. new rand = random(3);
  12793. switch(rand)
  12794. {
  12795. case 0:
  12796. {
  12797. format(defaultStation, 128, "http://ch1relay1.etn.fm:8130/listen.pls?sid=1");
  12798. }
  12799. case 1:
  12800. {
  12801. format(defaultStation, 128, "http://somafm.com/indiepop.pls");
  12802. }
  12803. case 2:
  12804. {
  12805. format(defaultStation, 128, "http://www.infowars.com/stream.pls");
  12806. }
  12807. }
  12808. format(BoomboxInfo[editingBoomboxID[playerid]][BoomboxURL], 256, defaultStation);
  12809. BoomboxInfo[editingBoomboxID[playerid]][boomboxTurnedOn] = 1;
  12810. BoomboxInfo[editingBoomboxID[playerid]][BoomboxWorld] = GetPlayerVirtualWorld(playerid);
  12811. editingBoomboxID[playerid] = -1; //no longer editing
  12812. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12813. }
  12814. else //just turn it on
  12815. {
  12816. BoomboxInfo[editingBoomboxID[playerid]][boomboxTurnedOn] = 1;
  12817. editingBoomboxID[playerid] = -1; //no longer editing
  12818. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12819. }
  12820. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have turned on the boombox.");
  12821. }
  12822. case 1: //if on
  12823. {
  12824. BoomboxInfo[editingBoomboxID[playerid]][boomboxTurnedOn] = 0;
  12825. BoomboxInfo[editingBoomboxID[playerid]][BoomboxWorld] = GetPlayerVirtualWorld(playerid);
  12826. editingBoomboxID[playerid] = -1; //no longer editing
  12827. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12828. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have turned off the boombox.");
  12829. }
  12830. }
  12831. }
  12832. if(listitem == 1) //change station
  12833. {
  12834. ShowPlayerDialog(playerid, DIALOG_STATIONS, DIALOG_STYLE_LIST, "Radio stations", "ECRP Official Radio\nRadio Stations\nCustom", "Select", "Cancel");
  12835. return 1;
  12836. }
  12837. if(listitem == 2) //lock
  12838. {
  12839. if(editingBoomboxID[playerid] != playerid)
  12840. {
  12841. SendClientMessage(playerid, COLOR_GREY, "You must be the owner to lock the boombox.");
  12842. editingBoomboxID[playerid] = -1;
  12843. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12844. return 1;
  12845. }
  12846. new string[128];
  12847. new playername[MAX_PLAYER_NAME];
  12848. GetPlayerName(playerid, playername, sizeof(playername));
  12849. new bbid = editingBoomboxID[playerid];
  12850. if(BoomboxInfo[bbid][locked])
  12851. {
  12852. format(string, sizeof(string), "%s's Stereo\n{FFFFFF}/edit", playername);
  12853. BoomboxInfo[bbid][locked] = 0;
  12854. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have unlocked the boombox.");
  12855. }
  12856. else
  12857. {
  12858. format(string, sizeof(string), "%s's Stereo\n{FFFFFF}Locked", playername);
  12859. BoomboxInfo[bbid][locked] = 1;
  12860. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have locked the boombox.");
  12861. }
  12862. UpdateDynamic3DTextLabelText(BoomboxInfo[bbid][bbLabelID], 0x6E88FFFF, string);
  12863. editingBoomboxID[playerid] = -1; //no longer editing
  12864. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12865. return 1;
  12866. }
  12867. if(listitem == 3) //pickup
  12868. {
  12869. if(PlayerInfo[playerid][pStereo] != 0 && editingBoomboxID[playerid] != playerid) //if trying to pickup another persons boombox and i already have own, don't let me
  12870. {
  12871. SendClientMessage(playerid, COLOR_GREY, "You already have a boombox.");
  12872. editingBoomboxID[playerid] = -1; //no longer editing
  12873. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12874. return 1;
  12875. }
  12876. // http://www.gta-ecrp.com/forums/showthread.php?114184
  12877. if(PlayerInfo[editingBoomboxID[playerid]][pStereo] == 4 && PlayerInfo[playerid][pDonateRank] != 3 && editingBoomboxID[playerid] != playerid)
  12878. {
  12879. SendClientMessage(playerid, COLOR_GREY, "You must be a Gold VIP to carry a large boombox.");
  12880. editingBoomboxID[playerid] = -1; //no longer editing
  12881. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12882. return 1;
  12883. }
  12884. pickupBoombox(playerid);
  12885. editingBoomboxID[playerid] = -1; //no longer editing
  12886. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12887. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have picked up the boombox.");
  12888. }
  12889. return 1;
  12890. }
  12891. if(dialogid == DIALOG_STATIONS)
  12892. {
  12893. if(!response)
  12894. {
  12895. if(EDITING_TYPE[playerid] == EDIT_RADIO_BOOMBOX)
  12896. {
  12897. displayBoomboxEditDialog(playerid);
  12898. }
  12899. else if(EDITING_TYPE[playerid] == EDIT_RADIO_VEHICLE)
  12900. {
  12901. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12902. }
  12903. return 1;
  12904. }
  12905. if(listitem == 0) //ECRP Official Radio
  12906. {
  12907. new rstring[1000], name[32], rgenre[32];
  12908. for(new i = 0; i < sizeof(radioInfo); i++)
  12909. {
  12910. format(rgenre, sizeof(rgenre), "%s", radioInfo[i][genreName]);
  12911. format(name, sizeof(name), "%s", radioInfo[i][channelName]);
  12912. format(rstring, sizeof(rstring), "%s %s - %s\n", rstring, rgenre, name);
  12913. }
  12914. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST1, DIALOG_STYLE_LIST, "ECRP Official Radio", rstring, "Select", "Cancel");
  12915. return 1;
  12916. }
  12917. if(listitem == 1) //display genre
  12918. {
  12919. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_GENRES, DIALOG_STYLE_LIST, "Radio Stations", "Alternative\nBlues\nClassical\nCountry\nDecades\nEasy Listening\nElectronic\nFolk\nInspirational\nInternational\nJazz\nLatin\nMetal\nMisc\nNew Age\nPop\nPublic Radio\nR&B/Urban\nRap\nReggae\nRock\nTalk", "Select", "Cancel");
  12920. return 1;
  12921. }
  12922. if(listitem == 2) //Custom
  12923. {
  12924. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_CUSTOM, DIALOG_STYLE_INPUT, "Custom Stream", "Enter the url of the custom radio stream below:\nExamples:\n{7DAEFF}http://www.radiostation.com/stream.pls{FFFFFF}", "Ok", "Back");
  12925. return 1;
  12926. }
  12927. }
  12928. if(dialogid == DIALOG_SARP_STATIONS_LIST1) //SARP OFFICIAL STATIONS LIST
  12929. {
  12930. if(!response)
  12931. {
  12932. ShowPlayerDialog(playerid, DIALOG_STATIONS, DIALOG_STYLE_LIST, "Radio stations", "ECRP Official Radio\nRadio Stations\nCustom", "Select", "Cancel");
  12933. return 1;
  12934. }
  12935. if(radioInfo[listitem][taken] == 0) //radio station is not taken or url is blank
  12936. {
  12937. new rstring[1000], name[32], rgenre[32];
  12938. for(new i = 0; i < sizeof(radioInfo); i++)
  12939. {
  12940. format(rgenre, sizeof(rgenre), "%s", radioInfo[i][genreName]);
  12941. format(name, sizeof(name), "%s", radioInfo[i][channelName]);
  12942. format(rstring, sizeof(rstring), "%s %s - %s\n", rstring, rgenre, name);
  12943. }
  12944. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST1, DIALOG_STYLE_LIST, "ECRP Official Radio", rstring, "Select", "Cancel");
  12945. SendClientMessage(playerid, COLOR_GREY, "That radio station hasn't been taken yet.");
  12946. return 1;
  12947. }
  12948. if(!strcmp(radioInfo[listitem][url], "None", true))
  12949. {
  12950. new rstring[1000], name[32], rgenre[32];
  12951. for(new i = 0; i < sizeof(radioInfo); i++)
  12952. {
  12953. format(rgenre, sizeof(rgenre), "%s", radioInfo[i][genreName]);
  12954. format(name, sizeof(name), "%s", radioInfo[i][channelName]);
  12955. format(rstring, sizeof(rstring), "%s %s - %s\n", rstring, rgenre, name);
  12956. }
  12957. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST1, DIALOG_STYLE_LIST, "ECRP Official Radio", rstring, "Select", "Cancel");
  12958. SendClientMessage(playerid, COLOR_GREY, "That radio station hasn't been set up yet.");
  12959. return 1;
  12960. }
  12961. if(EDITING_TYPE[playerid] == EDIT_RADIO_BOOMBOX)
  12962. {
  12963. format(BoomboxInfo[editingBoomboxID[playerid]][BoomboxURL], 256, radioInfo[listitem][url]); //set BB to selected radio station
  12964. changeBoomboxRadioStation(editingBoomboxID[playerid]); //update for all players streaming to this BB
  12965. editingBoomboxID[playerid] = -1; //no longer editing
  12966. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have changed the radio station on the boombox.");
  12967. }
  12968. else if(EDITING_TYPE[playerid] == EDIT_RADIO_VEHICLE)
  12969. {
  12970. new vehid = GetPlayerVehicleID(playerid);
  12971. if(vehid)
  12972. {
  12973. format(VehicleInfo[vehid][radioURL], 256, radioInfo[listitem][url]);
  12974. VehicleInfo[vehid][radioStation] = 1;
  12975. playVehicleStreamForAll(vehid);
  12976. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have changed the radio station in the vehicle.");
  12977. }
  12978. }
  12979. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12980. return 1;
  12981. }
  12982. if(dialogid == DIALOG_SARP_STATIONS_LIST2) //PLAY STATION
  12983. {
  12984. if(!response)
  12985. {
  12986. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_GENRES, DIALOG_STYLE_LIST, "Radio Stations", "Alternative\nBlues\nClassical\nCountry\nDecades\nEasy Listening\nElectronic\nFolk\nInspirational\nInternational\nJazz\nLatin\nMetal\nMisc\nNew Age\nPop\nPublic Radio\nR&B/Urban\nRap\nReggae\nRock\nTalk", "Select", "Cancel");
  12987. return 1;
  12988. }
  12989. new selected = listItemGenre[playerid] -9 +listitem;
  12990. if(EDITING_TYPE[playerid] == EDIT_RADIO_BOOMBOX)
  12991. {
  12992. format(BoomboxInfo[editingBoomboxID[playerid]][BoomboxURL], 256, radioStations[selected][radiourl]); //set BB to selected radio station
  12993. changeBoomboxRadioStation(editingBoomboxID[playerid]); //update for all players streaming to this BB
  12994. editingBoomboxID[playerid] = -1; //no longer editing
  12995. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have changed the radio station on the boombox.");
  12996. }
  12997. else if(EDITING_TYPE[playerid] == EDIT_RADIO_VEHICLE)
  12998. {
  12999. new vehid = GetPlayerVehicleID(playerid);
  13000. if(vehid)
  13001. {
  13002. format(VehicleInfo[vehid][radioURL], 256, radioStations[selected][radiourl]);
  13003. VehicleInfo[vehid][radioStation] = 1;
  13004. playVehicleStreamForAll(vehid);
  13005. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have changed the radio station in the vehicle.");
  13006. }
  13007. }
  13008. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  13009. listItemGenre[playerid] = -1; //reset the listitem
  13010. return 1;
  13011. }
  13012. if(dialogid == DIALOG_SARP_STATIONS_GENRES) //SARP GENRES
  13013. {
  13014. if(!response)
  13015. {
  13016. listItemGenre[playerid] = -1;
  13017. ShowPlayerDialog(playerid, DIALOG_STATIONS, DIALOG_STYLE_LIST, "Radio stations", "ECRP Official Radio\nRadio Stations\nCustom", "Select", "Cancel");
  13018. return 1;
  13019. }
  13020. new rstring[1000], name[32];
  13021. if(listitem == 0)
  13022. {
  13023. for(new r = 0; r < 10; ++r)
  13024. {
  13025. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13026. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13027. listItemGenre[playerid] = r;
  13028. }
  13029. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Alternative", rstring, "Play", "Cancel");
  13030. return 1;
  13031. }
  13032. if(listitem == 1)
  13033. {
  13034. for(new r = 10; r < 20; ++r)
  13035. {
  13036. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13037. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13038. listItemGenre[playerid] = r;
  13039. }
  13040. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Blues", rstring, "Play", "Cancel");
  13041. return 1;
  13042. }
  13043. if(listitem == 2)
  13044. {
  13045. for(new r = 20; r < 30; ++r)
  13046. {
  13047. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13048. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13049. listItemGenre[playerid] = r;
  13050. }
  13051. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Classical", rstring, "Play", "Cancel");
  13052. return 1;
  13053. }
  13054. if(listitem == 3)
  13055. {
  13056. for(new r = 30; r < 40; ++r)
  13057. {
  13058. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13059. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13060. listItemGenre[playerid] = r;
  13061. }
  13062. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Country", rstring, "Play", "Cancel");
  13063. return 1;
  13064. }
  13065. if(listitem == 4)
  13066. {
  13067. for(new r = 40; r < 50; ++r)
  13068. {
  13069. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13070. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13071. listItemGenre[playerid] = r;
  13072. }
  13073. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Decades", rstring, "Play", "Cancel");
  13074. return 1;
  13075. }
  13076. if(listitem == 5)
  13077. {
  13078. for(new r = 50; r < 60; ++r)
  13079. {
  13080. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13081. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13082. listItemGenre[playerid] = r;
  13083. }
  13084. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Easy Listening", rstring, "Play", "Cancel");
  13085. return 1;
  13086. }
  13087. if(listitem == 6)
  13088. {
  13089. for(new r = 60; r < 70; ++r)
  13090. {
  13091. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13092. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13093. listItemGenre[playerid] = r;
  13094. }
  13095. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Electronic", rstring, "Play", "Cancel");
  13096. return 1;
  13097. }
  13098. if(listitem == 7)
  13099. {
  13100. for(new r = 70; r < 80; ++r)
  13101. {
  13102. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13103. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13104. listItemGenre[playerid] = r;
  13105. }
  13106. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Folk", rstring, "Play", "Cancel");
  13107. return 1;
  13108. }
  13109. if(listitem == 8)
  13110. {
  13111. for(new r = 80; r < 90; ++r)
  13112. {
  13113. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13114. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13115. listItemGenre[playerid] = r;
  13116. }
  13117. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Inspirational", rstring, "Play", "Cancel");
  13118. return 1;
  13119. }
  13120. if(listitem == 9)
  13121. {
  13122. for(new r = 90; r < 100; ++r)
  13123. {
  13124. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13125. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13126. listItemGenre[playerid] = r;
  13127. }
  13128. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - International", rstring, "Play", "Cancel");
  13129. return 1;
  13130. }
  13131. if(listitem == 10)
  13132. {
  13133. for(new r = 100; r < 110; ++r)
  13134. {
  13135. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13136. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13137. listItemGenre[playerid] = r;
  13138. }
  13139. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Jazz", rstring, "Play", "Cancel");
  13140. return 1;
  13141. }
  13142. if(listitem == 11)
  13143. {
  13144. for(new r = 110; r < 120; ++r)
  13145. {
  13146. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13147. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13148. listItemGenre[playerid] = r;
  13149. }
  13150. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Latin", rstring, "Play", "Cancel");
  13151. return 1;
  13152. }
  13153. if(listitem == 12)
  13154. {
  13155. for(new r = 120; r < 130; ++r)
  13156. {
  13157. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13158. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13159. listItemGenre[playerid] = r;
  13160. }
  13161. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Metal", rstring, "Play", "Cancel");
  13162. return 1;
  13163. }
  13164. if(listitem == 13)
  13165. {
  13166. for(new r = 130; r < 140; ++r)
  13167. {
  13168. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13169. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13170. listItemGenre[playerid] = r;
  13171. }
  13172. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Misc", rstring, "Play", "Cancel");
  13173. return 1;
  13174. }
  13175. if(listitem == 14)
  13176. {
  13177. for(new r = 140; r < 150; ++r)
  13178. {
  13179. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13180. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13181. listItemGenre[playerid] = r;
  13182. }
  13183. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - New Age", rstring, "Play", "Cancel");
  13184. return 1;
  13185. }
  13186. if(listitem == 15)
  13187. {
  13188. for(new r = 150; r < 160; ++r)
  13189. {
  13190. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13191. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13192. listItemGenre[playerid] = r;
  13193. }
  13194. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Pop", rstring, "Play", "Cancel");
  13195. return 1;
  13196. }
  13197. if(listitem == 16)
  13198. {
  13199. for(new r = 160; r < 170; ++r)
  13200. {
  13201. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13202. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13203. listItemGenre[playerid] = r;
  13204. }
  13205. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Public Radio", rstring, "Play", "Cancel");
  13206. return 1;
  13207. }
  13208. if(listitem == 17)
  13209. {
  13210. for(new r = 170; r < 180; ++r)
  13211. {
  13212. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13213. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13214. listItemGenre[playerid] = r;
  13215. }
  13216. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - R&B/Urban", rstring, "Play", "Cancel");
  13217. return 1;
  13218. }
  13219. if(listitem == 18)
  13220. {
  13221. for(new r = 180; r < 190; ++r)
  13222. {
  13223. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13224. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13225. listItemGenre[playerid] = r;
  13226. }
  13227. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Rap", rstring, "Play", "Cancel");
  13228. return 1;
  13229. }
  13230. if(listitem == 19)
  13231. {
  13232. for(new r = 190; r < 200; ++r)
  13233. {
  13234. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13235. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13236. listItemGenre[playerid] = r;
  13237. }
  13238. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Reggae", rstring, "Play", "Cancel");
  13239. return 1;
  13240. }
  13241. if(listitem == 20)
  13242. {
  13243. for(new r = 200; r < 210; ++r)
  13244. {
  13245. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13246. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13247. listItemGenre[playerid] = r;
  13248. }
  13249. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Rock", rstring, "Play", "Cancel");
  13250. return 1;
  13251. }
  13252. if(listitem == 21)
  13253. {
  13254. for(new r = 210; r < 220; ++r)
  13255. {
  13256. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13257. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13258. listItemGenre[playerid] = r;
  13259. }
  13260. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Talk", rstring, "Play", "Cancel");
  13261. return 1;
  13262. }
  13263. }
  13264. if(dialogid == DIALOG_SARP_STATIONS_CUSTOM) //SARP CUSTOM
  13265. {
  13266. if(!response)
  13267. {
  13268. ShowPlayerDialog(playerid, DIALOG_STATIONS, DIALOG_STYLE_LIST, "Radio stations", "ECRP Official Radio\nRadio Stations\nCustom", "Select", "Cancel");
  13269. return 1;
  13270. }
  13271. if(!strlen(inputtext))
  13272. {
  13273. SendClientMessage(playerid, COLOR_WHITE, "You must enter a stream url.");
  13274. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_CUSTOM, DIALOG_STYLE_INPUT, "Custom Stream", "Enter the url of the custom radio stream below:\nExamples:\n{7DAEFF}http://www.radiostation.com/stream.pls{FFFFFF}", "Ok", "Back");
  13275. return 1;
  13276. }
  13277. else
  13278. {
  13279. new rstr[256];
  13280. strmid(rstr, inputtext, 0, strlen(inputtext), 255);
  13281. if(EDITING_TYPE[playerid] == EDIT_RADIO_BOOMBOX)
  13282. {
  13283. format(BoomboxInfo[editingBoomboxID[playerid]][BoomboxURL], 256, rstr); //set BB to selected radio station
  13284. changeBoomboxRadioStation(editingBoomboxID[playerid]); //update for all players streaming to this BB
  13285. editingBoomboxID[playerid] = -1; //no longer editing
  13286. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have changed the radio station on the boombox.");
  13287. }
  13288. else if(EDITING_TYPE[playerid] == EDIT_RADIO_VEHICLE)
  13289. {
  13290. new vehid = GetPlayerVehicleID(playerid);
  13291. if(vehid)
  13292. {
  13293. format(VehicleInfo[vehid][radioURL], 256, rstr);
  13294. VehicleInfo[vehid][radioStation] = 1;
  13295. playVehicleStreamForAll(vehid);
  13296. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have changed the radio station in the vehicle.");
  13297. }
  13298. }
  13299. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  13300. }
  13301. }
  13302. //radio vehicle
  13303. if(dialogid == DIALOG_CAR_MENU_MAIN)
  13304. {
  13305. if(!response) return 1;
  13306. if(listitem == 0) //turn off/on
  13307. {
  13308. new vehid = GetPlayerVehicleID(playerid);
  13309. if(VehicleInfo[vehid][radioStation]) // if on
  13310. {
  13311. VehicleInfo[vehid][radioStation] = 0;
  13312. stopVehicleStreamForAll(vehid);
  13313. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have turned the vehicle radio off.");
  13314. }
  13315. else
  13316. {
  13317. if(!VehicleInfo[vehid][radioURL]) //radio url is empty, play a random station
  13318. {
  13319. new defaultStation[128];
  13320. //random radio selector (based on car type)
  13321. new vehicleid = GetPlayerVehicleID(playerid);
  13322. new vehmodel = GetVehicleModel(vehicleid);
  13323. new cartype = getCarType(vehmodel);
  13324. switch(cartype)
  13325. {
  13326. case 1: //industrial car
  13327. {
  13328. new rand = random(10);
  13329. switch(rand)
  13330. {
  13331. case 0:
  13332. {
  13333. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=212880"); //xliv rap
  13334. }
  13335. case 1:
  13336. {
  13337. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=188714"); //art bell
  13338. }
  13339. case 2:
  13340. {
  13341. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1654897"); //reggae
  13342. }
  13343. case 3:
  13344. {
  13345. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=164745"); //80's 90's
  13346. }
  13347. case 4:
  13348. {
  13349. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=914897"); //idobi
  13350. }
  13351. case 5:
  13352. {
  13353. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=326520"); //beatles
  13354. }
  13355. case 6:
  13356. {
  13357. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=106750"); //rock heaven
  13358. }
  13359. case 7:
  13360. {
  13361. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1562093"); //calm radio solo piano
  13362. }
  13363. case 8:
  13364. {
  13365. format(defaultStation, 128, "http://ch1relay1.etn.fm:8130/listen.pls?sid=1"); //etn1
  13366. }
  13367. case 9:
  13368. {
  13369. format(defaultStation, 128, "http://ch1relay1.etn.fm:8000/listen.pls?sid=6"); //etn2
  13370. }
  13371. }
  13372. format(VehicleInfo[vehid][radioURL], 256, defaultStation);
  13373. }
  13374. case 2: //poor car
  13375. {
  13376. new rand = random(10);
  13377. switch(rand)
  13378. {
  13379. case 0:
  13380. {
  13381. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=212880"); //xliv rap
  13382. }
  13383. case 1:
  13384. {
  13385. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=188714"); //art bell
  13386. }
  13387. case 2:
  13388. {
  13389. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1654897"); //reggae
  13390. }
  13391. case 3:
  13392. {
  13393. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=164745"); //80's 90's
  13394. }
  13395. case 4:
  13396. {
  13397. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=914897"); //idobi
  13398. }
  13399. case 5:
  13400. {
  13401. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=326520"); //beatles
  13402. }
  13403. case 6:
  13404. {
  13405. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=106750"); //rock heaven
  13406. }
  13407. case 7:
  13408. {
  13409. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1562093"); //calm radio solo piano
  13410. }
  13411. case 8:
  13412. {
  13413. format(defaultStation, 128, "http://ch1relay1.etn.fm:8130/listen.pls?sid=1"); //etn1
  13414. }
  13415. case 9:
  13416. {
  13417. format(defaultStation, 128, "http://ch1relay1.etn.fm:8000/listen.pls?sid=6"); //etn2
  13418. }
  13419. }
  13420. format(VehicleInfo[vehid][radioURL], 256, defaultStation);
  13421. }
  13422. case 3: //normal car
  13423. {
  13424. new rand = random(10);
  13425. switch(rand)
  13426. {
  13427. case 0:
  13428. {
  13429. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=212880"); //xliv rap
  13430. }
  13431. case 1:
  13432. {
  13433. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=188714"); //art bell
  13434. }
  13435. case 2:
  13436. {
  13437. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1654897"); //reggae
  13438. }
  13439. case 3:
  13440. {
  13441. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=164745"); //80's 90's
  13442. }
  13443. case 4:
  13444. {
  13445. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=914897"); //idobi
  13446. }
  13447. case 5:
  13448. {
  13449. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=326520"); //beatles
  13450. }
  13451. case 6:
  13452. {
  13453. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=106750"); //rock heaven
  13454. }
  13455. case 7:
  13456. {
  13457. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1562093"); //calm radio solo piano
  13458. }
  13459. case 8:
  13460. {
  13461. format(defaultStation, 128, "http://ch1relay1.etn.fm:8130/listen.pls?sid=1"); //etn1
  13462. }
  13463. case 9:
  13464. {
  13465. format(defaultStation, 128, "http://ch1relay1.etn.fm:8000/listen.pls?sid=6"); //etn2
  13466. }
  13467. }
  13468. format(VehicleInfo[vehid][radioURL], 256, defaultStation);
  13469. }
  13470. case 4: //country car
  13471. {
  13472. new rand = random(3);
  13473. switch(rand)
  13474. {
  13475. case 0:
  13476. {
  13477. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=297243");
  13478. }
  13479. case 1:
  13480. {
  13481. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=96698");
  13482. }
  13483. case 2:
  13484. {
  13485. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=9494745");
  13486. }
  13487. }
  13488. format(VehicleInfo[vehid][radioURL], 256, defaultStation);
  13489. }
  13490. default: //unknown
  13491. {
  13492. new rand = random(10);
  13493. switch(rand)
  13494. {
  13495. case 0:
  13496. {
  13497. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=212880"); //xliv rap
  13498. }
  13499. case 1:
  13500. {
  13501. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=188714"); //art bell
  13502. }
  13503. case 2:
  13504. {
  13505. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1654897"); //reggae
  13506. }
  13507. case 3:
  13508. {
  13509. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=164745"); //80's 90's
  13510. }
  13511. case 4:
  13512. {
  13513. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=914897"); //idobi
  13514. }
  13515. case 5:
  13516. {
  13517. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=326520"); //beatles
  13518. }
  13519. case 6:
  13520. {
  13521. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=106750"); //rock heaven
  13522. }
  13523. case 7:
  13524. {
  13525. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1562093"); //calm radio solo piano
  13526. }
  13527. case 8:
  13528. {
  13529. format(defaultStation, 128, "http://ch1relay1.etn.fm:8130/listen.pls?sid=1"); //etn1
  13530. }
  13531. case 9:
  13532. {
  13533. format(defaultStation, 128, "http://ch1relay1.etn.fm:8000/listen.pls?sid=6"); //etn2
  13534. }
  13535. }
  13536. format(VehicleInfo[vehid][radioURL], 256, defaultStation);
  13537. }
  13538. }
  13539. }
  13540. VehicleInfo[vehid][radioStation] = 1;
  13541. playVehicleStreamForAll(vehid);
  13542. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have turned the vehicle radio on.");
  13543. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  13544. }
  13545. return 1;
  13546. }
  13547. if(listitem == 1) //change station
  13548. {
  13549. ShowPlayerDialog(playerid, DIALOG_STATIONS, DIALOG_STYLE_LIST, "Radio stations", "ECRP Official Radio\nRadio Stations\nCustom", "Select", "Cancel");
  13550. EDITING_TYPE[playerid] = EDIT_RADIO_VEHICLE;
  13551. return 1;
  13552. }
  13553. return 1;
  13554. }
  13555. //DONORSTUFF
  13556. if(dialogid == DIALOG_MC_WEAPONS) // MC Weapons
  13557. {
  13558. if(response)
  13559. {
  13560. switch(listitem)
  13561. {
  13562. case 0: //colt45
  13563. {
  13564. if(PlayerInfo[playerid][pCash] >= 1500)
  13565. {
  13566. GivePlayerGun(playerid, 23);
  13567. GiveMoney(playerid, -1500);
  13568. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  13569. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Silenced Pistol off the weapons rack.");
  13570. }
  13571. else
  13572. {
  13573. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  13574. }
  13575. }
  13576. case 1: //deagle
  13577. {
  13578. if(PlayerInfo[playerid][pCash] >= 4500)
  13579. {
  13580. GivePlayerGun(playerid, 24);
  13581. GiveMoney(playerid, -4500);
  13582. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  13583. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Deagle off the weapons rack.");
  13584. }
  13585. else
  13586. {
  13587. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  13588. }
  13589. }
  13590. case 2: //shotgun
  13591. {
  13592. if(PlayerInfo[playerid][pCash] >= 2500)
  13593. {
  13594. GivePlayerGun(playerid, 25);
  13595. GiveMoney(playerid, -2500);
  13596. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  13597. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Shotgun off the weapons rack.");
  13598. }
  13599. else
  13600. {
  13601. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  13602. }
  13603. }
  13604. case 3: //rifle
  13605. {
  13606. if(PlayerInfo[playerid][pCash] >= 4000)
  13607. {
  13608. GivePlayerGun(playerid, 33);
  13609. GiveMoney(playerid, -4000);
  13610. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  13611. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Rifle off the weapons rack.");
  13612. }
  13613. else
  13614. {
  13615. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  13616. }
  13617. }
  13618. case 4: //kevlar
  13619. {
  13620. if(PlayerInfo[playerid][pCash] >= 2600)
  13621. {
  13622. GiveMoney(playerid, -2600);
  13623. SetPlayerArmour(playerid, 100);
  13624. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  13625. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken some Kevlar off the weapons rack.");
  13626. }
  13627. else
  13628. {
  13629. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  13630. }
  13631. }
  13632. }
  13633. }
  13634. return 1;
  13635. }
  13636. //Hitman stuff by Calvin Catt
  13637. if(dialogid == 6493) // Fake Badges
  13638. {
  13639. if(response)
  13640. {
  13641. if(listitem == 0)
  13642. {
  13643. if(HitmanBadgeSAPD >= 1)
  13644. {
  13645. PlayerInfo[playerid][pHAFakeBadge] = 1;
  13646. HitmanBadgeSAPD -= 1;
  13647. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake San Andreas Police Department badge for free.");
  13648. }
  13649. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake San Andreas Police Department badges in stock.");
  13650. }
  13651. if(listitem == 1)
  13652. {
  13653. if(HitmanBadgeFBI >= 1)
  13654. {
  13655. PlayerInfo[playerid][pHAFakeBadge] = 2;
  13656. HitmanBadgeFBI -= 1;
  13657. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake Federeal Bureau of Investigation badge for free.");
  13658. }
  13659. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake Federeal Bureau of Investigation badges in stock.");
  13660. }
  13661. if(listitem == 2)
  13662. {
  13663. if(HitmanBadgeRCSD >= 1)
  13664. {
  13665. PlayerInfo[playerid][pHAFakeBadge] = 3;
  13666. HitmanBadgeRCSD -= 1;
  13667. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake San Andreas Sheriff Department badge for free.");
  13668. }
  13669. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake San Andreas Sheriff Department badges in stock.");
  13670. }
  13671. if(listitem == 3)
  13672. {
  13673. if(HitmanBadgeLSFMD >= 1)
  13674. {
  13675. PlayerInfo[playerid][pHAFakeBadge] = 4;
  13676. HitmanBadgeLSFMD -= 1;
  13677. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake San Andreas Fire Medical Department badge for free.");
  13678. }
  13679. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake San Andreas Fire Medical Department badges in stock.");
  13680. }
  13681. if(listitem == 4)
  13682. {
  13683. if(HitmanBadgeNG >= 1)
  13684. {
  13685. PlayerInfo[playerid][pHAFakeBadge] = 14;
  13686. HitmanBadgeNG -= 1;
  13687. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake SANG badge for free.");
  13688. }
  13689. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake SANG badges in stock.");
  13690. }
  13691. if(listitem == 5)
  13692. {
  13693. if(HitmanBadgeGOV >= 1)
  13694. {
  13695. PlayerInfo[playerid][pHAFakeBadge] = 6;
  13696. HitmanBadgeGOV -= 1;
  13697. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake Government badge for free.");
  13698. }
  13699. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake Government badges in stock.");
  13700. }
  13701. if(listitem == 6)
  13702. {
  13703. if(HitmanBadgeSCOTUS >= 1)
  13704. {
  13705. PlayerInfo[playerid][pHAFakeBadge] = 7;
  13706. HitmanBadgeSCOTUS -= 1;
  13707. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake Judicial Department badge for free.");
  13708. }
  13709. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake Judicial Department badges in stock.");
  13710. }
  13711. if(listitem == 7)
  13712. {
  13713. if(HitmanBadgeDEA >= 1)
  13714. {
  13715. PlayerInfo[playerid][pHAFakeBadge] = 12;
  13716. HitmanBadgeDEA -= 1;
  13717. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake DEA badge for free.");
  13718. }
  13719. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake DEA badges in stock.");
  13720. }
  13721. if(listitem == 8)
  13722. {
  13723. if(HitmanBadgeATF >= 1)
  13724. {
  13725. PlayerInfo[playerid][pHAFakeBadge] = 13;
  13726. HitmanBadgeATF -= 1;
  13727. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake ATF badge for free.");
  13728. }
  13729. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake ATF badges in stock.");
  13730. }
  13731. }
  13732. return 1;
  13733. }
  13734. if(dialogid == 3942)
  13735. {
  13736. if(!response)
  13737. return 1;
  13738. if(strlen(inputtext) < 3 || strlen(inputtext) > (126 - MAX_PLAYER_NAME)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} you cannot exceed 126 characters.");
  13739. strmid(PlayerInfo[playerid][pAppearance], inputtext, 0, strlen(inputtext), 255);
  13740. //format(PlayerInfo[playerid][pAppearance], 128, "%s", inputtext);
  13741. format(str, sizeof(str), "-> %s %s", PlayerICName(playerid), PlayerInfo[playerid][pAppearance]);
  13742. SendClientMessage(playerid, COLOR_PURPLE, str);
  13743. return 1;
  13744. }
  13745. //HOUSE FURNITURE
  13746. if(dialogid == DIALOG_FURNITURE_MAIN)
  13747. {
  13748. if(!response) return 1;
  13749. if(listitem == 0) //BUY FURNITURE
  13750. {
  13751. new houseid = PlayerInfo[playerid][pHouseID];
  13752. if(GetTotalFurnitureOutdoor(houseid) > 10 && GetPlayerVirtualWorld(playerid) != HouseInfo[houseid][hSQLID]) return SendClientMessage(playerid, COLOR_GREY, "You cannot have more than 10 furniture objects placed outside your house.");
  13753. ShowPlayerDialog(playerid, DIALOG_FURNITURE_BUY, DIALOG_STYLE_LIST, "Buy furniture", "Decorations\nOffice\nHobby\nLounge\nBedroom\nKitchen\nDining\nBathroom\nLaundry\nElectronics\nLights\nOutdoor\nStructural", "Select", "Cancel");
  13754. return 1;
  13755. }
  13756. if(listitem == 1) //EDIT FURNITURE
  13757. {
  13758. ShowPlayerDialog(playerid, DIALOG_FURNITURE_EDIT, DIALOG_STYLE_LIST, "Edit furniture", "Edit\nShow/Hide\nDelete", "Select", "Back");
  13759. return 1;
  13760. }
  13761. }
  13762. if(dialogid == DIALOG_FURNITURE_BUY)
  13763. {
  13764. if(!response) return ShowPlayerDialog(playerid, DIALOG_FURNITURE_MAIN, DIALOG_STYLE_LIST, "Furniture", "Buy furniture\nEdit furniture", "Select", "Cancel");
  13765. if(listitem == 0) //Decor
  13766. {
  13767. _DestroySelectionMenu(playerid);
  13768. SetPVarInt(playerid, "ospawner_active", 1);
  13769. SetPVarInt(playerid, "ospawner_page", 0);
  13770. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_DECO);
  13771. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13772. SelectTextDraw(playerid, 0xACCBF1FF);
  13773. return 1;
  13774. }
  13775. if(listitem == 1) //Office
  13776. {
  13777. _DestroySelectionMenu(playerid);
  13778. SetPVarInt(playerid, "ospawner_active", 1);
  13779. SetPVarInt(playerid, "ospawner_page", 0);
  13780. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_OFFICE);
  13781. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13782. SelectTextDraw(playerid, 0xACCBF1FF);
  13783. return 1;
  13784. }
  13785. if(listitem == 2) //Hobby
  13786. {
  13787. _DestroySelectionMenu(playerid);
  13788. SetPVarInt(playerid, "ospawner_active", 1);
  13789. SetPVarInt(playerid, "ospawner_page", 0);
  13790. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_HOBBY);
  13791. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13792. SelectTextDraw(playerid, 0xACCBF1FF);
  13793. return 1;
  13794. }
  13795. if(listitem == 3) //Lounge
  13796. {
  13797. _DestroySelectionMenu(playerid);
  13798. SetPVarInt(playerid, "ospawner_active", 1);
  13799. SetPVarInt(playerid, "ospawner_page", 0);
  13800. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_LOUNGE);
  13801. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13802. SelectTextDraw(playerid, 0xACCBF1FF);
  13803. return 1;
  13804. }
  13805. if(listitem == 4) //Bedroom
  13806. {
  13807. _DestroySelectionMenu(playerid);
  13808. SetPVarInt(playerid, "ospawner_active", 1);
  13809. SetPVarInt(playerid, "ospawner_page", 0);
  13810. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_BEDROOM);
  13811. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13812. SelectTextDraw(playerid, 0xACCBF1FF);
  13813. return 1;
  13814. }
  13815. if(listitem == 5) //Kitchen
  13816. {
  13817. _DestroySelectionMenu(playerid);
  13818. SetPVarInt(playerid, "ospawner_active", 1);
  13819. SetPVarInt(playerid, "ospawner_page", 0);
  13820. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_KITCHEN);
  13821. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13822. SelectTextDraw(playerid, 0xACCBF1FF);
  13823. return 1;
  13824. }
  13825. if(listitem == 6) //Dining
  13826. {
  13827. _DestroySelectionMenu(playerid);
  13828. SetPVarInt(playerid, "ospawner_active", 1);
  13829. SetPVarInt(playerid, "ospawner_page", 0);
  13830. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_DINING);
  13831. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13832. SelectTextDraw(playerid, 0xACCBF1FF);
  13833. return 1;
  13834. }
  13835. if(listitem == 7) //Bathroom
  13836. {
  13837. _DestroySelectionMenu(playerid);
  13838. SetPVarInt(playerid, "ospawner_active", 1);
  13839. SetPVarInt(playerid, "ospawner_page", 0);
  13840. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_BATHROOM);
  13841. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13842. SelectTextDraw(playerid, 0xACCBF1FF);
  13843. return 1;
  13844. }
  13845. if(listitem == 8) //Laundry
  13846. {
  13847. _DestroySelectionMenu(playerid);
  13848. SetPVarInt(playerid, "ospawner_active", 1);
  13849. SetPVarInt(playerid, "ospawner_page", 0);
  13850. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_LAUNDRY);
  13851. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13852. SelectTextDraw(playerid, 0xACCBF1FF);
  13853. return 1;
  13854. }
  13855. if(listitem == 9) //Electronics
  13856. {
  13857. _DestroySelectionMenu(playerid);
  13858. SetPVarInt(playerid, "ospawner_active", 1);
  13859. SetPVarInt(playerid, "ospawner_page", 0);
  13860. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_ELECTRONICS);
  13861. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13862. SelectTextDraw(playerid, 0xACCBF1FF);
  13863. return 1;
  13864. }
  13865. if(listitem == 10) //Lights
  13866. {
  13867. _DestroySelectionMenu(playerid);
  13868. SetPVarInt(playerid, "ospawner_active", 1);
  13869. SetPVarInt(playerid, "ospawner_page", 0);
  13870. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_LIGHTS);
  13871. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13872. SelectTextDraw(playerid, 0xACCBF1FF);
  13873. return 1;
  13874. }
  13875. if(listitem == 11) //Outdoor
  13876. {
  13877. _DestroySelectionMenu(playerid);
  13878. SetPVarInt(playerid, "ospawner_active", 1);
  13879. SetPVarInt(playerid, "ospawner_page", 0);
  13880. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_OUTDOOR);
  13881. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13882. SelectTextDraw(playerid, 0xACCBF1FF);
  13883. return 1;
  13884. }
  13885. if(listitem == 12) //Structure
  13886. {
  13887. _DestroySelectionMenu(playerid);
  13888. SetPVarInt(playerid, "ospawner_active", 1);
  13889. SetPVarInt(playerid, "ospawner_page", 0);
  13890. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_STRUCTURE);
  13891. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13892. SelectTextDraw(playerid, 0xACCBF1FF);
  13893. return 1;
  13894. }
  13895. }
  13896. if(dialogid == DIALOG_FURNITURE_BUY_CONFIRM)
  13897. {
  13898. if(!response) return ShowPlayerDialog(playerid, DIALOG_FURNITURE_BUY, DIALOG_STYLE_LIST, "Buy furniture", "Decorations\nOffice\nHobby\nLounge\nBedroom\nKitchen\nDining\nBathroom\nLaundry\nElectronics\nLights\nOutdoor\nStructural", "Select", "Cancel");
  13899. HandleObjectItemSelection(playerid, GetPVarInt(playerid, "buying_furniture_id"));
  13900. return 1;
  13901. }
  13902. if(dialogid == DIALOG_FURNITURE_EDIT)
  13903. {
  13904. if(!response) return ShowPlayerDialog(playerid, DIALOG_FURNITURE_MAIN, DIALOG_STYLE_LIST, "Furniture", "Buy furniture\nEdit furniture", "Select", "Cancel");
  13905. if(listitem == 0) //edit
  13906. {
  13907. new houseid = PlayerInfo[playerid][pHouseID];
  13908. if(!houseid) return SendClientMessage( playerid, COLOR_GRAD1, "You do not own a house." ); //in case they sell while in menu
  13909. new fstr[2500];
  13910. //show my furniture
  13911. for(new i = 0; i < MAX_FURNITURE; i++) {
  13912. if(FurnitureInfo[houseid][i][f_ModelID]) { //contains a model id
  13913. if(FurnitureInfo[houseid][i][f_Spawned]) {
  13914. format(fstr, sizeof(fstr), "%s\n%s (ID %d)", fstr, FurnitureInfo[houseid][i][f_ModelName], i);
  13915. } else { //hidden
  13916. format(fstr, sizeof(fstr), "%s\n{AFAFAF}%s (ID %d){FFFFFF}", fstr, FurnitureInfo[houseid][i][f_ModelName], i);
  13917. }
  13918. }
  13919. else {
  13920. format(fstr, sizeof(fstr), "%s\n{AFAFAF}Empty{FFFFFF}", fstr);
  13921. }
  13922. }
  13923. ShowPlayerDialog(playerid, DIALOG_FURNITURE_EDIT_SELECT, DIALOG_STYLE_LIST, "Edit furniture", fstr, "Edit", "Back");
  13924. }
  13925. if(listitem == 1) //hide
  13926. {
  13927. new houseid = PlayerInfo[playerid][pHouseID];
  13928. if(!houseid) return SendClientMessage( playerid, COLOR_GRAD1, "You do not own a house." ); //in case they sell while in menu
  13929. new fstr[2500];
  13930. //show my furniture
  13931. for(new i = 0; i < MAX_FURNITURE; i++) {
  13932. if(FurnitureInfo[houseid][i][f_ModelID]) { //contains a model id
  13933. if(FurnitureInfo[houseid][i][f_Spawned]) {
  13934. format(fstr, sizeof(fstr), "%s\n%s (ID %d)", fstr, FurnitureInfo[houseid][i][f_ModelName], i);
  13935. } else { //hidden
  13936. format(fstr, sizeof(fstr), "%s\n{AFAFAF}%s (ID %d){FFFFFF}", fstr, FurnitureInfo[houseid][i][f_ModelName], i);
  13937. }
  13938. }
  13939. else {
  13940. format(fstr, sizeof(fstr), "%s\n{AFAFAF}Empty{FFFFFF}", fstr);
  13941. }
  13942. }
  13943. ShowPlayerDialog(playerid, DIALOG_FURNITURE_SHOWHIDE_SELECT, DIALOG_STYLE_LIST, "Show/Hide furniture", fstr, "Select", "Back");
  13944. }
  13945. if(listitem == 2) //delete
  13946. {
  13947. new houseid = PlayerInfo[playerid][pHouseID];
  13948. if(!houseid) return SendClientMessage( playerid, COLOR_GRAD1, "You do not own a house." ); //in case they sell while in menu
  13949. new fstr[2500];
  13950. //show my furniture
  13951. for(new i = 0; i < MAX_FURNITURE; i++) {
  13952. if(FurnitureInfo[houseid][i][f_ModelID]) { //contains a model id
  13953. if(FurnitureInfo[houseid][i][f_Spawned]) {
  13954. format(fstr, sizeof(fstr), "%s\n%s (ID %d)", fstr, FurnitureInfo[houseid][i][f_ModelName], i);
  13955. } else { //hidden
  13956. format(fstr, sizeof(fstr), "%s\n{AFAFAF}%s (ID %d){FFFFFF}", fstr, FurnitureInfo[houseid][i][f_ModelName], i);
  13957. }
  13958. }
  13959. else {
  13960. format(fstr, sizeof(fstr), "%s\n{AFAFAF}Empty{FFFFFF}", fstr);
  13961. }
  13962. }
  13963. ShowPlayerDialog(playerid, DIALOG_FURNITURE_DELETE_SELECT, DIALOG_STYLE_LIST, "Delete furniture", fstr, "Edit", "Back");
  13964. }
  13965. return 1;
  13966. }
  13967. //furniture edit menu
  13968. if(dialogid == DIALOG_FURNITURE_EDIT_SELECT)
  13969. {
  13970. if(!response) return ShowPlayerDialog(playerid, DIALOG_FURNITURE_EDIT, DIALOG_STYLE_LIST, "Edit furniture", "Edit\nShow/Hide\nDelete", "Select", "Back");
  13971. new houseid = PlayerInfo[playerid][pHouseID];
  13972. if(houseid == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't own a house.");
  13973. if(!FurnitureInfo[houseid][listitem][f_ModelID]) return SendClientMessage(playerid, COLOR_GREY, "You do not have any furniture in this slot.");
  13974. if(houseid != FurnitureInfo[houseid][listitem][f_HouseID]) return SendClientMessage(playerid, COLOR_GREY, "That furniture does not belong to your house.");
  13975. if(!FurnitureInfo[houseid][listitem][f_Spawned]) return SendClientMessage(playerid, COLOR_GREY, "You cannot edit hidden furniture.");
  13976. new furnitureObject = FurnitureInfo[houseid][listitem][f_ObjectID];
  13977. if(!IsValidDynamicObject(furnitureObject)) return SendClientMessage(playerid, COLOR_GREY, "That furniture object is invalid (possibly de-spawned?).");
  13978. //set vars and enable edit mode
  13979. EditingFurnitureObjectID[playerid] = furnitureObject;
  13980. EditingFurnitureHouseID[playerid] = houseid;
  13981. EditingFurnitureID[playerid] = listitem; //the index
  13982. EditDynamicObject(playerid, furnitureObject);
  13983. return 1;
  13984. }
  13985. if(dialogid == DIALOG_FURNITURE_SHOWHIDE_SELECT)
  13986. {
  13987. if(!response) return ShowPlayerDialog(playerid, DIALOG_FURNITURE_EDIT, DIALOG_STYLE_LIST, "Edit furniture", "Edit\nShow/Hide\nDelete", "Select", "Back");
  13988. new houseid = PlayerInfo[playerid][pHouseID];
  13989. if(houseid == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't own a house.");
  13990. if(!FurnitureInfo[houseid][listitem][f_ModelID]) return SendClientMessage(playerid, COLOR_GREY, "You do not have any furniture in this slot.");
  13991. if(houseid != FurnitureInfo[houseid][listitem][f_HouseID]) return SendClientMessage(playerid, COLOR_GREY, "That furniture does not belong to your house.");
  13992. if(FurnitureInfo[houseid][listitem][f_Spawned]) { //hide
  13993. FurnitureInfo[houseid][listitem][f_Spawned] = 0;
  13994. if(FurnitureInfo[houseid][listitem][f_ObjectID]) { DestroyDynamicObjectEx(FurnitureInfo[houseid][listitem][f_ObjectID]); }
  13995. FurnitureInfo[houseid][listitem][f_ObjectID] = 0;
  13996. format(str, sizeof(str), "* You have hidden the %s.", FurnitureInfo[houseid][listitem][f_ModelName]);
  13997. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  13998. //sql update
  13999. new query[200];
  14000. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `furniture` SET `Spawned`=0 WHERE `ID`=%d", FurnitureInfo[houseid][listitem][f_ID]);
  14001. mysql_pquery(sqlGameConnection, query);
  14002. } else { //unhide
  14003. FurnitureInfo[houseid][listitem][f_ObjectID] = CreateDynamicObject(FurnitureInfo[houseid][listitem][f_ModelID], FurnitureInfo[houseid][listitem][f_X], FurnitureInfo[houseid][listitem][f_Y], FurnitureInfo[houseid][listitem][f_Z], FurnitureInfo[houseid][listitem][f_RX], FurnitureInfo[houseid][listitem][f_RY], FurnitureInfo[houseid][listitem][f_RZ]);
  14004. FurnitureInfo[houseid][listitem][f_Spawned] = 1;
  14005. Streamer_Update(playerid);
  14006. format(str, sizeof(str), "* You have unhidden the %s.", FurnitureInfo[houseid][listitem][f_ModelName]);
  14007. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  14008. //sql update
  14009. new query[200];
  14010. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `furniture` SET `Spawned`=1 WHERE `ID`=%d", FurnitureInfo[houseid][listitem][f_ID]);
  14011. mysql_pquery(sqlGameConnection, query);
  14012. }
  14013. return 1;
  14014. }
  14015. if(dialogid == DIALOG_FURNITURE_DELETE_SELECT)
  14016. {
  14017. if(!response) return ShowPlayerDialog(playerid, DIALOG_FURNITURE_EDIT, DIALOG_STYLE_LIST, "Edit furniture", "Edit\nShow/Hide\nDelete", "Select", "Back");
  14018. new houseid = PlayerInfo[playerid][pHouseID];
  14019. if(houseid == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't own a house.");
  14020. if(!FurnitureInfo[houseid][listitem][f_ModelID]) return SendClientMessage(playerid, COLOR_GREY, "You do not have any furniture in this slot.");
  14021. if(houseid != FurnitureInfo[houseid][listitem][f_HouseID]) return SendClientMessage(playerid, COLOR_GREY, "That furniture does not belong to your house.");
  14022. format(str, sizeof(str), "* You have deleted the %s.", FurnitureInfo[houseid][listitem][f_ModelName]);
  14023. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  14024. DeleteHouseFurniture(houseid, listitem);
  14025. return 1;
  14026. }
  14027. if(dialogid == DIALOG_CHARGES_REMOVE)
  14028. {
  14029. if(response)
  14030. {
  14031. new query[128], query2[128], CrimeReason[128], psqlid = searchingsqlid[playerid], CrimeID, Cache:result;
  14032. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `newcrimes` WHERE `CrimePID` = %d ORDER BY `CrimeID` DESC LIMIT 20", psqlid);
  14033. result = mysql_query(sqlGameConnection, query);
  14034. CrimeID = cache_get_field_content_int(listitem, "CrimeID");
  14035. cache_get_field_content(listitem, "CrimeReason", CrimeReason);
  14036. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has deleted the charge '%s' from SQLID %d.", PlayerOOCName(playerid), CrimeReason, psqlid);
  14037. SendAdminMessage(-1, str);
  14038. print(str);
  14039. mysql_format(sqlGameConnection, query2, sizeof(query2), "DELETE FROM `newcrimes` WHERE `CrimeID`=%d", CrimeID);
  14040. mysql_query(sqlGameConnection, query2);
  14041. cache_delete(Cache:result, sqlGameConnection);
  14042. }
  14043. }
  14044. // Edit badge main screen
  14045. if(dialogid == DIALOG_S9_EDIT_BADGE )
  14046. {
  14047. if(response) {
  14048. switch(listitem)
  14049. {
  14050. // Change player name
  14051. case 0: {
  14052. if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
  14053. return ShowPlayerDialog(playerid, DIALOG_S9_EDIT_BADGE_NAME, DIALOG_STYLE_INPUT, "Player Badge Name", "Changes for only you.", "Confirm", "Cancel");
  14054. }
  14055. // Change faction name
  14056. case 1: {
  14057. if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
  14058. return ShowPlayerDialog(playerid, DIALOG_S9_EDIT_BADGE_FACTION, DIALOG_STYLE_INPUT, "Faction Name", "Changes for everyone in the faction.", "Confirm", "Cancel");
  14059. }
  14060. // Change faction weapons
  14061. case 2: {
  14062. if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
  14063. return ShowPlayerDialog(playerid, DIALOG_S9_EDIT_BADGE_WEAPONS, DIALOG_STYLE_INPUT, "Faction Weapons", "Changes for everyone in the faction.", "Confirm", "Cancel");
  14064. }
  14065. }
  14066. }
  14067. }
  14068. // Edit badge name
  14069. if(dialogid == DIALOG_S9_EDIT_BADGE_NAME)
  14070. {
  14071. if(response) {
  14072. if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
  14073. new str2[64];
  14074. if(sscanf(inputtext, "s[24]", PlayerInfo[playerid][pS9BadgeName])) return ShowS9BadgeMenu(playerid);
  14075. format(str2, sizeof(str2), "You have set your badge name to: %s", PlayerInfo[playerid][pS9BadgeName]);
  14076. SendClientMessage(playerid, COLOR_LIGHTBLUE, str2);
  14077. } else {
  14078. ShowS9BadgeMenu(playerid);
  14079. }
  14080. return 1;
  14081. }
  14082. // Edit badge faction
  14083. if(dialogid == DIALOG_S9_EDIT_BADGE_FACTION)
  14084. {
  14085. if(response) {
  14086. if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
  14087. new str2[64];
  14088. if(sscanf(inputtext, "s[64]", S9BadgeFaction)) return ShowS9BadgeMenu(playerid);
  14089. format(str2, sizeof(str2), "You have set S9's badge faction to: %s", S9BadgeFaction);
  14090. SendClientMessage(playerid, COLOR_LIGHTBLUE, str2);
  14091. } else {
  14092. ShowS9BadgeMenu(playerid);
  14093. }
  14094. return 1;
  14095. }
  14096. // Edit badge weapons
  14097. if(dialogid == DIALOG_S9_EDIT_BADGE_WEAPONS)
  14098. {
  14099. if(response) {
  14100. if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
  14101. new str2[64];
  14102. if(sscanf(inputtext, "s[64]", S9BadgeWeapons)) return ShowS9BadgeMenu(playerid);
  14103. format(str2, sizeof(str2), "You have set S9's badge weapons to: %s", S9BadgeWeapons);
  14104. SendClientMessage(playerid, COLOR_LIGHTBLUE, str2);
  14105. } else {
  14106. ShowS9BadgeMenu(playerid);
  14107. }
  14108. return 1;
  14109. }
  14110. if(dialogid == DIALOG_CLEARMOD)
  14111. {
  14112. new carid = GetPlayerVehicleID(playerid);
  14113. // Spoiler.
  14114. if(listitem == 0)
  14115. {
  14116. if(GetVehicleComponentInSlot(carid, 0) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14117. removeSlotComponent(carid, 0);
  14118. } // Hood.
  14119. if(listitem == 1)
  14120. {
  14121. if(GetVehicleComponentInSlot(carid, 1) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14122. removeSlotComponent(carid, 1);
  14123. } // Roof.
  14124. if(listitem == 2)
  14125. {
  14126. if(GetVehicleComponentInSlot(carid, 2) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14127. removeSlotComponent(carid, 2);
  14128. } // Side Skirt.
  14129. if(listitem == 3)
  14130. {
  14131. if(GetVehicleComponentInSlot(carid, 3) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14132. removeSlotComponent(carid, 3);
  14133. } // Nitro.
  14134. if(listitem == 4)
  14135. {
  14136. if(GetVehicleComponentInSlot(carid, 5) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14137. removeSlotComponent(carid, 5);
  14138. } // Exhaust.
  14139. if(listitem == 5)
  14140. {
  14141. if(GetVehicleComponentInSlot(carid, 6) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14142. removeSlotComponent(carid, 6);
  14143. } // Wheel.
  14144. if(listitem == 6)
  14145. {
  14146. if(GetVehicleComponentInSlot(carid, 7) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14147. removeSlotComponent(carid, 7);
  14148. } // Stereo.
  14149. if(listitem == 7)
  14150. {
  14151. if(GetVehicleComponentInSlot(carid, 8) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14152. removeSlotComponent(carid, 8);
  14153. } // Hydraulic.
  14154. if(listitem == 8)
  14155. {
  14156. if(GetVehicleComponentInSlot(carid, 9) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14157. removeSlotComponent(carid, 9);
  14158. } // F. Bumper.
  14159. if(listitem == 9)
  14160. {
  14161. if(GetVehicleComponentInSlot(carid, 10) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14162. removeSlotComponent(carid, 10);
  14163. } // R. Bumper.
  14164. if(listitem == 10)
  14165. {
  14166. if(GetVehicleComponentInSlot(carid, 11) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14167. removeSlotComponent(carid, 11);
  14168. }
  14169. }
  14170. return 0;
  14171. }