1
0

OnDialogResponse.inc 541 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600
  1. #define COL_VPLATINUM 0x43E8D8FF
  2. Timer:BPLgateclose(playerid)
  3. {
  4. SetDynamicObjectRot(BPLG1, 0, 270, -295);
  5. SetDynamicObjectRot(BPLG2, 0, 90, 0);
  6. return 1;
  7. }
  8. Timer:UseBM(playerid)
  9. {
  10. if(!IsPlayerConnected(playerid)) return 0;
  11. if(UseBMTimer[playerid])
  12. {
  13. UseBMTimer[playerid] = 0;
  14. BMPurchased[playerid] = 0;
  15. }
  16. return 1;
  17. }
  18. /*==============================================================================
  19. This needs converting to y_dialogs, and CLEANING THE FUCK UP -- dy1zan
  20. ==============================================================================*/
  21. static str[144], sendername[MAX_PLAYER_NAME+1], giveplayer[MAX_PLAYER_NAME+1];
  22. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  23. {
  24. if(dialogid == DIALOG_MDC_MAIN)
  25. {
  26. if(!response) {
  27. LogOffMDC(playerid);
  28. return 1;
  29. }
  30. if(GetMDCAccessType(playerid) == MDC_ACCESS_NONE)
  31. return SendMDCMessage(playerid, "This function is not available to you.");
  32. switch(listitem)
  33. {
  34. 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");
  35. case 1: {
  36. if(GetMDCAccessType(playerid) != MDC_ACCESS_FULL)
  37. return SendMDCMessage(playerid, "This function is not available to you.");
  38. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+6, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - BOLO", "View BOLOs\nAdd BOLO\nRemove BOLO", "Okay", "Close");
  39. }
  40. case 2:
  41. {
  42. if(GetMDCAccessType(playerid) != MDC_ACCESS_FULL)
  43. return SendMDCMessage(playerid, "This function is not available to you.");
  44. if(PlayerInfo[playerid][pMember] == 5)
  45. {
  46. AdmErrorMsg;
  47. return MDC_MAIN;
  48. }
  49. new query[128], Name[26], GivenBy[26], rows, fields, cstr[5000], Date[50], Cache:result, IsTaken;
  50. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `weaponslog` ORDER BY `ID` DESC LIMIT 50");
  51. result = mysql_query(sqlGameConnection, query);
  52. cache_get_data(rows, fields, sqlGameConnection);
  53. if(!rows) return SendMDCMessage(playerid, "No logs on record.");
  54. format(cstr, sizeof(cstr), "Date\t\tName\t\tGiven By\t\tTaken/Given\n");
  55. for(new i = 0; i < rows; i++)
  56. {
  57. cache_get_field_content(i, "Name", Name);
  58. cache_get_field_content(i, "GivenBy", GivenBy);
  59. cache_get_field_content(i, "Date", Date);
  60. IsTaken = cache_get_field_content_int(i, "Taken");
  61. if(IsTaken) format(cstr, sizeof(cstr), "%s{FF5F5F}(%s)\t{FF5F5F}%s\t{FF5F5F}%s\t{FF5F5F}Taken\n", cstr, Date, Name, GivenBy);
  62. else format(cstr, sizeof(cstr), "%s{1CC343}(%s)\t{1CC343}%s\t{1CC343}%s\t{1CC343}Given\n", cstr, Date, Name, GivenBy);
  63. }
  64. ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+7, DIALOG_STYLE_TABLIST_HEADERS, "Weapon License Record", cstr, "Ok", "");
  65. cache_delete(Cache:result, sqlGameConnection);
  66. }
  67. case 3:
  68. {
  69. if(GetMDCAccessType(playerid) != MDC_ACCESS_FULL)
  70. return SendMDCMessage(playerid, "This function is not available to you.");
  71. new wantedstr[1000], wantedAmount = 0;
  72. for(new i = 0; i <= GetPlayerPoolSize(); i++)
  73. {
  74. if(PlayerInfo[i][pWantedLevel] > 0)
  75. {
  76. wantedAmount++;
  77. format(wantedstr, sizeof(wantedstr), "%s%s\tWanted %i times.\n", wantedstr, PlayerICName(i), PlayerInfo[i][pWantedLevel]);
  78. }
  79. }
  80. if(wantedAmount) return ShowPlayerDialog(playerid, DIALOG_MDC_WANTED, DIALOG_STYLE_LIST, "Wanted", wantedstr, "Okay", "");
  81. else return SendMDCMessage(playerid, "No wanted people were found.");
  82. }
  83. case 4:
  84. {
  85. LogOffMDC(playerid);
  86. return 1;
  87. }
  88. }
  89. return 1;
  90. }
  91. if(dialogid == DIALOG_MDC_MAIN+1)
  92. {
  93. if(!response) return MDC_MAIN;
  94. else
  95. {
  96. new query[128], rows, fields, Cache:result, SearchName[26], MDCID;
  97. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE name = '%e'", inputtext);
  98. result = mysql_query(sqlGameConnection, query);
  99. cache_get_data(rows, fields, sqlGameConnection);
  100. new bool:nofind;
  101. if(!rows) nofind = true;
  102. if(!nofind)
  103. {
  104. for(new i = 0; i < rows; i++)
  105. {
  106. cache_get_field_content(i, "Name", SearchName);
  107. MDCID = cache_get_field_content_int(i, "ID");
  108. }
  109. }
  110. if(nofind)
  111. {
  112. format(mdcstr, sizeof(mdcstr), "Your search query for '%s' has returned no results.", inputtext);
  113. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+2, DIALOG_STYLE_MSGBOX, "{2641FE}Mobile Data Computer - Lookup function", mdcstr, "Search", "Return");
  114. }
  115. format(str, sizeof(str), "%s", (SearchName));
  116. strmid(PlayerInfo[playerid][pMDCSearchName], str, 0, strlen(str), 255);
  117. PlayerInfo[playerid][pMDCSearchID] = MDCID;
  118. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  119. 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");
  120. cache_delete(Cache:result, sqlGameConnection);
  121. }
  122. return 1;
  123. }
  124. if(dialogid == DIALOG_MDC_MAIN+2)
  125. {
  126. if(!response) return MDC_MAIN;
  127. 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");
  128. }
  129. if(dialogid == DIALOG_MDC_MAIN+3)
  130. {
  131. if(!response) return MDC_MAIN;
  132. switch(listitem)
  133. {
  134. case 0://Profile
  135. {
  136. new query[128], profile[2000], rows, fields, Cache:result;
  137. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE name = '%e'", PlayerInfo[playerid][pMDCSearchName]);
  138. result = mysql_query(sqlGameConnection, query);
  139. cache_get_data(rows, fields, sqlGameConnection);
  140. 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");
  141. new level,// int
  142. Sex, //int
  143. Age,//int
  144. HouseID,//int
  145. BizKey,//int
  146. Pnumber,//int
  147. DriverPoints//int
  148. ;
  149. for(new i = 0; i < rows; i++)
  150. {
  151. //cache_get_field_content(i, "Name", SearchName);
  152. cache_get_field_content_int(i, "Level", level);
  153. cache_get_field_content_int(i, "Sex", Sex);
  154. cache_get_field_content_int(i, "Age", Age);
  155. cache_get_field_content_int(i, "pHouseID", HouseID);
  156. cache_get_field_content_int(i, "BizKey", BizKey);
  157. cache_get_field_content_int(i, "PhoneNr", Pnumber);
  158. cache_get_field_content_int(i, "DriverPoints", DriverPoints);
  159. }
  160. format(str, sizeof(str), "{FFFF00}Name: %s\n", PlayerInfo[playerid][pMDCSearchName]);
  161. strcat(profile, str);
  162. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])))
  163. {
  164. format(str, sizeof(str), "{FFFF00}Activity Status: {1CC343}Online\n");
  165. }
  166. else format(str, sizeof(str), "{FFFF00}Activity Status: {FF5F5F}Offline\n");
  167. strcat(profile, str);
  168. new genstr[15];
  169. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]))) Sex = PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pSex];
  170. switch(Sex)
  171. {
  172. case 1: genstr = "Male";
  173. case 2: genstr = "Female";
  174. default: genstr = "Not defined";
  175. }
  176. format(str, sizeof(str), "{FFFF00}Gender: %s\n", genstr);
  177. strcat(profile, str);
  178. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]))) Age = PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pAge];
  179. if(Age == 0) format(str, sizeof(str), "{FFFF00}Age: Not defined\n");
  180. else format(str, sizeof(str), "{FFFF00}Age: %d\n", Age);
  181. strcat(profile, str);
  182. new htext[40], location[MAX_ZONE_NAME];
  183. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])))
  184. {
  185. if(PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pHouseID] != 0)
  186. {
  187. 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]);
  188. format(htext, sizeof(htext), "%d %s", PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pHouseID], location);
  189. }
  190. else htext = "Homeless";
  191. }
  192. else//sql
  193. {
  194. if(HouseID != 0)
  195. {
  196. Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseID][hOutsideX], HouseInfo[HouseID][hOutsideY], HouseInfo[HouseID][hOutsideZ]);
  197. format(htext, sizeof(htext), "%d %s", HouseID, location);
  198. }
  199. else htext = "Homeless";
  200. }
  201. format(str, sizeof(str), "{FFFF00}Address: %s\n", htext);
  202. strcat(profile, str);
  203. new btext[128];
  204. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]))) BizKey = PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pBizKey];
  205. if(BizKey == 0) BizKey = -1;//fix for bizid 0
  206. if(BizKey != -1) format(btext, sizeof(btext), "%s", BizInfo[BizKey][bName]);
  207. else btext = "None";
  208. format(str, sizeof(str), "{FFFF00}Business: %s\n", btext);
  209. strcat(profile, str);
  210. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]))) Pnumber = PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pPnumber];
  211. format(str, sizeof(str), "{FFFF00}Phoner Number: %d\n", Pnumber);
  212. strcat(profile, str);
  213. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]))) DriverPoints = PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pDriverPoints];
  214. format(str, sizeof(str), "{FFFF00}Driver Points: %d\n", DriverPoints);
  215. strcat(profile, str);
  216. cache_delete(Cache:result, sqlGameConnection);
  217. // select * from playervehicles
  218. format(str, sizeof(str), "{FFFF00}Registered Vehicles:\nAn error has occured while searching the database ((Disabled - pending Jacob))");
  219. strcat(profile, str);
  220. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  221. ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+4, DIALOG_STYLE_MSGBOX, mdcstr, profile, "Close", "");
  222. }
  223. case 1://History
  224. {
  225. new query[128], rows, fields, CrimeType, CrimeReason[128], cstr[5000], Date[50], copname[28], isEnabled, Cache:result;
  226. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `newcrimes` WHERE `CrimePID` = %d ORDER BY `CrimeID` DESC LIMIT 20", PlayerInfo[playerid][pMDCSearchID]);
  227. result = mysql_query(sqlGameConnection, query);
  228. printf(query);
  229. cache_get_data(rows, fields, sqlGameConnection);
  230. // Get the player if they're online
  231. new mdcPlayer = GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]);
  232. if(!rows || (IsPlayerConnected(mdcPlayer) && hitmanUndercover[mdcPlayer]))
  233. {
  234. format(mdcstr, sizeof(mdcstr), "Your search for '%s' has returned no warrants.", PlayerInfo[playerid][pMDCSearchName]);
  235. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+2, DIALOG_STYLE_MSGBOX, "{2641FE}Mobile Data Computer - Lookup function", mdcstr, "Search", "Return");
  236. }
  237. format(cstr, sizeof(cstr), "Date\tType\tIssuer\tReason\n");
  238. for(new i = 0; i < rows; i++)
  239. {
  240. cache_get_field_content(i, "CrimeReason", CrimeReason);
  241. cache_get_field_content(i, "RealName", copname);
  242. cache_get_field_content(i, "Date", Date);
  243. CrimeType = cache_get_field_content_int(i, "CrimeType");
  244. isEnabled = cache_get_field_content_int(i, "CrimeEnabled");
  245. 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);
  246. 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);
  247. }
  248. ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+4, DIALOG_STYLE_TABLIST_HEADERS, "{2641FE}Mobile Data Computer - Lookup Function", cstr, "Close", "");
  249. cache_delete(Cache:result, sqlGameConnection);
  250. }
  251. case 2:// Add Warrant
  252. {
  253. if(GetMDCAccessType(playerid) != MDC_ACCESS_FULL)
  254. return SendMDCMessage(playerid, "This function is not available to you.");
  255. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  256. ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+5, DIALOG_STYLE_INPUT, mdcstr, "Please enter the warrant reason\t\t\t\t\t\t", "Confirm", "Close");
  257. }
  258. case 3://Track Cellhpone
  259. {
  260. if(GetMDCAccessType(playerid) != MDC_ACCESS_FULL)
  261. return SendMDCMessage(playerid, "This function is not available to you.");
  262. if(!IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])))
  263. {
  264. format(mdcstr, sizeof(mdcstr), "Unable to Track Cellphone (( %s is not online ))", PlayerInfo[playerid][pMDCSearchName]);
  265. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+4, DIALOG_STYLE_MSGBOX, "{2641FE}Mobile Data Computer - Lookup function", mdcstr, "Search", "Return");
  266. }
  267. if(PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pPnumber] != 0 && PhoneOffline[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])] == 0)
  268. {
  269. new plZone[MAX_ZONE_NAME];
  270. GetPlayer2DZone(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]), plZone, sizeof(plZone));
  271. format(str, sizeof(str), "That person was last seen in %s.", plZone);
  272. SendClientMessage(playerid, -1, str);
  273. }
  274. else
  275. {
  276. format(mdcstr, sizeof(mdcstr), "Track Cellphone - Unavailable", PlayerInfo[playerid][pMDCSearchName]);
  277. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+4, DIALOG_STYLE_MSGBOX, "{2641FE}Mobile Data Computer - Lookup function", mdcstr, "Close", "");
  278. }
  279. }
  280. case 4://view tickets
  281. {
  282. new query[128], rows, fields, TicketReason[128], Amount, RealName[128], TicketID, cstr[5000], Cache:result;
  283. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `tickets` WHERE `TicketPID` = %d AND `Active` = 1 ORDER BY `TicketID` DESC", PlayerInfo[playerid][pMDCSearchID]);
  284. result = mysql_query(sqlGameConnection, query);
  285. cache_get_data(rows, fields, sqlGameConnection);
  286. if(!rows)
  287. {
  288. format(str, sizeof(str), "%s has no active tickets.", PlayerInfo[playerid][pMDCSearchName]);
  289. SendMDCMessage(playerid, str);
  290. 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");
  291. }
  292. format(cstr, sizeof(cstr), "Ticket ID\tIssuer\tAmount\tReason\n");
  293. for(new i = 0; i < rows; i++)
  294. {
  295. cache_get_field_content(i, "TicketReason", TicketReason);
  296. cache_get_field_content(i, "IssuerName", RealName);
  297. Amount = cache_get_field_content_int(i, "Amount");
  298. TicketID = cache_get_field_content_int(i, "TicketID");
  299. format(cstr, sizeof(cstr), "%s#%d\t%s\t$%d\t%s\n", cstr, TicketID, RealName, Amount, TicketReason);
  300. }
  301. cache_delete(Cache:result, sqlGameConnection);
  302. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+4, DIALOG_STYLE_TABLIST_HEADERS, "{2641FE}Mobile Data Computer - Unpaid Tickets", cstr, "Close", "");
  303. }
  304. case 5://remove ticket
  305. {
  306. if(GetMDCAccessType(playerid) != MDC_ACCESS_FULL)
  307. return SendMDCMessage(playerid, "This function is not available to you.");
  308. format(str, sizeof(str), "Please type the ticket ID you would like to remove from %s.", PlayerInfo[playerid][pMDCSearchName]);
  309. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+12, DIALOG_STYLE_INPUT, "{2641FE}Mobile Data Computer - Remove Ticket", str, "Remove", "Return");
  310. }
  311. case 6://old tickets
  312. {
  313. new query[128], rows, fields, TicketReason[128], Amount, RealName[128], TicketID, cstr[5000], Cache:result;
  314. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `tickets` WHERE `TicketPID` = %d AND `Active` = 0 ORDER BY `TicketID` DESC", PlayerInfo[playerid][pMDCSearchID]);
  315. result = mysql_query(sqlGameConnection, query);
  316. cache_get_data(rows, fields, sqlGameConnection);
  317. if(!rows)
  318. {
  319. format(str, sizeof(str), "%s has no paid tickets.", PlayerInfo[playerid][pMDCSearchName]);
  320. SendMDCMessage(playerid, str);
  321. 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");
  322. }
  323. format(cstr, sizeof(cstr), "Ticket ID\tIssuer\tAmount\tReason\n");
  324. for(new i = 0; i < rows; i++)
  325. {
  326. cache_get_field_content(i, "TicketReason", TicketReason);
  327. cache_get_field_content(i, "IssuerName", RealName);
  328. Amount = cache_get_field_content_int(i, "Amount");
  329. TicketID = cache_get_field_content_int(i, "TicketID");
  330. format(cstr, sizeof(cstr), "%s#%d\t%s\t$%d\t%s\n", cstr, TicketID, RealName, Amount, TicketReason);
  331. }
  332. cache_delete(Cache:result, sqlGameConnection);
  333. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+4, DIALOG_STYLE_TABLIST_HEADERS, "{2641FE}Mobile Data Computer - Paid Tickets", cstr, "Close", "");
  334. }
  335. case 7: // Appearance
  336. {
  337. if(GetMDCAccessType(playerid) != MDC_ACCESS_FULL)
  338. return SendMDCMessage(playerid, "This function is not available to you.");
  339. new query[128], rows, fields, Cache:result;
  340. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE name = '%e'", PlayerInfo[playerid][pMDCSearchName]);
  341. result = mysql_query(sqlGameConnection, query);
  342. cache_get_data(rows, fields, sqlGameConnection);
  343. new appearance[64], build, height, eyecolour, ethnicity, gender, age;
  344. build = cache_get_field_content_int(0, "Build");
  345. gender = cache_get_field_content_int(0, "Sex");
  346. age = cache_get_field_content_int(0, "Age");
  347. height = cache_get_field_content_int(0, "Height");
  348. eyecolour = cache_get_field_content_int(0, "EyeColour");
  349. ethnicity = cache_get_field_content_int(0, "Ethnicity");
  350. cache_get_field_content(0, "Appearance", appearance, sqlGameConnection, 64);
  351. new bstr[16], cstr[8], dstr[8], estr[9];
  352. switch(ethnicity)
  353. {
  354. case 0: bstr = "White";
  355. case 1: bstr = "Black";
  356. case 2: bstr = "Asian";
  357. case 3: bstr = "Hispanic";
  358. case 4: bstr = "Latino";
  359. case 5: bstr = "Native American";
  360. default: bstr = "White";
  361. }
  362. switch(eyecolour)
  363. {
  364. case 0: cstr = "Blue";
  365. case 1: cstr = "Brown";
  366. case 2: cstr = "Green";
  367. default: cstr = "Blue";
  368. }
  369. switch(gender)
  370. {
  371. case 0: dstr = "Unknown";
  372. case 1: dstr = "Male";
  373. case 2: dstr = "Female";
  374. default: dstr = "Unknown";
  375. }
  376. switch(build)
  377. {
  378. case 0: estr = "Slim";
  379. case 1: estr = "Average";
  380. case 2: estr = "Muscular";
  381. default: estr = "Average";
  382. }
  383. new astr[512];
  384. 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",
  385. dstr, age, bstr, cstr, estr, height, appearance);
  386. cache_delete(Cache:result, sqlGameConnection);
  387. ShowPlayerDialog(playerid, DIALOG_APPEARANCE_DISPLAYMDC, DIALOG_STYLE_LIST, "Character Appearance", astr, "Back", "");
  388. }
  389. }
  390. return 1;
  391. }
  392. if(dialogid == DIALOG_MDC_MAIN+4)
  393. {
  394. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  395. 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");
  396. }
  397. if(dialogid == DIALOG_MDC_MAIN+5)
  398. {
  399. if(!response)
  400. {
  401. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  402. 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");
  403. }
  404. else
  405. {
  406. 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");
  407. if(UseAdmCmdTimer[playerid] > 8)
  408. {
  409. new reason[128];
  410. format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: (autoban) /su spam.", PlayerOOCName(playerid));
  411. SendClientMessageToAll(COLOR_WHITE, str);
  412. format(reason, sizeof(reason), "/su spam.");
  413. BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
  414. return 1;
  415. }
  416. PlayerInfo[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])][pWantedLevel]++;
  417. SetPlayerCriminal(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]), playerid, inputtext);
  418. AddCrime(playerid, GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]), 2, inputtext);
  419. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  420. UseAdmCmdTimer[playerid]++;
  421. SetTimerEx("Timer_UseAdmCmd", 3 *1000, 0, "i", playerid); //3 seconds
  422. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  423. 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");
  424. }
  425. return 1;
  426. }
  427. if(dialogid == DIALOG_MDC_MAIN+6)
  428. {
  429. if(!response) return MDC_MAIN;
  430. else
  431. {
  432. switch(listitem)
  433. {
  434. case 0:// ALL BOLO
  435. {
  436. new bstr[1500], count=0;
  437. for(new i = 0; i < MAX_PLAYERS; i++)
  438. {
  439. if(IsPlayerConnected(i))
  440. {
  441. if(isBOLO[i])
  442. {
  443. new query[128], CrimeReason[128], rows, fields, Cache:result;
  444. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `newcrimes` WHERE `CrimePID` = %d AND CrimeType = 3 ORDER BY `CrimeID` DESC LIMIT 1", PlayerInfo[i][pID]);
  445. result = mysql_query(sqlGameConnection, query);
  446. printf(query);
  447. cache_get_data(rows, fields, sqlGameConnection);
  448. if(!rows)
  449. {
  450. SendClientMessage(playerid, COLOR_RED, "(MDC): An error has occured.");
  451. return MDC_MAIN;
  452. }
  453. cache_get_field_content(0, "CrimeReason", CrimeReason);
  454. count++;
  455. format(bstr, sizeof(bstr), "%s%s - %s\n", bstr, PlayerOOCName(i), CrimeReason);
  456. cache_delete(Cache:result, sqlGameConnection);
  457. }
  458. }
  459. }
  460. if(count==0){ format(bstr, sizeof(bstr), "There are no BOLO notices.\t\t"); }
  461. ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+7, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - Be On Look Out", bstr, "Ok", "");
  462. }
  463. case 1:// ADD BOLO
  464. {
  465. 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");
  466. }
  467. case 2:// DELETE BOLO
  468. {
  469. 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");
  470. }
  471. }
  472. }
  473. return 1;
  474. }
  475. if(dialogid == DIALOG_MDC_MAIN+7) return MDC_MAIN;
  476. if(dialogid == DIALOG_MDC_MAIN+8)// add name
  477. {
  478. if(!response) return MDC_MAIN;
  479. format(str, sizeof(str), "%s", inputtext);
  480. strmid(PlayerInfo[playerid][pMDCSearchName], str, 0, strlen(str), 255);
  481. 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");
  482. }
  483. if(dialogid == DIALOG_MDC_MAIN+10)//add reason
  484. {
  485. if(!response) return MDC_MAIN;
  486. new query[128], rows, fields, ISABOLO, realname[MAX_PLAYER_NAME+1], Cache:result;
  487. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE `name` = '%e' LIMIT 1", PlayerInfo[playerid][pMDCSearchName]);
  488. result = mysql_query(sqlGameConnection, query);
  489. cache_get_data(rows, fields, sqlGameConnection);
  490. cache_get_field_content(0, "Name", realname);
  491. ISABOLO = cache_get_field_content_int(0, "isBOLO");
  492. cache_delete(Cache:result, sqlGameConnection);
  493. format(str, sizeof(str), "%s", realname);
  494. strmid(PlayerInfo[playerid][pMDCSearchName], str, 0, strlen(str), 255);
  495. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])))
  496. {
  497. isBOLO[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])] = 1;
  498. format(str, sizeof(str), "DISPATCH: %s %s has placed a new B.O.L.O alert.", GetPlayerRank(playerid), PlayerOOCName(playerid));
  499. SendRadioMessage(PlayerInfo[playerid][pMember], TEAM_BLUE_COLOR, str);
  500. format(str, sizeof(str), "%s", inputtext);
  501. AddCrime(playerid, GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]), 3, str);
  502. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+6, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - BOLO", "View BOLOs\nAdd BOLO\nRemove BOLO", "Okay", "Close");
  503. }
  504. else
  505. {
  506. if(!rows)
  507. {
  508. 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]);
  509. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+11, DIALOG_STYLE_MSGBOX, "{2641FE}Mobile Data Computer - Be On Look Out", mdcstr, "Search", "Return");
  510. }
  511. if(ISABOLO == 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "(MDC): That person already has a BOLO on them.");
  512. else
  513. {
  514. format(str, sizeof(str), "%s", inputtext);
  515. AddOfflineCrime(playerid, PlayerInfo[playerid][pMDCSearchName], 3, str);
  516. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `isBOLO` = 1 WHERE `name` = '%e'", PlayerInfo[playerid][pMDCSearchName]);
  517. mysql_pquery(sqlGameConnection, query);
  518. format(mdcstr, sizeof(mdcstr), "(MDC): A BOLO has been placed on %s.", PlayerInfo[playerid][pMDCSearchName]);
  519. SendClientMessage(playerid, COLOR_LIGHTRED, mdcstr);
  520. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+6, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - BOLO", "View BOLOs\nAdd BOLO\nRemove BOLO", "Okay", "Close");
  521. }
  522. }
  523. }
  524. if(dialogid == DIALOG_MDC_MAIN+9)//remove
  525. {
  526. if(!response) return MDC_MAIN;
  527. new query[128], rows, fields, ISABOLO, realname[MAX_PLAYER_NAME+1], Cache:result;
  528. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE name = '%e' LIMIT 1", inputtext);
  529. result = mysql_query(sqlGameConnection, query);
  530. cache_get_data(rows, fields);
  531. cache_get_field_content(0, "Name", realname);
  532. ISABOLO = cache_get_field_content_int(0, "isBOLO");
  533. cache_delete(Cache:result, sqlGameConnection);
  534. format(str, sizeof(str), "%s", (realname));
  535. strmid(PlayerInfo[playerid][pMDCSearchName], str, 0, strlen(str), 255);
  536. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])))
  537. {
  538. if(!isBOLO[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])])
  539. {
  540. SendClientMessage(playerid, COLOR_LIGHTRED, "(MDC): That person doesn't have a BOLO on them.");
  541. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+6, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - BOLO", "View BOLOs\nAdd BOLO\nRemove BOLO", "Okay", "Close");
  542. }
  543. isBOLO[GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])] = 0;
  544. format(mdcstr, sizeof(mdcstr), "(MDC): You have removed the BOLO on %s.", inputtext);
  545. SendClientMessage(playerid, COLOR_LIGHTRED, mdcstr);
  546. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `newcrimes` SET `CrimeEnabled` = 0 WHERE (`CrimePID` = '%d' AND `CrimeType` = 3)", PlayerInfo[playerid][pMDCSearchID]);
  547. mysql_pquery(sqlGameConnection, query);
  548. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+6, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - BOLO", "View BOLOs\nAdd BOLO\nRemove BOLO", "Okay", "Close");
  549. }
  550. else
  551. {
  552. if(!rows)
  553. {
  554. 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);
  555. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+11, DIALOG_STYLE_MSGBOX, "{2641FE}Mobile Data Computer - Be On Look Out", mdcstr, "Search", "Return");
  556. }
  557. if(ISABOLO == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "(MDC): That person doesn't have a BOLO on them.");
  558. else
  559. {
  560. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `isBOLO` = 0 WHERE `name` = '%e'", inputtext);
  561. mysql_pquery(sqlGameConnection, query);
  562. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `newcrimes` SET `CrimeEnabled` = 0 WHERE (`CrimePID` = '%d' AND `CrimeType` = 3)", PlayerInfo[playerid][pMDCSearchID]);
  563. mysql_pquery(sqlGameConnection, query);
  564. format(mdcstr, sizeof(mdcstr), "(MDC): You have removed the BOLO on %s.", inputtext);
  565. SendClientMessage(playerid, COLOR_LIGHTRED, mdcstr);
  566. return ShowPlayerDialog(playerid, DIALOG_MDC_MAIN+6, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer - BOLO", "View BOLOs\nAdd BOLO\nRemove BOLO", "Okay", "Close");
  567. }
  568. }
  569. }
  570. 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");
  571. if(dialogid == DIALOG_MDC_MAIN+12)//remove ticket
  572. {
  573. new realnum = strval(inputtext);
  574. if(!response)
  575. {
  576. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  577. 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");
  578. }
  579. if(!IsNumeric(inputtext))
  580. {
  581. SendClientMessage(playerid, COLOR_LIGHTRED, "(MDC): Invalid input.");
  582. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  583. 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");
  584. }
  585. if(!IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName])))
  586. {
  587. SendClientMessage(playerid, COLOR_LIGHTRED, "(MDC): That player is not online.");
  588. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  589. 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");
  590. }
  591. new rows, fields, query[128], pid, date[128], crimeid, active, Cache:result;
  592. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `tickets` WHERE `TicketID` = %d LIMIT 1", realnum);
  593. result = mysql_query(sqlGameConnection, query);
  594. printf(query);
  595. cache_get_data(rows, fields, sqlGameConnection);
  596. if(!rows)
  597. {
  598. SendClientMessage(playerid, COLOR_LIGHTRED, "(MDC): Invalid ticket ID.");
  599. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  600. 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");
  601. }
  602. active = cache_get_field_content_int(0, "Active");
  603. pid = cache_get_field_content_int(0, "TicketPID");
  604. cache_get_field_content(0, "Date", date);
  605. if(pid != PlayerInfo[playerid][pMDCSearchID])
  606. {
  607. format(mdcstr, sizeof(mdcstr), "(MDC): That ticket number does not belong to %s.", PlayerInfo[playerid][pMDCSearchName]);
  608. SendClientMessage(playerid, COLOR_LIGHTRED, str);
  609. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  610. 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");
  611. }
  612. if(!active)
  613. {
  614. format(mdcstr, sizeof(mdcstr), "(MDC): That ticket number does not belong to %s.", PlayerInfo[playerid][pMDCSearchName]);
  615. SendClientMessage(playerid, COLOR_LIGHTRED, str);
  616. format(mdcstr, sizeof(mdcstr), "{2641FE}Mobile Data Computer - %s", PlayerInfo[playerid][pMDCSearchName]);
  617. 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");
  618. }
  619. cache_delete(Cache:result, sqlGameConnection);
  620. new query2[128];
  621. mysql_format(sqlGameConnection, query2, sizeof(query2), "UPDATE `tickets` SET `Active` = 0 WHERE `TicketID` = '%d'", realnum);
  622. mysql_pquery(sqlGameConnection, query2);
  623. format(str, sizeof(str), "HQ: %s has deleted ticket number %d (%s).", PlayerICName(playerid), realnum, PlayerInfo[playerid][pMDCSearchName]);
  624. SendRadioMessage(1, TEAM_BLUE_COLOR, str);
  625. format(str, sizeof(str), "* %s has removed your ticket #%d", PlayerICName(playerid), realnum);
  626. SendClientMessage(GetPlayerIDFromName(PlayerInfo[playerid][pMDCSearchName]), COLOR_LIGHTRED, str);
  627. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `newcrimes` WHERE `DATE` = '%e' LIMIT 1", date);
  628. result = mysql_query(sqlGameConnection, query);
  629. cache_get_data(rows, fields, sqlGameConnection);
  630. if(!rows) return SendClientMessage(playerid, COLOR_GREY, "An error has occured while updating the MDC.");
  631. crimeid = cache_get_field_content_int(0, "CrimeID");
  632. cache_delete(Cache:result, sqlGameConnection);
  633. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `newcrimes` SET `CrimeEnabled` = 0 WHERE `CrimeID` = '%d'", crimeid);
  634. mysql_pquery(sqlGameConnection, query);
  635. }
  636. if(dialogid == DIALOG_NAMECHANGES)
  637. {
  638. if(!response) return 1;
  639. switch(listitem)
  640. {
  641. case 0://recent
  642. {
  643. new query[128], OldName[26], NewName[26], ChangedBy[26], rows, fields, cstr[5000], Date[50], Cache:result;
  644. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `namechanges` ORDER BY `ID` DESC");
  645. result = mysql_query(sqlGameConnection, query);
  646. cache_get_data(rows, fields, sqlGameConnection);
  647. if(!rows) return SendClientMessage(playerid, COLOR_WHITE, "No namechanges on record.");
  648. format(cstr, sizeof(cstr), "Date\t\tOld Name\t\tNew Name\t\tAdmin\n");
  649. for(new i = 0; i < rows; i++)
  650. {
  651. cache_get_field_content(i, "OldName", OldName);
  652. cache_get_field_content(i, "NewName", NewName);
  653. cache_get_field_content(i, "ApprovedBy", ChangedBy);
  654. cache_get_field_content(i, "Date", Date);
  655. format(cstr, sizeof(cstr), "%s%s\t\t%s\t\t%s\t\t%s\n", cstr, Date, OldName, NewName, ChangedBy);
  656. }
  657. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Namechange Record", cstr, "Ok", "");
  658. cache_delete(Cache:result, sqlGameConnection);
  659. }
  660. case 1: ShowPlayerDialog(playerid, DIALOG_NAMECHANGES_OLD, DIALOG_STYLE_INPUT, "Old Name Records", "Search By Old Name", "Ok", "");
  661. case 2: ShowPlayerDialog(playerid, DIALOG_NAMECHANGES_NEW, DIALOG_STYLE_INPUT, "New Name Records", "Search By New Name", "Ok", "");
  662. case 3: ShowPlayerDialog(playerid, DIALOG_NAMECHANGES_ADMIN, DIALOG_STYLE_INPUT, "Admin Name Record", "Search Changes By A Specific Admin", "Ok", "");
  663. case 4: ShowPlayerDialog(playerid, DIALOG_NAMECHANGES_ID, DIALOG_STYLE_INPUT, "Namechange Records", "Search By Account ID", "Ok", "");
  664. }
  665. return 1;
  666. }
  667. if(dialogid == DIALOG_NAMECHANGES_OLD)
  668. {
  669. if(!response) return 1;
  670. else
  671. {
  672. new query[128], OldName[26], NewName[26], ChangedBy[26], rows, fields, cstr[5000], Date[50], Cache:result;
  673. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `namechanges` WHERE `OldName`='%e' ORDER BY `ID` DESC", inputtext);
  674. result = mysql_query(sqlGameConnection, query);
  675. cache_get_data(rows, fields, sqlGameConnection);
  676. if(!rows) return SendClientMessage(playerid, COLOR_WHITE, "No namechanges on record.");
  677. format(cstr, sizeof(cstr), "Date\t\tOld Name\t\tNew Name\t\tAdmin\n");
  678. for(new i = 0; i < rows; i++)
  679. {
  680. cache_get_field_content(i, "OldName", OldName);
  681. cache_get_field_content(i, "NewName", NewName);
  682. cache_get_field_content(i, "ApprovedBy", ChangedBy);
  683. cache_get_field_content(i, "Date", Date);
  684. format(cstr, sizeof(cstr), "%s%s\t\t%s\t\t%s\t\t%s\n", cstr, Date, OldName, NewName, ChangedBy);
  685. }
  686. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Namechange Record", cstr, "Ok", "");
  687. cache_delete(Cache:result, sqlGameConnection);
  688. }
  689. return 1;
  690. }
  691. if(dialogid == DIALOG_NAMECHANGES_NEW)
  692. {
  693. if(!response) return 1;
  694. else
  695. {
  696. new query[128], OldName[26], NewName[26], ChangedBy[26], rows, fields, cstr[5000], Date[50], Cache:result;
  697. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `namechanges` WHERE `NewName`='%e' ORDER BY `ID` DESC", inputtext);
  698. result = mysql_query(sqlGameConnection, query);
  699. cache_get_data(rows, fields, sqlGameConnection);
  700. if(!rows) return SendClientMessage(playerid, COLOR_WHITE, "No namechanges on record.");
  701. format(cstr, sizeof(cstr), "Date\t\tOld Name\t\tNew Name\t\tAdmin\n");
  702. for(new i = 0; i < rows; i++)
  703. {
  704. cache_get_field_content(i, "OldName", OldName);
  705. cache_get_field_content(i, "NewName", NewName);
  706. cache_get_field_content(i, "ApprovedBy", ChangedBy);
  707. cache_get_field_content(i, "Date", Date);
  708. format(cstr, sizeof(cstr), "%s%s\t\t%s\t\t%s\t\t%s\n", cstr, Date, OldName, NewName, ChangedBy);
  709. }
  710. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Namechange Record", cstr, "Ok", "");
  711. cache_delete(Cache:result, sqlGameConnection);
  712. }
  713. return 1;
  714. }
  715. if(dialogid == DIALOG_NAMECHANGES_ADMIN)
  716. {
  717. if(!response) return 1;
  718. else
  719. {
  720. new query[128], OldName[26], NewName[26], ChangedBy[26], rows, fields, cstr[5000], Date[50], Cache:result;
  721. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `namechanges` WHERE `ApprovedBy`='%e' ORDER BY `ID` DESC", inputtext);
  722. result = mysql_query(sqlGameConnection, query);
  723. cache_get_data(rows, fields, sqlGameConnection);
  724. if(!rows) return SendClientMessage(playerid, COLOR_WHITE, "No namechanges on record.");
  725. format(cstr, sizeof(cstr), "Date\t\tOld Name\t\tNew Name\t\tAdmin\n");
  726. for(new i = 0; i < rows; i++)
  727. {
  728. cache_get_field_content(i, "OldName", OldName);
  729. cache_get_field_content(i, "NewName", NewName);
  730. cache_get_field_content(i, "ApprovedBy", ChangedBy);
  731. cache_get_field_content(i, "Date", Date);
  732. format(cstr, sizeof(cstr), "%s%s\t\t%s\t\t%s\t\t%s\n", cstr, Date, OldName, NewName, ChangedBy);
  733. }
  734. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Namechange Record", cstr, "Ok", "");
  735. cache_delete(Cache:result, sqlGameConnection);
  736. }
  737. return 1;
  738. }
  739. if(dialogid == DIALOG_NAMECHANGES_ID)
  740. {
  741. if(!response) return 1;
  742. else
  743. {
  744. new query[128], OldName[26], NewName[26], ChangedBy[26], rows, fields, cstr[5000], Date[50], Cache:result;
  745. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `namechanges` WHERE `pID`='%e' ORDER BY `ID` DESC", inputtext);
  746. result = mysql_query(sqlGameConnection, query);
  747. cache_get_data(rows, fields, sqlGameConnection);
  748. if(!rows) return SendClientMessage(playerid, COLOR_WHITE, "No namechanges on record.");
  749. format(cstr, sizeof(cstr), "Date\t\tOld Name\t\tNew Name\t\tAdmin\n");
  750. for(new i = 0; i < rows; i++)
  751. {
  752. cache_get_field_content(i, "OldName", OldName);
  753. cache_get_field_content(i, "NewName", NewName);
  754. cache_get_field_content(i, "ApprovedBy", ChangedBy);
  755. cache_get_field_content(i, "Date", Date);
  756. format(cstr, sizeof(cstr), "%s%s\t\t%s\t\t%s\t\t%s\n", cstr, Date, OldName, NewName, ChangedBy);
  757. }
  758. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Namechange Record", cstr, "Ok", "");
  759. cache_delete(Cache:result, sqlGameConnection);
  760. }
  761. return 1;
  762. }
  763. if(dialogid == DIALOG_HOUSEUPGRADE)
  764. {
  765. if(!response) return 1;
  766. else
  767. {
  768. switch(listitem)
  769. {
  770. case 0:
  771. {
  772. if(HouseInfo[PlayerInfo[playerid][pHouseID]][hAlarm] == 0)
  773. {
  774. if(PlayerInfo[playerid][pCash] >= 30000)
  775. {
  776. new location[MAX_ZONE_NAME];
  777. Get2DZone(location, MAX_ZONE_NAME, HouseInfo[PlayerInfo[playerid][pHouseID]][hOutsideX], HouseInfo[PlayerInfo[playerid][pHouseID]][hOutsideY], HouseInfo[PlayerInfo[playerid][pHouseID]][hOutsideZ]);
  778. HouseInfo[PlayerInfo[playerid][pHouseID]][hAlarm] = 1;
  779. HouseInfo[PlayerInfo[playerid][pHouseID]][hModified] = 1;
  780. PlayerInfo[playerid][pCash] -= 30000;
  781. format(str, sizeof(str), "[House Upgrade] You have purchased an alarm for your house (%d %s) for $30,000.", PlayerInfo[playerid][pHouseID], location);
  782. SendClientMessage(playerid, COLOR_YELLOW, str);
  783. }
  784. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  785. }
  786. else return SendClientMessage(playerid, COLOR_GREY, "Your house already has an alarm fitted.");
  787. }
  788. }
  789. }
  790. }
  791. if(dialogid == TAXICALL_DIALOG)
  792. {
  793. if(response == 1)
  794. {
  795. if(strval(inputtext) > 0 && strval(inputtext) < 20)
  796. {
  797. new Float:X, Float:Y, Float:Z;
  798. GetPlayerPos(TaxiCInfoID[strval(inputtext)], X, Y, Z);
  799. SetPlayerCheckpointEx(playerid, X, Y, Z, 1.0);
  800. CP[playerid] = CHECKPOINT_TAXI_CALLER;
  801. new string[128];
  802. format(string, sizeof(string), "%s in %s, has been marked on your GPS.", TaxiCInfo[strval(inputtext)][taxiname], TaxiCInfo[strval(inputtext)][taxilocation]);
  803. SendClientMessage(playerid, -1, string);
  804. TaxiCID[playerid] = TaxiCInfoID[strval(inputtext)];
  805. TaxiCInfoID[strval(inputtext)] = -1;
  806. TaxiCInfo[strval(inputtext)][taxiname] = "0";
  807. } else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid caller ID.");
  808. return 1;
  809. }
  810. }
  811. if(dialogid == DIALOG_MOD_EDIT)
  812. {
  813. if(response)
  814. {
  815. new vid = GetPlayerVehicleID(playerid);
  816. if(listitem == 0)
  817. {
  818. if(GetVehicleComponentInSlot(vid, 0) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  819. removeSlotComponent(vid, 0);
  820. }
  821. if(listitem == 1)
  822. {
  823. if(GetVehicleComponentInSlot(vid, 1) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  824. removeSlotComponent(vid, 1);
  825. }
  826. if(listitem == 2)
  827. {
  828. if(GetVehicleComponentInSlot(vid, 2) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  829. removeSlotComponent(vid, 2);
  830. }
  831. if(listitem == 3)
  832. {
  833. if(GetVehicleComponentInSlot(vid, 3) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  834. removeSlotComponent(vid, 3);
  835. }
  836. if(listitem == 4)
  837. {
  838. if(GetVehicleComponentInSlot(vid, 4) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  839. removeSlotComponent(vid, 4);
  840. }
  841. if(listitem == 5)
  842. {
  843. if(GetVehicleComponentInSlot(vid, 5) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  844. removeSlotComponent(vid, 5);
  845. }
  846. if(listitem == 6)
  847. {
  848. if(GetVehicleComponentInSlot(vid, 6) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  849. removeSlotComponent(vid, 6);
  850. }
  851. if(listitem == 7)
  852. {
  853. if(GetVehicleComponentInSlot(vid, 7) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  854. removeSlotComponent(vid, 7);
  855. }
  856. if(listitem == 8)
  857. {
  858. if(GetVehicleComponentInSlot(vid, 8) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  859. removeSlotComponent(vid, 8);
  860. }
  861. if(listitem == 9)
  862. {
  863. if(GetVehicleComponentInSlot(vid, 9) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  864. removeSlotComponent(vid, 9);
  865. }
  866. if(listitem == 10)
  867. {
  868. if(GetVehicleComponentInSlot(vid, 10) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  869. removeSlotComponent(vid, 10);
  870. }
  871. if(listitem == 11)
  872. {
  873. if(GetVehicleComponentInSlot(vid, 11) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  874. removeSlotComponent(vid, 11);
  875. }
  876. if(listitem == 12)
  877. {
  878. if(GetVehicleComponentInSlot(vid, 12) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  879. removeSlotComponent(vid, 12);
  880. }
  881. if(listitem == 13)
  882. {
  883. if(GetVehicleComponentInSlot(vid, 13) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that slot.");
  884. removeSlotComponent(vid, 13);
  885. }
  886. }
  887. }
  888. if(dialogid == DIALOG_PAINTBALL_WEAPONS1) //handguns
  889. {
  890. if(!response)
  891. {
  892. ClearPaintballGuns(playerid);
  893. return 1;
  894. }
  895. if(listitem == 0)
  896. {
  897. pPaintGuns[playerid][1] = 22;
  898. format(PaintBall[playerid][pbWeaponName1], 32, "{FF0000}Colt 45{FFFFFF}");
  899. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS2, DIALOG_STYLE_LIST, "Shotgun Selection", "Shotgun\nSawnoff Shotgun\nSpas 12", "Select", "Quit");
  900. }
  901. if(listitem == 1)
  902. {
  903. format(PaintBall[playerid][pbWeaponName1], 32, "{FF0000}Desert Eagle{FFFFFF}");
  904. pPaintGuns[playerid][1] = 24;
  905. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS2, DIALOG_STYLE_LIST, "Shotgun Selection", "Shotgun\nSawnoff Shotgun\nSpas 12", "Select", "Quit");
  906. }
  907. }
  908. if(dialogid == DIALOG_MAP)
  909. {
  910. if(!response) return 1;
  911. else
  912. {
  913. switch(listitem)
  914. {
  915. case 0:
  916. {
  917. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Detective job.");
  918. goingJob[playerid] = true;
  919. SetPlayerCheckpointEx(playerid, 1553.5276, -1675.4719, 16.1953, 5.0);
  920. }
  921. case 1:
  922. {
  923. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Lawyer job.");
  924. goingJob[playerid] = true;
  925. SetPlayerCheckpointEx(playerid, 1381.0413, -1088.8511, 27.3906, 5.0);
  926. }
  927. case 2:
  928. {
  929. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Drug Dealer job.");
  930. goingJob[playerid] = true;
  931. SetPlayerCheckpointEx(playerid, 2166.3772, -1675.3829, 15.0859, 5.0);
  932. }
  933. case 3:
  934. {
  935. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Product Dealer job.");
  936. goingJob[playerid] = true;
  937. SetPlayerCheckpointEx(playerid, 972.0286, -1385.7682, 13.5477, 5.0);
  938. }
  939. case 4:
  940. {
  941. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Mechanic job.");
  942. goingJob[playerid] = true;
  943. SetPlayerCheckpointEx(playerid, 2329.4089, -2316.0996, 13.5469, 5.0);
  944. }
  945. case 5:
  946. {
  947. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Bodyguard job.");
  948. goingJob[playerid] = true;
  949. SetPlayerCheckpointEx(playerid, 2226.1716, -1718.1792, 13.5165, 5.0);
  950. }
  951. case 6:
  952. {
  953. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Arms Dealer job.");
  954. goingJob[playerid] = true;
  955. SetPlayerCheckpointEx(playerid, 1366.4325, -1275.2096, 13.5469, 5.0);
  956. }
  957. case 7:
  958. {
  959. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Boxer job.");
  960. goingJob[playerid] = true;
  961. SetPlayerCheckpointEx(playerid, 2227.9595, -1722.2257, 13.2633, 5.0);
  962. }
  963. case 8:
  964. {
  965. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Taxi Driver job.");
  966. goingJob[playerid] = true;
  967. SetPlayerCheckpointEx(playerid, 1741.7062, -1863.6664, 13.5748, 5.0);
  968. }
  969. case 9:
  970. {
  971. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Drug Smuggler job.");
  972. goingJob[playerid] = true;
  973. SetPlayerCheckpointEx(playerid, 2354.2703, -1169.3293, 28.0083, 5.0);
  974. }
  975. case 10:
  976. {
  977. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the San Andreas Police Department.");
  978. goingJob[playerid] = true;
  979. SetPlayerCheckpointEx(playerid, 1552.9044, -1675.5406, 16.1953, 5.0);
  980. }
  981. case 11:
  982. {
  983. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Los Santos Bank.");
  984. goingJob[playerid] = true;
  985. SetPlayerCheckpointEx(playerid, 1462.2672, -1012.0541, 26.8438, 5.0);
  986. }
  987. case 12:
  988. {
  989. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Los Santos Gym.");
  990. goingJob[playerid] = true;
  991. SetPlayerCheckpointEx(playerid, 2228.8279, -1721.8065, 13.5659, 5.0);
  992. }
  993. case 13:
  994. {
  995. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the Fire & Medical Department.");
  996. goingJob[playerid] = true;
  997. SetPlayerCheckpointEx(playerid, 1108.6631, -1337.4138, 13.8500, 5.0);
  998. }
  999. case 14:
  1000. {
  1001. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Job CP]{FFFFFF} Follow the marker on your minimap to find the SAN Station.");
  1002. goingJob[playerid] = true;
  1003. SetPlayerCheckpointEx(playerid, 648.2065, -1353.3262, 13.12, 5.0);
  1004. }
  1005. }
  1006. }
  1007. }
  1008. if(dialogid == DIALOG_PAINTBALL_WEAPONS2) //shotguns
  1009. {
  1010. if(!response)
  1011. {
  1012. ClearPaintballGuns(playerid);
  1013. return 1;
  1014. }
  1015. if(listitem == 0)
  1016. {
  1017. pPaintGuns[playerid][2] = 25;
  1018. format(PaintBall[playerid][pbWeaponName2], 32, "{FF0000}Shotgun{FFFFFF}");
  1019. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS3, DIALOG_STYLE_LIST, "SMG Selection", "Uzi\nMP5\nTec-9", "Select", "Quit");
  1020. }
  1021. if(listitem == 1)
  1022. {
  1023. pPaintGuns[playerid][2] = 26;
  1024. format(PaintBall[playerid][pbWeaponName2], 32, "{FF0000}Sawnoff Shotgun{FFFFFF}");
  1025. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS3, DIALOG_STYLE_LIST, "SMG Selection", "Uzi\nMP5\nTec-9", "Select", "Quit");
  1026. }
  1027. if(listitem == 2)
  1028. {
  1029. pPaintGuns[playerid][2] = 27;
  1030. format(PaintBall[playerid][pbWeaponName2], 32, "{FF0000}Spas 12{FFFFFF}");
  1031. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS3, DIALOG_STYLE_LIST, "SMG Selection", "Uzi\nMP5\nTec-9", "Select", "Quit");
  1032. }
  1033. }
  1034. if(dialogid == DIALOG_PAINTBALL_WEAPONS3)
  1035. {
  1036. if(!response)
  1037. {
  1038. ClearPaintballGuns(playerid);
  1039. return 1;
  1040. }
  1041. if(listitem == 0)
  1042. {
  1043. pPaintGuns[playerid][3] = 28;
  1044. format(PaintBall[playerid][pbWeaponName3], 32, "{FF0000}UZI{FFFFFF}");
  1045. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS4, DIALOG_STYLE_LIST, "Assault Selection", "AK-47\nM4", "Select", "Quit");
  1046. }
  1047. if(listitem == 1)
  1048. {
  1049. pPaintGuns[playerid][3] = 29;
  1050. format(PaintBall[playerid][pbWeaponName3], 32, "{FF0000}MP5{FFFFFF}");
  1051. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS4, DIALOG_STYLE_LIST, "Assault Selection", "AK-47\nM4", "Select", "Quit");
  1052. }
  1053. if(listitem == 2)
  1054. {
  1055. pPaintGuns[playerid][3] = 32;
  1056. format(PaintBall[playerid][pbWeaponName3], 32, "{FF0000}Tec-9{FFFFFF}");
  1057. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS4, DIALOG_STYLE_LIST, "Assault Selection", "AK-47\nM4", "Select", "Quit");
  1058. }
  1059. }
  1060. if(dialogid == DIALOG_PAINTBALL_WEAPONS4)
  1061. {
  1062. if(!response)
  1063. {
  1064. ClearPaintballGuns(playerid);
  1065. return 1;
  1066. }
  1067. if(listitem == 0)
  1068. {
  1069. pPaintGuns[playerid][4] = 30;
  1070. format(PaintBall[playerid][pbWeaponName4], 32, "{FF0000}AK-47{FFFFFF}");
  1071. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS5, DIALOG_STYLE_LIST, "Rifle Selection", "County Rifle\nSniper Rifle", "Select", "Quit");
  1072. }
  1073. if(listitem == 1)
  1074. {
  1075. pPaintGuns[playerid][4] = 31;
  1076. format(PaintBall[playerid][pbWeaponName4], 32, "{FF0000}M4{FFFFFF}");
  1077. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS5, DIALOG_STYLE_LIST, "Rifle Selection", "County Rifle\nSniper Rifle", "Select", "Quit");
  1078. }
  1079. }
  1080. if(dialogid == DIALOG_PAINTBALL_WEAPONS5)
  1081. {
  1082. if(!response)
  1083. {
  1084. ClearPaintballGuns(playerid);
  1085. return 1;
  1086. }
  1087. if(listitem == 0)
  1088. {
  1089. new pbjoinstr[1000];
  1090. pPaintGuns[playerid][5] = 33;
  1091. format(PaintBall[playerid][pbWeaponName5], 32, "{FF0000}County Rifle{FFFFFF}");
  1092. 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]);
  1093. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS6, DIALOG_STYLE_MSGBOX, "Paintball Confirmation", pbjoinstr, "Enter", "Quit");
  1094. }
  1095. if(listitem == 1)
  1096. {
  1097. new pbjoinstr[1000];
  1098. pPaintGuns[playerid][5] = 34;
  1099. format(PaintBall[playerid][pbWeaponName5], 32, "{FF0000}Sniper Rifle{FFFFFF}");
  1100. 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]);
  1101. ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS6, DIALOG_STYLE_MSGBOX, "Paintball Confirmation", pbjoinstr, "Enter", "Quit");
  1102. }
  1103. }
  1104. if(dialogid == DIALOG_PAINTBALL_WEAPONS6)
  1105. {
  1106. if(!response)
  1107. {
  1108. ClearPaintballGuns(playerid);
  1109. return 1;
  1110. }
  1111. else
  1112. {
  1113. enter_pb(playerid);
  1114. }
  1115. }
  1116. if(dialogid == DIALOG_LOGIN)
  1117. {
  1118. if(response)
  1119. {
  1120. if(!gamemodeLoaded)
  1121. {
  1122. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "{FFFFFF}Welcome back to {FFFF00}Project Roleplay{FFFFFF}.\n\nPlease enter your password below to login to your account:", "Login", "Quit");
  1123. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Please wait until the gamemode has finished loading.");
  1124. return 1;
  1125. }
  1126. if(!strlen(inputtext))
  1127. {
  1128. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "{FFFFFF}Welcome back to {FFFF00}Project Roleplay{FFFFFF}.\n\nPlease enter your password below to login to your account:", "Login", "Quit");
  1129. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You must enter a password.");
  1130. return 1;
  1131. }
  1132. if(strlen(inputtext) > 64)
  1133. {
  1134. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "{FFFFFF}Welcome back to {FFFF00}Project Roleplay{FFFFFF}.\n\nPlease enter your password below to login to your account:", "Login", "Quit");
  1135. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Password is too long.");
  1136. return 1;
  1137. }
  1138. if(gPlayerLogged[playerid])
  1139. {
  1140. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You are already logged in.");
  1141. return 1;
  1142. }
  1143. //\\// Password & Verification
  1144. //=============================
  1145. new bool: correctpass = false;
  1146. if(isnull(NewPassword[playerid])) {
  1147. //password in old shitty method
  1148. if(isnull(tempHash[playerid])) {
  1149. new encrypted_password[65];
  1150. strmid(encrypted_password, inputtext, 0, strlen(inputtext), 255);
  1151. Encrypt(encrypted_password);
  1152. if(strcmp(encrypted_password, tempPassword[playerid], true) == 0) { //password matches Key_ field
  1153. HashPassword(inputtext, playerid);
  1154. correctpass = true;
  1155. }
  1156. //password in buggy SHA_256 -- warning remove this on SA:MP 0.3.8 update, replace with error message for manual password change
  1157. //SHA_256 was buggy in SA:MP 0.3.7 RC-X and has been fixed hence will no longer match correct passwords
  1158. } else {
  1159. new password[65];
  1160. strmid(password, inputtext, 0, strlen(inputtext), 255);
  1161. SHA256_PassHash(password, tempSalt[playerid], password, sizeof(password));
  1162. //SHA_256 matches
  1163. if(strcmp(password, tempHash[playerid], true) == 0) {
  1164. HashPassword(inputtext, playerid);
  1165. correctpass = true;
  1166. }
  1167. }
  1168. }
  1169. //Use the new password method
  1170. else {
  1171. if(CheckPassword(inputtext, NewPassword[playerid], NewSalt[playerid], playerid)) {
  1172. correctpass = true;
  1173. }
  1174. }
  1175. //Correct password?
  1176. if(correctpass) {
  1177. new query[128];
  1178. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE `name` = '%e' LIMIT 1", PlayerName(playerid));
  1179. mysql_pquery(sqlGameConnection, query, "OnPlayerLoad", "dd", playerid, MySQLConnectionOrder[playerid]);
  1180. }
  1181. //If not, try again
  1182. else {
  1183. if(LoginAttempts[playerid] >= 2) {
  1184. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Incorrect password, you have been kicked as a result.");
  1185. KickEx(playerid);
  1186. return 1;
  1187. }
  1188. new msgstring[128];
  1189. format(msgstring, sizeof(msgstring), "{FFFFFF}Welcome back to {FFFF00}Project Roleplay{FFFFFF}.\n\nPlease enter your password below to login to your account:", msgstring);
  1190. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", msgstring, "Login", "Quit");
  1191. displayCenterHUDInfo(playerid, "Incorrect password.", 8);
  1192. LoginAttempts[playerid]++;
  1193. }
  1194. return 1;
  1195. }
  1196. else
  1197. {
  1198. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You have left the server.");
  1199. KickEx(playerid);
  1200. }
  1201. return 1;
  1202. }
  1203. if(dialogid == DIALOG_TAXI)
  1204. {
  1205. if(response)
  1206. {
  1207. if(listitem == 0)
  1208. {
  1209. 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");
  1210. }
  1211. if(listitem == 1)
  1212. {
  1213. ShowPlayerDialog(playerid, DIALOG_TAXI_WEAPONS, DIALOG_STYLE_LIST, "Taxi Armory", "Colt 45 ($150)\nShotgun ($350)\nKevlar ($5,000)", "Select", "Cancel");
  1214. }
  1215. }
  1216. }
  1217. if(dialogid == DIALOG_TAXI_UNIFORMS)
  1218. {
  1219. if(!response) return 1;
  1220. PlayerInfo[playerid][pClothes] = 0;
  1221. if(listitem == 0)
  1222. {
  1223. PlayerInfo[playerid][pModel] = 211;
  1224. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1225. }
  1226. if(listitem == 1)
  1227. {
  1228. PlayerInfo[playerid][pModel] = 255;
  1229. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1230. }
  1231. if(listitem == 2)
  1232. {
  1233. PlayerInfo[playerid][pModel] = 261;
  1234. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1235. }
  1236. if(listitem == 3)
  1237. {
  1238. PlayerInfo[playerid][pModel] = 61;
  1239. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1240. }
  1241. if(listitem == 4)
  1242. {
  1243. PlayerInfo[playerid][pModel] = 234;
  1244. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1245. }
  1246. if(listitem == 5)
  1247. {
  1248. PlayerInfo[playerid][pModel] = 188;
  1249. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1250. }
  1251. if(listitem == 6)
  1252. {
  1253. PlayerInfo[playerid][pModel] = 253;
  1254. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1255. }
  1256. if(listitem == 7)
  1257. {
  1258. PlayerInfo[playerid][pModel] = 147;
  1259. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1260. }
  1261. }
  1262. if(dialogid == DIALOG_TAXI_WEAPONS)
  1263. {
  1264. if(!response) return 1;
  1265. if(listitem == 0)
  1266. {
  1267. if(PlayerInfo[playerid][pCash] >= 150)
  1268. {
  1269. GivePlayerGun(playerid, 22);
  1270. PlayerInfo[playerid][pCash] -= 150;
  1271. }
  1272. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  1273. }
  1274. if(listitem == 1)
  1275. {
  1276. if(PlayerInfo[playerid][pCash] >= 350)
  1277. {
  1278. GivePlayerGun(playerid, 25);
  1279. PlayerInfo[playerid][pCash] -= 350;
  1280. }
  1281. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  1282. }
  1283. if(listitem == 2)
  1284. {
  1285. if(PlayerInfo[playerid][pCash] >= 5000)
  1286. {
  1287. SetPlayerArmour(playerid, 100.0);
  1288. PlayerInfo[playerid][pCash] -= 5000;
  1289. }
  1290. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  1291. }
  1292. }
  1293. if(dialogid == DIALOG_CRIME)
  1294. {
  1295. if(response)
  1296. {
  1297. new money = PlayerInfo[playerid][pCash];
  1298. switch(listitem)
  1299. {
  1300. case 0: // Desert Eagle
  1301. {
  1302. if(money >= 2500) {
  1303. GiveMoney(playerid, -2500);
  1304. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1305. GivePlayerGun(playerid, WEAPON_DEAGLE);
  1306. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a Desert Eagle for $2,500.");
  1307. } else {
  1308. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1309. }
  1310. }
  1311. case 1: // SD Pistol
  1312. {
  1313. if(money >= 5000) {
  1314. GiveMoney(playerid, -5000);
  1315. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1316. GivePlayerGun(playerid, WEAPON_SILENCED);
  1317. SendClientMessage(playerid, COLOR_CRIME, "You have purchased an SD Pistol for $5,000.");
  1318. } else {
  1319. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1320. }
  1321. }
  1322. case 2: // Break
  1323. {
  1324. showCrimeDialog(playerid);
  1325. }
  1326. case 3: // M4
  1327. {
  1328. if(money >= 12500) {
  1329. GiveMoney(playerid, -12500);
  1330. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1331. GivePlayerGun(playerid, WEAPON_M4);
  1332. SendClientMessage(playerid, COLOR_CRIME, "You have purchased an M4 for $12,500.");
  1333. } else {
  1334. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1335. }
  1336. }
  1337. case 4: // AK47
  1338. {
  1339. if(money >= 7500) {
  1340. GiveMoney(playerid, -7500);
  1341. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1342. GivePlayerGun(playerid, WEAPON_AK47);
  1343. SendClientMessage(playerid, COLOR_CRIME, "You have purchased an AK47 for $7,500.");
  1344. } else {
  1345. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1346. }
  1347. }
  1348. case 5: // Break
  1349. {
  1350. showCrimeDialog(playerid);
  1351. }
  1352. case 6: // Spas12
  1353. {
  1354. if(money >= 25000) {
  1355. GiveMoney(playerid, -25000);
  1356. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1357. GivePlayerGun(playerid, WEAPON_SHOTGSPA);
  1358. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a combat shotgun for $25,000.");
  1359. } else {
  1360. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1361. }
  1362. }
  1363. case 7: // Shotgun
  1364. {
  1365. if(money >= 2000) {
  1366. GiveMoney(playerid, -2000);
  1367. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1368. GivePlayerGun(playerid, WEAPON_SHOTGUN);
  1369. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a shotgun for $2,000.");
  1370. } else {
  1371. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1372. }
  1373. }
  1374. case 8: // Sawn off
  1375. {
  1376. if(money >= 7500) {
  1377. GiveMoney(playerid, -7500);
  1378. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1379. GivePlayerGun(playerid, WEAPON_SAWEDOFF);
  1380. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a sawn-off shotgun for $7,500.");
  1381. } else {
  1382. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1383. }
  1384. }
  1385. case 9: // Break
  1386. {
  1387. showCrimeDialog(playerid);
  1388. }
  1389. case 10: // MP5
  1390. {
  1391. if(money >= 1000) {
  1392. GiveMoney(playerid, -1000);
  1393. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1394. GivePlayerGun(playerid, WEAPON_MP5);
  1395. SendClientMessage(playerid, COLOR_CRIME, "You have purchased an MP5 for $1,000.");
  1396. } else {
  1397. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1398. }
  1399. }
  1400. case 11: // TEC9
  1401. {
  1402. if(money >= 2500) {
  1403. GiveMoney(playerid, -2500);
  1404. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1405. GivePlayerGun(playerid, WEAPON_TEC9);
  1406. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a TEC9 for $2,500.");
  1407. } else {
  1408. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1409. }
  1410. }
  1411. case 12: // Uzi
  1412. {
  1413. if(money >= 2500) {
  1414. GiveMoney(playerid, -2500);
  1415. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1416. GivePlayerGun(playerid, WEAPON_UZI);
  1417. SendClientMessage(playerid, COLOR_CRIME, "You have purchased an Uzi for $2,500.");
  1418. } else {
  1419. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1420. }
  1421. }
  1422. case 13: // Break
  1423. {
  1424. showCrimeDialog(playerid);
  1425. }
  1426. case 14: // Rifle
  1427. {
  1428. if(money >= 2500) {
  1429. GiveMoney(playerid, -2500);
  1430. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1431. GivePlayerGun(playerid, WEAPON_RIFLE);
  1432. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a country rifle for $2,500.");
  1433. } else {
  1434. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1435. }
  1436. }
  1437. case 15: // Sniper Rifle
  1438. {
  1439. if(money >= 15000) {
  1440. GiveMoney(playerid, -15000);
  1441. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1442. GivePlayerGun(playerid, WEAPON_SNIPER);
  1443. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a sniper rifle for $15,000.");
  1444. } else {
  1445. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1446. }
  1447. }
  1448. case 16: // Break
  1449. {
  1450. showCrimeDialog(playerid);
  1451. }
  1452. case 17: // Flamethrower
  1453. {
  1454. if(PlayerInfo[playerid][pGroupRank] < 3)
  1455. return SendClientMessage(playerid, COLOR_CRIME, "You need to be R3+ to use this.");
  1456. if(money >= 20000) {
  1457. GiveMoney(playerid, -20000);
  1458. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1459. GivePlayerGun(playerid, WEAPON_FLAMETHROWER);
  1460. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a flamethrower for $20,000.");
  1461. } else {
  1462. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1463. }
  1464. }
  1465. case 18: // C4
  1466. {
  1467. if(PlayerInfo[playerid][pGroupRank] < 2)
  1468. return SendClientMessage(playerid, COLOR_GREY, "You aren't high enough rank.");
  1469. if(money >= 10000) {
  1470. GiveMoney(playerid, -25000);
  1471. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1472. PlayerInfo[playerid][pBombs] += 1;
  1473. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a block of plastic explosive for $10,000.");
  1474. } else {
  1475. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1476. }
  1477. }
  1478. case 19: // Break
  1479. {
  1480. showCrimeDialog(playerid);
  1481. }
  1482. case 20: // Chainsaw
  1483. {
  1484. if(PlayerInfo[playerid][pGroupRank] < 3)
  1485. return SendClientMessage(playerid, COLOR_GREY, "You aren't high enough rank.");
  1486. if(money >= 5000) {
  1487. GiveMoney(playerid, -5000);
  1488. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1489. GivePlayerGun(playerid, WEAPON_CHAINSAW);
  1490. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a chainsaw for $5,000.");
  1491. } else {
  1492. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1493. }
  1494. }
  1495. case 21: // Knife
  1496. {
  1497. if(money >= 1000) {
  1498. GiveMoney(playerid, -1000);
  1499. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1500. GivePlayerGun(playerid, WEAPON_KNIFE);
  1501. SendClientMessage(playerid, COLOR_CRIME, "You have purchased a knife for $1,000.");
  1502. } else {
  1503. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1504. }
  1505. }
  1506. case 22: // Break
  1507. {
  1508. showCrimeDialog(playerid);
  1509. }
  1510. case 23: // Tear Gas
  1511. {
  1512. if(money >= 2500) {
  1513. GiveMoney(playerid, -2500);
  1514. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1515. GivePlayerGun(playerid, WEAPON_TEARGAS);
  1516. SendClientMessage(playerid, COLOR_CRIME, "You have purchased two canisters of tear gas for $2,500.");
  1517. } else {
  1518. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1519. }
  1520. }
  1521. case 24: // Grenades
  1522. {
  1523. SendClientMessage(playerid, COLOR_GREY, "Grenades have been disabled.");
  1524. /*if(money >= 2500) {
  1525. GiveMoney(playerid, -2500);
  1526. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1527. GivePlayerGun(playerid, WEAPON_GRENADE);
  1528. } else {
  1529. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1530. }*/
  1531. }
  1532. case 25: // Molotov Cocktail
  1533. {
  1534. if(PlayerInfo[playerid][pGroupRank] < 3)
  1535. return SendClientMessage(playerid, COLOR_GREY, "You aren't high enough rank.");
  1536. if(money >= 2500) {
  1537. GiveMoney(playerid, -2500);
  1538. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1539. GivePlayerGun(playerid, WEAPON_MOLTOV);
  1540. } else {
  1541. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1542. }
  1543. }
  1544. case 26: // Break
  1545. {
  1546. showCrimeDialog(playerid);
  1547. }
  1548. case 27: // Health and Armour
  1549. {
  1550. if(money >= 1000) {
  1551. GiveMoney(playerid, -1000);
  1552. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1553. SetPlayerHealth(playerid, 100.0);
  1554. SetPlayerArmour(playerid, 100.0);
  1555. } else {
  1556. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1557. }
  1558. }
  1559. case 28: // Half Vest
  1560. {
  1561. if(money >= 1000) {
  1562. GiveMoney(playerid, -1000);
  1563. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1564. SetPlayerArmour(playerid, 50.0);
  1565. } else {
  1566. SendClientMessage(playerid, COLOR_CRIME, "You can't afford that.");
  1567. }
  1568. }
  1569. case 29: // Break
  1570. {
  1571. showCrimeDialog(playerid);
  1572. }
  1573. case 30: // Jammer
  1574. {
  1575. if(money >= 1000)
  1576. {
  1577. GiveMoney(playerid, -1000);
  1578. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1579. PlayerInfo[playerid][pJammer] += 1;
  1580. SendClientMessage(playerid, COLOR_CRIME, "* You have purchased a signal jammer for $1,000.");
  1581. }
  1582. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  1583. }
  1584. case 31: // Dufflebag
  1585. {
  1586. SendClientMessage(playerid, COLOR_CRIME, "TODO: Script Dufflebags");
  1587. }
  1588. case 32: // Namechange
  1589. {
  1590. 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");
  1591. }
  1592. case 33: // Break
  1593. {
  1594. showCrimeDialog(playerid);
  1595. }
  1596. case 34: // Fully Armed
  1597. {
  1598. if(money >= 58000)
  1599. {
  1600. GiveMoney(playerid, -58000);
  1601. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1602. SetPlayerArmour(playerid, 100.0);
  1603. SetPlayerHealth(playerid, 100.0);
  1604. GivePlayerGun(playerid, WEAPON_DEAGLE);
  1605. GivePlayerGun(playerid, WEAPON_M4);
  1606. GivePlayerGun(playerid, WEAPON_SHOTGSPA);
  1607. GivePlayerGun(playerid, WEAPON_MP5);
  1608. GivePlayerGun(playerid, WEAPON_SNIPER);
  1609. GivePlayerGun(playerid, WEAPON_KNIFE);
  1610. SendClientMessage(playerid, COLOR_CRIME, "* You have purchased a full kit for $58,000.");
  1611. }
  1612. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  1613. }
  1614. }
  1615. }
  1616. }
  1617. if(dialogid == DIALOG_ARMORY) {
  1618. if(!response)
  1619. return 1;
  1620. switch(listitem) {
  1621. case 0: {
  1622. if(GetMoney(playerid) < 500)
  1623. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1624. GivePlayerGun(playerid, WEAPON_COLT45);
  1625. GiveMoney(playerid, -500);
  1626. }
  1627. case 1: {
  1628. if(GetMoney(playerid) < 1000)
  1629. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1630. GivePlayerGun(playerid, WEAPON_MP5);
  1631. GiveMoney(playerid, -1000);
  1632. }
  1633. case 2: {
  1634. if(GetMoney(playerid) < 1000)
  1635. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1636. GivePlayerGun(playerid, WEAPON_SHOTGUN);
  1637. GiveMoney(playerid, -1000);
  1638. }
  1639. case 3: {
  1640. if(GetMoney(playerid) < 10000)
  1641. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1642. GivePlayerGun(playerid, WEAPON_DEAGLE);
  1643. GiveMoney(playerid, -10000);
  1644. }
  1645. case 4: {
  1646. if(GetMoney(playerid) < 10000)
  1647. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1648. GivePlayerGun(playerid, WEAPON_RIFLE);
  1649. GiveMoney(playerid, -10000);
  1650. }
  1651. case 5: {
  1652. if(GetMoney(playerid) < 25000)
  1653. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1654. GivePlayerGun(playerid, WEAPON_M4);
  1655. GiveMoney(playerid, -25000);
  1656. }
  1657. case 6: {
  1658. if(GetMoney(playerid) < 15000)
  1659. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1660. GivePlayerGun(playerid, WEAPON_AK47);
  1661. GiveMoney(playerid, -15000);
  1662. }
  1663. case 7: {
  1664. if(GetMoney(playerid) < 35000)
  1665. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1666. GivePlayerGun(playerid, WEAPON_SNIPER);
  1667. GiveMoney(playerid, -35000);
  1668. }
  1669. case 8: {
  1670. if(GetMoney(playerid) < 35000)
  1671. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1672. GivePlayerGun(playerid, WEAPON_SHOTGSPA);
  1673. GiveMoney(playerid, -35000);
  1674. }
  1675. case 9: {
  1676. if(GetMoney(playerid) < 40000)
  1677. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1678. GivePlayerGun(playerid, WEAPON_CHAINSAW);
  1679. GiveMoney(playerid, -40000);
  1680. }
  1681. case 10: {
  1682. if(GetMoney(playerid) < 10000)
  1683. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1684. SetPlayerArmour(playerid, 100);
  1685. GiveMoney(playerid, -10000);
  1686. }
  1687. case 11: {
  1688. if(GetMoney(playerid) < 15)
  1689. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1690. SetPlayerHealth(playerid, 100);
  1691. GiveMoney(playerid, -15);
  1692. }
  1693. case 12: {
  1694. if(GetMoney(playerid) < 10000)
  1695. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1696. GivePlayerGun(playerid, WEAPON_SAWEDOFF);
  1697. GiveMoney(playerid, -10000);
  1698. }
  1699. case 13: {
  1700. if(GetMoney(playerid) < 10000)
  1701. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1702. GivePlayerGun(playerid, WEAPON_SILENCED);
  1703. GiveMoney(playerid, -10000);
  1704. }
  1705. case 14: {
  1706. if(GetMoney(playerid) < 15000)
  1707. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1708. GivePlayerGun(playerid, WEAPON_MOLTOV);
  1709. GiveMoney(playerid, -15000);
  1710. }
  1711. case 15: {
  1712. if(GetMoney(playerid) < 25000)
  1713. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1714. GivePlayerGun(playerid, WEAPON_UZI);
  1715. GiveMoney(playerid, -25000);
  1716. }
  1717. case 16: {
  1718. if(GetMoney(playerid) < 25000)
  1719. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1720. GivePlayerGun(playerid, WEAPON_TEC9);
  1721. GiveMoney(playerid, -25000);
  1722. }
  1723. case 17: {
  1724. if(GetMoney(playerid) < 10000)
  1725. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1726. PlayerInfo[playerid][pJammer] = 1;
  1727. GiveMoney(playerid, -10000);
  1728. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Signal jammer acquired.");
  1729. }
  1730. case 18: {
  1731. if(GetMoney(playerid) < 10000)
  1732. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1733. GivePlayerGun(playerid, WEAPON_TEARGAS);
  1734. GiveMoney(playerid, -10000);
  1735. }
  1736. case 19: {
  1737. SendClientMessage(playerid, COLOR_GREY, "Grenades have been disabled");
  1738. /*
  1739. if(GetMoney(playerid) < 10000)
  1740. return SendClientMessage(playerid, COLOR_GREY, "You cannot afford this.");
  1741. GivePlayerGun(playerid, WEAPON_GRENADE);
  1742. GiveMoney(playerid, -10000);*/
  1743. }
  1744. }
  1745. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1746. }
  1747. if(dialogid == DIALOG_SYNDICATE_NAMECHANGE)
  1748. {
  1749. if(!response || !strlen(inputtext))
  1750. return showCrimeDialog(playerid);
  1751. new query[128];
  1752. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name` FROM `players` WHERE `Name` = '%e'", inputtext);
  1753. mysql_pquery(sqlGameConnection, query, "OnSetName", "iis", playerid, playerid, inputtext);
  1754. }
  1755. if(dialogid == DIALOG_HITMAN)
  1756. {
  1757. if(response)
  1758. {
  1759. if(!IsPlayerNearHitmenHQ(playerid))
  1760. return SendClientMessage(playerid, COLOR_GREY, "You are not at your headquarters.");
  1761. new money = PlayerInfo[playerid][pCash];
  1762. switch(listitem)
  1763. {
  1764. case 0: // Desert Eagle
  1765. {
  1766. if(money >= 2500) {
  1767. GiveMoney(playerid, -2500);
  1768. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1769. GivePlayerGun(playerid, WEAPON_DEAGLE);
  1770. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a Desert Eagle for $2,500.");
  1771. } else {
  1772. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1773. }
  1774. }
  1775. case 1: // SD Pistol
  1776. {
  1777. if(money >= 5000) {
  1778. GiveMoney(playerid, -5000);
  1779. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1780. GivePlayerGun(playerid, WEAPON_SILENCED);
  1781. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased an SD Pistol for $5,000.");
  1782. } else {
  1783. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1784. }
  1785. }
  1786. case 2: // Break
  1787. {
  1788. showHitmanDialog(playerid);
  1789. }
  1790. case 3: // M4
  1791. {
  1792. if(money >= 12500) {
  1793. GiveMoney(playerid, -12500);
  1794. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1795. GivePlayerGun(playerid, WEAPON_M4);
  1796. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased an M4 for $12,500.");
  1797. } else {
  1798. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1799. }
  1800. }
  1801. case 4: // AK47
  1802. {
  1803. if(money >= 7500) {
  1804. GiveMoney(playerid, -7500);
  1805. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1806. GivePlayerGun(playerid, WEAPON_AK47);
  1807. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased an AK47 for $7,500.");
  1808. } else {
  1809. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1810. }
  1811. }
  1812. case 5: // Break
  1813. {
  1814. showHitmanDialog(playerid);
  1815. }
  1816. case 6: // Spas12
  1817. {
  1818. if(money >= 25000) {
  1819. GiveMoney(playerid, -25000);
  1820. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1821. GivePlayerGun(playerid, WEAPON_SHOTGSPA);
  1822. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a combat shotgun for $25,000.");
  1823. } else {
  1824. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1825. }
  1826. }
  1827. case 7: // Shotgun
  1828. {
  1829. if(money >= 2000) {
  1830. GiveMoney(playerid, -2000);
  1831. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1832. GivePlayerGun(playerid, WEAPON_SHOTGUN);
  1833. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a shotgun for $2,000.");
  1834. } else {
  1835. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1836. }
  1837. }
  1838. case 8: // Sawn off
  1839. {
  1840. if(money >= 7500) {
  1841. GiveMoney(playerid, -7500);
  1842. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1843. GivePlayerGun(playerid, WEAPON_SAWEDOFF);
  1844. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a sawn-off shotgun for $7,500.");
  1845. } else {
  1846. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1847. }
  1848. }
  1849. case 9: // Break
  1850. {
  1851. showHitmanDialog(playerid);
  1852. }
  1853. case 10: // MP5
  1854. {
  1855. if(money >= 1000) {
  1856. GiveMoney(playerid, -1000);
  1857. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1858. GivePlayerGun(playerid, WEAPON_MP5);
  1859. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased an MP5 for $1,000.");
  1860. } else {
  1861. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1862. }
  1863. }
  1864. case 11: // TEC9
  1865. {
  1866. if(money >= 2500) {
  1867. GiveMoney(playerid, -2500);
  1868. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1869. GivePlayerGun(playerid, WEAPON_TEC9);
  1870. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a TEC9 for $2,500.");
  1871. } else {
  1872. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1873. }
  1874. }
  1875. case 12: // Uzi
  1876. {
  1877. if(money >= 2500) {
  1878. GiveMoney(playerid, -2500);
  1879. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1880. GivePlayerGun(playerid, WEAPON_UZI);
  1881. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased an Uzi for $2,500.");
  1882. } else {
  1883. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1884. }
  1885. }
  1886. case 13: // Break
  1887. {
  1888. showHitmanDialog(playerid);
  1889. }
  1890. case 14: // Rifle
  1891. {
  1892. if(money >= 2500) {
  1893. GiveMoney(playerid, -2500);
  1894. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1895. GivePlayerGun(playerid, WEAPON_RIFLE);
  1896. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a country rifle for $2,500.");
  1897. } else {
  1898. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1899. }
  1900. }
  1901. case 15: // Sniper Rifle
  1902. {
  1903. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to purchase this.");
  1904. if(money >= 15000) {
  1905. GiveMoney(playerid, -15000);
  1906. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1907. GivePlayerGun(playerid, WEAPON_SNIPER);
  1908. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a sniper rifle for $15,000.");
  1909. } else {
  1910. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1911. }
  1912. }
  1913. case 16: // Break
  1914. {
  1915. showHitmanDialog(playerid);
  1916. }
  1917. case 17: // Flamethrower
  1918. {
  1919. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to purchase this.");
  1920. if(PlayerInfo[playerid][pGroupRank] < 3)
  1921. return SendClientMessage(playerid, COLOR_HITMAN, "You need to be R3+ to use this.");
  1922. if(money >= 20000) {
  1923. GiveMoney(playerid, -20000);
  1924. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1925. GivePlayerGun(playerid, WEAPON_FLAMETHROWER);
  1926. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a flamethrower for $20,000.");
  1927. } else {
  1928. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1929. }
  1930. }
  1931. case 18: // C4
  1932. {
  1933. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to purchase this.");
  1934. if(money >= 10000) {
  1935. GiveMoney(playerid, -25000);
  1936. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1937. PlayerInfo[playerid][pBombs] += 1;
  1938. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a block of plastic explosive for $10,000.");
  1939. } else {
  1940. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1941. }
  1942. }
  1943. case 19: // Break
  1944. {
  1945. showHitmanDialog(playerid);
  1946. }
  1947. case 20: // Chainsaw
  1948. {
  1949. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to purchase this.");
  1950. if(money >= 5000) {
  1951. GiveMoney(playerid, -5000);
  1952. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1953. GivePlayerGun(playerid, WEAPON_CHAINSAW);
  1954. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a chainsaw for $5,000.");
  1955. } else {
  1956. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1957. }
  1958. }
  1959. case 21: // Knife
  1960. {
  1961. if(money >= 1000) {
  1962. GiveMoney(playerid, -1000);
  1963. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1964. GivePlayerGun(playerid, WEAPON_KNIFE);
  1965. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased a knife for $1,000.");
  1966. } else {
  1967. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1968. }
  1969. }
  1970. case 22: // Break
  1971. {
  1972. showHitmanDialog(playerid);
  1973. }
  1974. case 23: // Tear Gas
  1975. {
  1976. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to purchase this.");
  1977. if(money >= 2500) {
  1978. GiveMoney(playerid, -2500);
  1979. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1980. GivePlayerGun(playerid, WEAPON_TEARGAS);
  1981. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased two canisters of tear gas for $2,500.");
  1982. } else {
  1983. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1984. }
  1985. }
  1986. case 24: // Grenades
  1987. {
  1988. SendClientMessage(playerid, COLOR_GREY, "Grenades have been disabled.");
  1989. /*
  1990. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to purchase this.");
  1991. if(money >= 2500) {
  1992. GiveMoney(playerid, -2500);
  1993. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1994. GivePlayerGun(playerid, WEAPON_GRENADE);
  1995. } else {
  1996. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  1997. }*/
  1998. }
  1999. case 25: // Molotov Cocktail
  2000. {
  2001. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to purchase this.");
  2002. if(money >= 2500) {
  2003. GiveMoney(playerid, -2500);
  2004. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2005. GivePlayerGun(playerid, WEAPON_MOLTOV);
  2006. } else {
  2007. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  2008. }
  2009. }
  2010. case 26: // Break
  2011. {
  2012. showHitmanDialog(playerid);
  2013. }
  2014. case 27: // Health and Armour
  2015. {
  2016. if(money >= 1000) {
  2017. GiveMoney(playerid, -1000);
  2018. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2019. SetPlayerHealth(playerid, 100.0);
  2020. SetPlayerArmour(playerid, 100.0);
  2021. } else {
  2022. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  2023. }
  2024. }
  2025. case 28: // First Aid Kit
  2026. {
  2027. if(money >= 200) {
  2028. GiveMoney(playerid, -200);
  2029. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2030. SetPlayerHealth(playerid, 100.0);
  2031. } else {
  2032. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  2033. }
  2034. }
  2035. case 29: // Half Vest
  2036. {
  2037. if(money >= 500) {
  2038. GiveMoney(playerid, -500);
  2039. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2040. SetPlayerArmour(playerid, 50.0);
  2041. } else {
  2042. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  2043. }
  2044. }
  2045. case 30: // Full Vest
  2046. {
  2047. if(money >= 1000) {
  2048. GiveMoney(playerid, -1000);
  2049. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2050. SetPlayerArmour(playerid, 100.0);
  2051. } else {
  2052. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  2053. }
  2054. }
  2055. case 31: // Break
  2056. {
  2057. showHitmanDialog(playerid);
  2058. }
  2059. case 32: // Jammer
  2060. {
  2061. if(money >= 1000)
  2062. {
  2063. GiveMoney(playerid, -1000);
  2064. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2065. PlayerInfo[playerid][pJammer] += 1;
  2066. SendClientMessage(playerid, COLOR_HITMAN, "* You have purchased a signal jammer for $1,000.");
  2067. }
  2068. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  2069. }
  2070. case 33: // Poison
  2071. {
  2072. if(money >= 5000)
  2073. {
  2074. PlayerInfo[playerid][pPoison] += 1;
  2075. GiveMoney(playerid, -5000);
  2076. SendClientMessage(playerid, COLOR_HITMAN, "You have purchased some cyanide.");
  2077. } else {
  2078. SendClientMessage(playerid, COLOR_HITMAN, "You can't afford that.");
  2079. }
  2080. }
  2081. case 34: // Fake Badge
  2082. {
  2083. if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_HITMAN, "You must be R4+ to use fake badges.");
  2084. new dialogstring[128];
  2085. 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);
  2086. ShowPlayerDialog(playerid, 6493, DIALOG_STYLE_LIST, "Fake Badges", dialogstring, "Choose", "Cancel");
  2087. }
  2088. case 35: // Lock pick
  2089. {
  2090. if(money >= 5000)
  2091. {
  2092. if(PlayerInfo[playerid][pHasLockPick] == 1)
  2093. return SendClientMessage(playerid, COLOR_GREY, "You already have a lock pick kit.");
  2094. GiveMoney(playerid, -5000);
  2095. PlayerInfo[playerid][pHasLockPick] = 1;
  2096. SendClientMessage(playerid, COLOR_HITMAN, "* You have purchased a lock pick kit for $5,000.");
  2097. }
  2098. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  2099. }
  2100. }
  2101. }
  2102. }
  2103. if(dialogid == 9082)
  2104. {
  2105. if(response)
  2106. {
  2107. new money = PlayerInfo[playerid][pCash];
  2108. if(listitem == 0) // Desert Eagle
  2109. {
  2110. if(money >= 500)
  2111. {
  2112. PlayerInfo[playerid][pCash] -= 10000;
  2113. GivePlayerGun(playerid, 24);
  2114. }
  2115. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  2116. }
  2117. if(listitem == 1) // M4
  2118. {
  2119. if(money >= 20000)
  2120. {
  2121. PlayerInfo[playerid][pCash] -= 20000;
  2122. GivePlayerGun(playerid, 31);
  2123. }
  2124. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  2125. }
  2126. if(listitem == 2) // AK47
  2127. {
  2128. if(money >= 20000)
  2129. {
  2130. PlayerInfo[playerid][pCash] -= 20000;
  2131. GivePlayerGun(playerid, 30);
  2132. }
  2133. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  2134. }
  2135. if(listitem == 3) // Sniper Rifle
  2136. {
  2137. if(money >= 50000)
  2138. {
  2139. PlayerInfo[playerid][pCash] -= 50000;
  2140. GivePlayerGun(playerid, 34);
  2141. }
  2142. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  2143. }
  2144. if(listitem == 4) // Health
  2145. {
  2146. SetPlayerHealth(playerid, 100);
  2147. }
  2148. if(listitem == 4) // Armor
  2149. {
  2150. if(money >= 10000)
  2151. {
  2152. PlayerInfo[playerid][pCash] -= 10000;
  2153. SetPlayerArmour(playerid, 100);
  2154. }
  2155. }
  2156. }
  2157. }
  2158. if(dialogid == DIALOG_BAR_DYN)
  2159. {
  2160. if(response)
  2161. {
  2162. new Float:playerHP;
  2163. GetPlayerHealth(playerid, playerHP);
  2164. new string[128];
  2165. if(listitem == 0) //beer
  2166. {
  2167. if(GetPlayerMoney(playerid) > 59)
  2168. {
  2169. if(playerHP >=90)
  2170. {
  2171. SetPlayerHealth(playerid, 100.0);
  2172. }
  2173. else
  2174. {
  2175. SetPlayerHealth(playerid, playerHP + 10.0);
  2176. }
  2177. GivePlayerMoney(playerid, -60);
  2178. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  2179. format(string, sizeof(string), "~r~-$%d", 60);
  2180. GameTextForPlayer(playerid, string, 5000, 1);
  2181. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2182. SendClientMessage(playerid, 0xAFAFAFAA, "Beer purchased.");
  2183. return 1;
  2184. }
  2185. else SendClientMessage(playerid, 0xAFAFAFAA, "Life isn't free, soda too, get 3USD then come back.");
  2186. }
  2187. if(listitem == 1) //vodka
  2188. {
  2189. if(GetPlayerMoney(playerid) > 99)
  2190. {
  2191. if(playerHP >=80)
  2192. {
  2193. SetPlayerHealth(playerid, 100.0);
  2194. }
  2195. else
  2196. {
  2197. SetPlayerHealth(playerid, playerHP + 20.0);
  2198. }
  2199. GivePlayerMoney(playerid, -100);
  2200. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  2201. format(string, sizeof(string), "~r~-$%d", 100);
  2202. GameTextForPlayer(playerid, string, 5000, 1);
  2203. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2204. SendClientMessage(playerid, 0xAFAFAFAA, "Vodka purchased.");
  2205. return 1;
  2206. }
  2207. else SendClientMessage(playerid, 0xAFAFAFAA, "Life isn't free, soda too, get 3USD then come back.");
  2208. }
  2209. if(listitem == 2) //whiskey
  2210. {
  2211. if(GetPlayerMoney(playerid) > 99)
  2212. {
  2213. if(playerHP >=80)
  2214. {
  2215. SetPlayerHealth(playerid, 100.0);
  2216. }
  2217. else
  2218. {
  2219. SetPlayerHealth(playerid, playerHP + 20.0);
  2220. }
  2221. GivePlayerMoney(playerid, -100);
  2222. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  2223. format(string, sizeof(string), "~r~-$%d", 100);
  2224. GameTextForPlayer(playerid, string, 5000, 1);
  2225. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2226. SendClientMessage(playerid, 0xAFAFAFAA, "Whiskey purchased.");
  2227. return 1;
  2228. }
  2229. else SendClientMessage(playerid, 0xAFAFAFAA, "Life isn't free, soda too, get 3USD then come back.");
  2230. }
  2231. if(listitem == 3) //wine
  2232. {
  2233. if(GetPlayerMoney(playerid) > 99)
  2234. {
  2235. if(playerHP >=80)
  2236. {
  2237. SetPlayerHealth(playerid, 100.0);
  2238. }
  2239. else
  2240. {
  2241. SetPlayerHealth(playerid, playerHP + 20.0);
  2242. }
  2243. GivePlayerMoney(playerid, -100);
  2244. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  2245. format(string, sizeof(string), "~r~-$%d", 100);
  2246. GameTextForPlayer(playerid, string, 5000, 1);
  2247. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2248. SendClientMessage(playerid, 0xAFAFAFAA, "Wine purchased.");
  2249. return 1;
  2250. }
  2251. else SendClientMessage(playerid, 0xAFAFAFAA, "Life isn't free, soda too, get 3USD then come back.");
  2252. }
  2253. if(listitem == 4) //soda
  2254. {
  2255. if(GetPlayerMoney(playerid) > 49)
  2256. {
  2257. if(playerHP >=80)
  2258. {
  2259. SetPlayerHealth(playerid, 100.0);
  2260. }
  2261. else
  2262. {
  2263. SetPlayerHealth(playerid, playerHP + 20.0);
  2264. }
  2265. GivePlayerMoney(playerid, -50);
  2266. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  2267. format(string, sizeof(string), "~r~-$%d", 50);
  2268. GameTextForPlayer(playerid, string, 5000, 1);
  2269. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  2270. SendClientMessage(playerid, 0xAFAFAFAA, "Soda purchased.");
  2271. return 1;
  2272. }
  2273. else SendClientMessage(playerid, 0xAFAFAFAA, "Life isn't free, soda too, get 3USD then come back.");
  2274. }
  2275. }
  2276. }
  2277. if(dialogid == DIALOG_REGISTER) //REGISTER
  2278. {
  2279. if(response)
  2280. {
  2281. if(!gamemodeLoaded)
  2282. {
  2283. format(str, sizeof(str), "{FFFFFF}Welcome to {FFFF00}Project Roleplay{FFFFFF}.\n\nPlease register your account by typing the password below:", str);
  2284. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", str, "Register", "Quit");
  2285. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Please wait until the gamemode has finished loading.");
  2286. return 1;
  2287. }
  2288. if(strlen(inputtext) >= 50)
  2289. {
  2290. format(str, sizeof(str), "{FFFFFF}Welcome to {FFFF00}Project Roleplay{FFFFFF}.\n\nPlease register your account by typing the password below:", str);
  2291. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", str, "Register", "Quit");
  2292. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Password is too long.");
  2293. return 1;
  2294. }
  2295. if(!strlen(inputtext))
  2296. {
  2297. format(str, sizeof(str), "{FFFFFF}Welcome to {FFFF00}Project Roleplay{FFFFFF}.\n\nPlease register your account by typing the password below:", str);
  2298. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", str, "Register", "Quit");
  2299. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You must enter a password.");
  2300. return 1;
  2301. }
  2302. if(gPlayerLogged[playerid])
  2303. {
  2304. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You are already logged in.");
  2305. return 1;
  2306. }
  2307. //surname is restricted
  2308. for(new i = 0; i < sizeof(SurnameInfo); i++)
  2309. {
  2310. if(strcmp(SurnameInfo[i][Surname], GetPlayerSurname(playerid)) == 0 && SurnameInfo[i][Taken] == 1)
  2311. {
  2312. new string4[128];
  2313. new pNames[24];
  2314. GetPlayerICName(playerid, pNames, sizeof(pNames));
  2315. format(string4, sizeof(string4), "{FF6347}SERVER: %s is a restricted surname. Please change your surname and come back.", GetPlayerSurname(playerid));
  2316. SendClientMessage(playerid, COLOR_WHITE, string4);
  2317. /*format(string4, sizeof(string4), "SERVER: %s has been kicked, reason: Restricted Surname.", pNames);
  2318. SendClientMessageToAll(COLOR_LIGHTRED, string4);*/
  2319. KickEx(playerid);
  2320. return 1;
  2321. }
  2322. }
  2323. if(!AlphaNumericName(PlayerName(playerid)) && strlen(PlayerName(playerid)) > 4 && strlen(PlayerName(playerid)) <= MAX_PLAYER_NAME)
  2324. {
  2325. SendClientMessage(playerid, COLOR_WHITE, "{FF6347}SERVER: You have been kicked for having a non-rp name, pick a roleplay name (eg. John_Smith).");
  2326. KickEx(playerid);
  2327. return 1;
  2328. }
  2329. new tmppass[64];
  2330. strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
  2331. OnPlayerRegister(playerid, tmppass);
  2332. }
  2333. else
  2334. {
  2335. SendClientMessage(playerid, COLOR_RED, "You chose to leave the server.");
  2336. KickEx(playerid);
  2337. }
  2338. return 1;
  2339. }
  2340. // Doors
  2341. if(dialogid == DIALOG_EDITDOOR_MAIN)
  2342. {
  2343. if(!response) return 1;
  2344. else
  2345. {
  2346. if(listitem == 0)
  2347. {
  2348. new unusedid = -1;
  2349. for(new i = 0; i < sizeof(Entrances); i++)
  2350. {
  2351. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[i][outside_x], Entrances[i][outside_y], Entrances[i][outside_z]);
  2352. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2353. {
  2354. unusedid = i;
  2355. break;
  2356. }
  2357. }
  2358. if(unusedid == -1) return SendClientMessage(playerid, COLOR_GRAD1, "All of the door ID's are already in use.");
  2359. new longstring[256];
  2360. 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);
  2361. ShowPlayerDialog(playerid,
  2362. DIALOG_EDITDOOR_CREATE,
  2363. DIALOG_STYLE_INPUT,
  2364. "Edit Door - Create Door",
  2365. longstring,
  2366. "Create",
  2367. "Cancel");
  2368. return 1;
  2369. }
  2370. else if(listitem == 1)
  2371. {
  2372. ShowPlayerDialog(playerid,
  2373. DIALOG_EDITDOOR_NAME1,
  2374. DIALOG_STYLE_INPUT,
  2375. "Edit Door - Change Name Step 1",
  2376. "Please enter the ID of the door you would like to change the name of.\n",
  2377. "Done",
  2378. "Cancel");
  2379. return 1;
  2380. }
  2381. else if(listitem == 2)
  2382. {
  2383. ShowPlayerDialog(playerid,
  2384. DIALOG_EDITDOOR_EPOS,
  2385. DIALOG_STYLE_INPUT,
  2386. "Edit Door - Change Entrance Position Step 1",
  2387. "Please enter the door ID you would like to change the entrance position of.\n",
  2388. "Done",
  2389. "Cancel");
  2390. return 1;
  2391. }
  2392. else if(listitem == 3)
  2393. {
  2394. ShowPlayerDialog(playerid,
  2395. DIALOG_EDITDOOR_IPOS,
  2396. DIALOG_STYLE_INPUT,
  2397. "Edit Door - Change Interior Position Step 1",
  2398. "Please enter the door ID you would like to change the interior position of.\n",
  2399. "Done",
  2400. "Cancel");
  2401. return 1;
  2402. }
  2403. else if(listitem == 4)
  2404. {
  2405. ShowPlayerDialog(playerid,
  2406. DIALOG_EDITDOOR_ICON1,
  2407. DIALOG_STYLE_INPUT,
  2408. "Edit Door - Change Icon Step 1",
  2409. "Please enter the door ID you would like to change the icon of.\n",
  2410. "Done",
  2411. "Cancel");
  2412. return 1;
  2413. }
  2414. else if(listitem == 5)
  2415. {
  2416. ShowPlayerDialog(playerid,
  2417. DIALOG_EDITDOOR_PASS1,
  2418. DIALOG_STYLE_INPUT,
  2419. "Edit Door - Change Password Step 1",
  2420. "Please enter the door ID you would like to change the password on.\n",
  2421. "Done",
  2422. "Cancel");
  2423. return 1;
  2424. }
  2425. else if(listitem == 6)
  2426. {
  2427. ShowPlayerDialog(playerid,
  2428. DIALOG_EDITDOOR_FREEZE,
  2429. DIALOG_STYLE_INPUT,
  2430. "Edit Door - Freeze On Enter/Exit",
  2431. "Please enter the door ID you would like to toggle the freezing on.\n",
  2432. "Done",
  2433. "Cancel");
  2434. return 1;
  2435. }
  2436. else if(listitem == 7)
  2437. {
  2438. ShowPlayerDialog(playerid,
  2439. DIALOG_EDITDOOR_OWNER1,
  2440. DIALOG_STYLE_INPUT,
  2441. "Edit Door - Owner",
  2442. "Please enter the ID of the door you want to change the owner for.\n",
  2443. "Done",
  2444. "Cancel");
  2445. return 1;
  2446. }
  2447. else if(listitem == 8)
  2448. {
  2449. ShowPlayerDialog(playerid,
  2450. DIALOG_EDITDOOR_REM1,
  2451. DIALOG_STYLE_INPUT,
  2452. "Edit Door - Remove Door Step 1",
  2453. "Please enter the door ID you would like to remove.\n",
  2454. "Done",
  2455. "Cancel");
  2456. return 1;
  2457. }
  2458. return 1;
  2459. }
  2460. }
  2461. if(dialogid == DIALOG_EDITDOOR_CREATE)
  2462. {
  2463. 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.");
  2464. if(!response) return 1;
  2465. else
  2466. {
  2467. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2468. new ident = strval(inputtext);
  2469. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2470. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2471. if(strcmp(str, "0.00,0.00,0.00", true) != 0)
  2472. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID is already in use.");
  2473. new Float:dpX, Float:dpY, Float:dpZ, Float:dpA;
  2474. GetPlayerPos(playerid, dpX, dpY, dpZ);
  2475. GetPlayerFacingAngle(playerid, dpA);
  2476. new intid = GetPlayerInterior(playerid);
  2477. new worldid = GetPlayerVirtualWorld(playerid);
  2478. Entrances[ident][outside_x] = dpX;
  2479. Entrances[ident][outside_y] = dpY;
  2480. Entrances[ident][outside_z] = dpZ;
  2481. Entrances[ident][outside_a] = dpA;
  2482. Entrances[ident][outside_i] = intid;
  2483. Entrances[ident][outside_w] = worldid;
  2484. strdel(Entrances[ident][createdby], 0, 50);
  2485. format(str, sizeof(str), "%s", PlayerICName(playerid));
  2486. strins(Entrances[ident][createdby], str, 0);
  2487. if( Entrances[ident][outside_icon] == 0 ) {
  2488. EntranceRef[ident] = CreateDynamicPickup(19198, 23, Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]+0.4, Entrances[ident][outside_w]);
  2489. EntranceRefInt[ident] = CreateDynamicPickup(19198, 23, Entrances[ident][inside_x], Entrances[ident][inside_y], Entrances[ident][inside_z]+0.4, Entrances[ident][inside_w]);
  2490. } else {
  2491. EntranceRef[ident] = CreateDynamicPickup(19198, 23, Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z], Entrances[ident][outside_w]);
  2492. EntranceRefInt[ident] = CreateDynamicPickup(19198, 23, Entrances[ident][inside_x], Entrances[ident][inside_y], Entrances[ident][inside_z], Entrances[ident][inside_w]);
  2493. }
  2494. new doornametext[128];
  2495. format(doornametext, sizeof(doornametext), "{43527D}%s{FFFFFF}\n\nType /enter to go inside.", Entrances[ident][doorname]);
  2496. 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]);
  2497. format(str, sizeof(str), "You have created door id %d.", ident);
  2498. SendClientMessage(playerid, COLOR_GRAD1, str);
  2499. format(str, sizeof(str), "%s has created door ID %d.", PlayerName(playerid), ident);
  2500. printf(str);
  2501. }
  2502. return 1;
  2503. }
  2504. if(dialogid == DIALOG_GAMBLE_1)
  2505. {
  2506. if(response)
  2507. {
  2508. new string[450];
  2509. if(listitem == 0)
  2510. {
  2511. format(string, sizeof(string), "Current President: Jennifer Blake\nJobs\nFactions\nFamilies");
  2512. ShowPlayerDialog(playerid, DIALOG_GAMBLE_1, DIALOG_STYLE_LIST, "Computer", string, "Select", "Close");
  2513. return 1;
  2514. }
  2515. if(listitem == 1)
  2516. {
  2517. 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");
  2518. return 1;
  2519. }
  2520. if(listitem == 2)
  2521. {
  2522. new count[MAX_FACTIONS] = 0, facStr[1024];
  2523. foreach(new i:Player) {
  2524. new playerFac = PlayerInfo[i][pMember];
  2525. if(playerFac != 0 && playerFac < sizeof(count))
  2526. count[playerFac]++;
  2527. }
  2528. format(facStr, sizeof(facStr), "{FFFFFF}San Andreas Police Department ({FF0000}%i{FFFFFF})", count[FACTION_SAPD]);
  2529. format(facStr, sizeof(facStr), "%s\n{FFFFFF}Federal Bureau of Investigtion ({FF0000}%i{FFFFFF})", facStr, count[FACTION_FBI]);
  2530. format(facStr, sizeof(facStr), "%s\n{FFFFFF}San Andreas Fire & Medical Dept. ({FF0000}%i{FFFFFF})", facStr, count[FACTION_FMD]);
  2531. format(facStr, sizeof(facStr), "%s\n{FFFFFF}Government ({FF0000}%i{FFFFFF})", facStr, count[FACTION_GOV]);
  2532. format(facStr, sizeof(facStr), "%s\n{FFFFFF}San Andreas Network ({FF0000}%i{FFFFFF})", facStr, count[FACTION_NEWS]);
  2533. format(facStr, sizeof(facStr), "%s\n{FFFFFF}Judicial Department ({FF0000}%i{FFFFFF})", facStr, count[FACTION_JD]);
  2534. format(facStr, sizeof(facStr), "%s\n{FFFFFF}San Andreas National Guard ({FF0000}%i{FFFFFF})", facStr, count[FACTION_SANG]);
  2535. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Factions", facStr, "Close", "");
  2536. for(new i = 0; i < 12; i++)count[i] = 0;
  2537. return 1;
  2538. }
  2539. if(listitem == 3)
  2540. {
  2541. if(PlayerInfo[playerid][pMember] < 1 && PlayerInfo[playerid][pGroup] < 10)
  2542. {
  2543. new famstr[2048];
  2544. for(new i = 0; i < sizeof(FamilyInfo); i++)
  2545. {
  2546. format(famstr, sizeof(famstr), "%s\n%d\t%s", famstr, i +1, FamilyInfo[i][FamilyName]);
  2547. }
  2548. ShowPlayerDialog(playerid, FAMILY_DIALOG, DIALOG_STYLE_LIST, "Families", famstr, "Ok", "Cancel");
  2549. format(str, sizeof(str), "* %s logs into deep web and checks list of current gangs.", PlayerICName(playerid));
  2550. SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 20.0, 15000);
  2551. format(str, sizeof(str), "%s logs into deep web and checks list of current gangs", PlayerICName(playerid));
  2552. SendClientMessage(playerid, COLOR_PURPLE, str);
  2553. }
  2554. else if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pGroup] == 10)
  2555. {
  2556. SendClientMessage(playerid, COLOR_GREY, "You tried to log into deep web and check all available gangs, but failed, your face is pictured!");
  2557. }
  2558. return 1;
  2559. }
  2560. }
  2561. return 1;
  2562. }
  2563. if(dialogid == DIALOG_EDITDOOR_NAME1)
  2564. {
  2565. 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.");
  2566. if(!response) return 1;
  2567. else
  2568. {
  2569. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2570. new ident = strval(inputtext);
  2571. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2572. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2573. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2574. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2575. SetPVarInt(playerid, "door_editing_name", ident);
  2576. ShowPlayerDialog(playerid,
  2577. DIALOG_EDITDOOR_NAME2,
  2578. DIALOG_STYLE_INPUT,
  2579. "Edit Door - Change Name Step 2",
  2580. "Please enter the new name for the door.",
  2581. "Done",
  2582. "Cancel");
  2583. }
  2584. return 1;
  2585. }
  2586. if(dialogid == DIALOG_EDITDOOR_NAME2)
  2587. {
  2588. 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.");
  2589. new ident = GetPVarInt(playerid, "door_editing_name");
  2590. if(ident < 0 || ident > MAX_DOORS) return 1;
  2591. if(!response) return 1;
  2592. else
  2593. {
  2594. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2595. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2596. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2597. if(strlen(inputtext) > 50) return SendClientMessage(playerid, COLOR_GRAD1, "Name can not be longer than 50 characters!");
  2598. strdel(Entrances[ident][doorname], 0, 50);
  2599. strins(Entrances[ident][doorname], inputtext, 0);
  2600. format(str, sizeof(str), "{43527D}%s{FFFFFF}\n\nType /enter to go inside.", Entrances[ident][doorname]);
  2601. UpdateDynamic3DTextLabelText(EntranceRefText[ident], COLOR_ENTRANCE, str);
  2602. format(str, sizeof(str), "You have edited door id %d's name to \"%s\".", ident, Entrances[ident][doorname]);
  2603. SendClientMessage(playerid, COLOR_GRAD1, str);
  2604. SetPVarInt(playerid, "door_editing_name", -1);
  2605. format(str, sizeof(str), "%s has changed the name of door ID %d.", PlayerName(playerid), ident);
  2606. printf(str);
  2607. }
  2608. return 1;
  2609. }
  2610. if(dialogid == DIALOG_EDITDOOR_EPOS)
  2611. {
  2612. 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.");
  2613. if(!response) return 1;
  2614. else
  2615. {
  2616. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2617. new ident = strval(inputtext);
  2618. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2619. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2620. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2621. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2622. SetPVarInt(playerid, "door_editing_id", ident);
  2623. SetPVarInt(playerid, "door_editing_type", 1);
  2624. SendClientMessage(playerid, COLOR_YELLOW, "You can now do /ddone in the position you want to move this door.");
  2625. }
  2626. return 1;
  2627. }
  2628. if(dialogid == DIALOG_EDITDOOR_IPOS)
  2629. {
  2630. 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.");
  2631. if(!response) return 1;
  2632. else
  2633. {
  2634. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2635. new ident = strval(inputtext);
  2636. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2637. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2638. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2639. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2640. SetPVarInt(playerid, "door_editing_id", ident);
  2641. SetPVarInt(playerid, "door_editing_type", 2);
  2642. SendClientMessage(playerid, COLOR_YELLOW, "You can now do /ddone in the position you want to move this door's interior.");
  2643. }
  2644. return 1;
  2645. }
  2646. if(dialogid == DIALOG_EDITDOOR_ICON1)
  2647. {
  2648. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2649. if(!response) return SetPVarInt(playerid, "door_editing_icon", -1);
  2650. else
  2651. {
  2652. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2653. new ident = strval(inputtext);
  2654. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2655. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2656. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2657. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2658. SetPVarInt(playerid, "door_editing_icon", ident);
  2659. ShowPlayerDialog(playerid,
  2660. DIALOG_EDITDOOR_ICON2,
  2661. DIALOG_STYLE_LIST,
  2662. "Edit Door - Change Icon Step 2",
  2663. "Entrance (\"i\" icon)\nInformation\nArrow #2\nArrow #3\nArrow #4\nArrow #5\nEnter/Exit Marker",
  2664. "Done",
  2665. "Cancel");
  2666. }
  2667. return 1;
  2668. }
  2669. if(dialogid == DIALOG_EDITDOOR_ICON2)
  2670. {
  2671. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2672. if(!response) return SetPVarInt(playerid, "door_editing_icon", -1);
  2673. else
  2674. {
  2675. new did = GetPVarInt(playerid, "door_editing_icon");
  2676. if(did < 1) return SetPVarInt(playerid, "door_editing_icon", -1);
  2677. if(did > MAX_DOORS || did < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2678. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z]);
  2679. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2680. return SetPVarInt(playerid, "door_editing_icon", -1);
  2681. Entrances[did][outside_icon] = listitem;
  2682. new actualpickupid = 0;
  2683. if(Entrances[did][outside_icon] == 0) actualpickupid = 19198;
  2684. else if(Entrances[did][outside_icon] == 1) actualpickupid = 1239;
  2685. else if(Entrances[did][outside_icon] == 2) actualpickupid = 19131;
  2686. else if(Entrances[did][outside_icon] == 3) actualpickupid = 19132;
  2687. else if(Entrances[did][outside_icon] == 4) actualpickupid = 19133;
  2688. else if(Entrances[did][outside_icon] == 5) actualpickupid = 19134;
  2689. else if(Entrances[did][outside_icon] == 6) actualpickupid = 19135;
  2690. if(EntranceRef[did]) DestroyDynamicPickup(EntranceRef[did]);
  2691. if(EntranceRefInt[did]) DestroyDynamicPickup(EntranceRefInt[did]);
  2692. if(EntranceRefText[did]) DestroyDynamic3DTextLabel(EntranceRefText[did]);
  2693. if( Entrances[did][outside_icon] == 0 ) {
  2694. EntranceRef[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z]+0.4, Entrances[did][outside_w]);
  2695. EntranceRefInt[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][inside_x], Entrances[did][inside_y], Entrances[did][inside_z]+0.4, Entrances[did][inside_w]);
  2696. } else {
  2697. EntranceRef[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z], Entrances[did][outside_w]);
  2698. EntranceRefInt[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][inside_x], Entrances[did][inside_y], Entrances[did][inside_z], Entrances[did][inside_w]);
  2699. }
  2700. new doornametext[128];
  2701. format(doornametext, sizeof(doornametext), "{43527D}%s{FFFFFF}\n\nType /enter to go inside.", Entrances[did][doorname]);
  2702. 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]);
  2703. SaveEntrances();
  2704. SendClientMessage(playerid, COLOR_YELLOW, "You have updated that door's icon.");
  2705. format(str, sizeof(str), "%s has edited the icon of door ID %d.", PlayerName(playerid), did);
  2706. printf(str);
  2707. }
  2708. return 1;
  2709. }
  2710. if(dialogid == DIALOG_EDITDOOR_PASS1)
  2711. {
  2712. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2713. if(!response) return SetPVarInt(playerid, "door_editing_pass", -1);
  2714. else
  2715. {
  2716. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2717. new ident = strval(inputtext);
  2718. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2719. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2720. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2721. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2722. SetPVarInt(playerid, "door_editing_pass", ident);
  2723. ShowPlayerDialog(playerid,
  2724. DIALOG_EDITDOOR_PASS2,
  2725. DIALOG_STYLE_INPUT,
  2726. "Edit Door - Change Password Step 2",
  2727. "Please enter the new password for the door, just enter \"none\" to remove the password.",
  2728. "Change",
  2729. "Cancel");
  2730. }
  2731. return 1;
  2732. }
  2733. if(dialogid == DIALOG_EDITDOOR_PASS2)
  2734. {
  2735. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2736. if(!response) return SetPVarInt(playerid, "door_editing_pass", -1);
  2737. else
  2738. {
  2739. new did = GetPVarInt(playerid, "door_editing_pass");
  2740. if(did > MAX_DOORS || did < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2741. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z]);
  2742. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2743. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2744. if(strlen(inputtext) > 50) return SendClientMessage(playerid, COLOR_GRAD1, "That password is too long! Must be under 50 characters!");
  2745. strdel(Entrances[did][dpassword], 0, 128);
  2746. if(strcmp(inputtext, "none", true) != 0)
  2747. strins(Entrances[did][dpassword], inputtext, 0);
  2748. if(strcmp(inputtext, "none", true) != 0)
  2749. format(str, sizeof(str), "You have changed door %d's password to %s.", did, inputtext);
  2750. else
  2751. format(str, sizeof(str), "You have removed door %d's password.", did);
  2752. SendClientMessage(playerid, COLOR_GRAD1, str);
  2753. SetPVarInt(playerid, "door_editing_pass", -1);
  2754. format(str, sizeof(str), "%s has updated the password of door ID %d.", PlayerName(playerid), did);
  2755. printf(str);
  2756. }
  2757. return 1;
  2758. }
  2759. if(dialogid == DIALOG_EDITDOOR_FREEZE)
  2760. {
  2761. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2762. if(!response) return 1;
  2763. else
  2764. {
  2765. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2766. new ident = strval(inputtext);
  2767. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2768. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2769. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2770. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2771. Entrances[ident][freeze] = !Entrances[ident][freeze]; // Toggle, works in C++ not sure about PAWN.
  2772. if(Entrances[ident][freeze])
  2773. format(str, sizeof(str), "Players are now frozen when they enter or exit this door.");
  2774. else
  2775. format(str, sizeof(str), "Players are now NOT frozen when they enter or exit this door.");
  2776. SendClientMessage(playerid, COLOR_YELLOW, str);
  2777. format(str, sizeof(str), "%s has updated the freeze option of door ID %d.", PlayerName(playerid), ident);
  2778. printf(str);
  2779. }
  2780. return 1;
  2781. }
  2782. if( dialogid == DIALOG_EDITDOOR_OWNER1 ) {
  2783. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2784. if(!response) return SetPVarInt(playerid, "door_editing_owner", -1);
  2785. else
  2786. {
  2787. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2788. new ident = strval(inputtext);
  2789. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2790. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2791. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2792. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2793. SetPVarInt(playerid, "door_editing_owner", ident);
  2794. ShowPlayerDialog(playerid,
  2795. DIALOG_EDITDOOR_OWNER2,
  2796. DIALOG_STYLE_INPUT,
  2797. "Edit Door - Change Owner Step 2",
  2798. "Please enter the owner's SQL ID (/nametosql) \"0\" to remove the owner.",
  2799. "Change",
  2800. "Cancel");
  2801. }
  2802. return 1;
  2803. }
  2804. if( dialogid == DIALOG_EDITDOOR_OWNER2 ) {
  2805. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2806. if(!response) return SetPVarInt(playerid, "door_editing_owner", -1);
  2807. else
  2808. {
  2809. new did = GetPVarInt(playerid, "door_editing_owner");
  2810. if(did > MAX_DOORS || did < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2811. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z]);
  2812. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2813. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2814. new ownerID = strval( inputtext );
  2815. if( !IsNumeric( inputtext ) || ownerID < 0 ) {
  2816. return SendClientMessage( playerid, COLOR_GREY, "You must enter some positive integer, as owner SQL IDs are represented as numbers." );
  2817. }
  2818. Entrances[did][eowner] = ownerID;
  2819. SetPVarInt(playerid, "door_editing_owner", -1);
  2820. if(Entrances[did][eowner])
  2821. format(str, sizeof(str), "This door now has an owner.");
  2822. else
  2823. format(str, sizeof(str), "This door no longer has a set owner.");
  2824. SendClientMessage(playerid, COLOR_YELLOW, str);
  2825. format(str, sizeof(str), "%s has updated the owner option of door ID %d to owner SQL: %d", PlayerName(playerid), ownerID);
  2826. printf(str);
  2827. }
  2828. return 1;
  2829. }
  2830. if(dialogid == DIALOG_EDITDOOR_REM1)
  2831. {
  2832. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2833. if(!response) return SetPVarInt(playerid, "door_editing_remove", -1);
  2834. else
  2835. {
  2836. if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2837. new ident = strval(inputtext);
  2838. if(ident > MAX_DOORS || ident < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2839. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[ident][outside_x], Entrances[ident][outside_y], Entrances[ident][outside_z]);
  2840. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2841. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2842. SetPVarInt(playerid, "door_editing_remove", ident);
  2843. ShowPlayerDialog(playerid,
  2844. DIALOG_EDITDOOR_REM2,
  2845. DIALOG_STYLE_MSGBOX,
  2846. "Edit Door - Remove Door Step 2",
  2847. "Are you sure you want to delete this door?",
  2848. "Yes",
  2849. "No");
  2850. }
  2851. return 1;
  2852. }
  2853. if(dialogid == DIALOG_EDITDOOR_REM2)
  2854. {
  2855. if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pBizMod] < 1) return 1;
  2856. if(!response) return SetPVarInt(playerid, "door_editing_remove", -1);
  2857. else
  2858. {
  2859. new did = GetPVarInt(playerid, "door_editing_remove");
  2860. if(did > MAX_DOORS || did < 0) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid door ID.");
  2861. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z]);
  2862. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  2863. return SendClientMessage(playerid, COLOR_GRAD1, "That door ID doesn't exist.");
  2864. Entrances[did][outside_icon] = 0;
  2865. Entrances[did][outside_x] = 0.00;
  2866. Entrances[did][outside_y] = 0.00;
  2867. Entrances[did][outside_z] = 0.00;
  2868. Entrances[did][outside_a] = 0.00;
  2869. Entrances[did][outside_i] = 0;
  2870. Entrances[did][outside_w] = 0;
  2871. Entrances[did][inside_x] = 0.00;
  2872. Entrances[did][inside_y] = 0.00;
  2873. Entrances[did][inside_z] = 0.00;
  2874. Entrances[did][inside_a] = 0.00;
  2875. Entrances[did][inside_i] = 0;
  2876. Entrances[did][inside_w] = 0;
  2877. strdel(Entrances[did][doorname], 0, 50);
  2878. strdel(Entrances[did][createdby], 0, 50);
  2879. if(EntranceRef[did]) DestroyDynamicPickup(EntranceRef[did]);
  2880. if(EntranceRefInt[did]) DestroyDynamicPickup(EntranceRefInt[did]);
  2881. if(EntranceRefText[did]) DestroyDynamic3DTextLabel(EntranceRefText[did]);
  2882. EntranceRef[did] = 0;
  2883. EntranceRefInt[did] = 0;
  2884. EntranceRefText[did] = Text3D:INVALID_3DTEXT_ID;
  2885. format(str, sizeof(str), "You have removed door id %d.", did);
  2886. SendClientMessage(playerid, COLOR_GRAD1, str);
  2887. SetPVarInt(playerid, "door_editing_remove", -1);
  2888. format(str, sizeof(str), "%s has removed door ID %d.", PlayerName(playerid), did);
  2889. printf(str);
  2890. }
  2891. return 1;
  2892. }
  2893. if(dialogid == DIALOG_ID_PLAYER_PASS)
  2894. {
  2895. if(!response) return 1;
  2896. else
  2897. {
  2898. for(new i = 0; i < sizeof(EntranceRef); i++)
  2899. {
  2900. if(
  2901. IsPlayerInRangeOfPoint(playerid, 2, Entrances[i][outside_x], Entrances[i][outside_y], Entrances[i][outside_z]) &&
  2902. GetPlayerVirtualWorld(playerid) == Entrances[i][outside_w] &&
  2903. GetPlayerInterior(playerid) == Entrances[i][outside_i])
  2904. {
  2905. if(!strlen(Entrances[i][dpassword])) // the door they're at has no password. wtf
  2906. return 1;
  2907. if(strcmp(Entrances[i][dpassword], inputtext) != 0 || strlen(inputtext) == 0)
  2908. return SendClientMessage(playerid, COLOR_GRAD1, "Incorrect password... Access Denied.");
  2909. SendClientMessage(playerid, COLOR_GREEN, "Access granted.");
  2910. SetPlayerPos(playerid, Entrances[i][inside_x], Entrances[i][inside_y], Entrances[i][inside_z]);
  2911. SetPlayerFacingAngle(playerid, Entrances[i][inside_a]);
  2912. SetPlayerInterior(playerid, Entrances[i][inside_i]);
  2913. SetPlayerVirtualWorld(playerid, Entrances[i][inside_w]);
  2914. SetCameraBehindPlayer(playerid);
  2915. if(Entrances[i][freeze])
  2916. {
  2917. Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
  2918. }
  2919. return 1;
  2920. }
  2921. }
  2922. }
  2923. return 1;
  2924. }
  2925. if(dialogid == DIALOG_INTERIOR_MENU)
  2926. {
  2927. if(response)
  2928. {
  2929. new arrayid = listitem, tpstr[128];
  2930. SetPlayerPos(playerid, InteriorDialogData[arrayid][0], InteriorDialogData[arrayid][1], InteriorDialogData[arrayid][2]);
  2931. SetPlayerInterior(playerid, InteriorDialogInteriors[arrayid][0]);
  2932. SetPlayerFacingAngle(playerid, InteriorDialogData[arrayid][3]);
  2933. format(tpstr, sizeof(tpstr), "* You have been teleported to interior %s.", InteriorDialogNames[arrayid][0]);
  2934. SendClientMessage(playerid, COLOR_LIGHTBLUE, tpstr);
  2935. }
  2936. return 1;
  2937. }
  2938. //dealerships
  2939. if(dialogid == 24325)
  2940. {
  2941. if(!response)
  2942. {
  2943. for(new i = 0; i < MAX_DEALERS; i++)
  2944. {
  2945. format(str, sizeof(str), "dealerlist_%d", i);
  2946. DeletePVar(playerid, str);
  2947. }
  2948. return 1;
  2949. }
  2950. else
  2951. {
  2952. format(str, sizeof(str), "dealerlist_%d", listitem);
  2953. new i = GetPVarInt(playerid, str);
  2954. SetPlayerCheckpointEx(playerid, Dealerships[i][dPos][0], Dealerships[i][dPos][1], Dealerships[i][dPos][2], 5.0);
  2955. CP[playerid] = CHECKPOINT_SHOWDEALERSHIP;
  2956. format(str, sizeof(str), "%s has been marked on your map (red marker).", Dealerships[i][dName]);
  2957. SendClientMessage(playerid, COLOR_YELLOW, str);
  2958. }
  2959. return 1;
  2960. }
  2961. if(dialogid == 12513)
  2962. {
  2963. if(response)
  2964. {
  2965. if(PhoneOffline[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Your cellphone is currently turned off, use /togphone.");
  2966. if(PlayerInfo[playerid][pCash] < 25) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to make a call. ($25)");
  2967. if(CheckForJammer(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Phone signal has been jammed.");
  2968. if( PlayerInfo[playerid][pAdminJailed] || PlayerInfo[playerid][pJailed]) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't use this whilst you're in prison.");
  2969. 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.");
  2970. if(strlen(inputtext))
  2971. {
  2972. if(IsNumeric(inputtext))
  2973. {
  2974. do_call(playerid, strval(inputtext));
  2975. }
  2976. }
  2977. }
  2978. }
  2979. if(dialogid == 12460)
  2980. {
  2981. if(!response)
  2982. {
  2983. pModelState[playerid] = 999;
  2984. DeletePVar(playerid, "buyingdealer");
  2985. return 1;
  2986. }
  2987. else
  2988. {
  2989. new d = GetPVarInt(playerid, "buyingdealer");
  2990. if(Dealerships[d][dCreated] == false)
  2991. {
  2992. pModelState[playerid] = 999;
  2993. DeletePVar(playerid, "buyingdealer");
  2994. return 1;
  2995. }
  2996. if(Dealerships[d][dCars][listitem] >= 400)
  2997. {
  2998. PlayerTextDrawDestroy(playerid, pModel_t[playerid]);
  2999. pModelState[playerid] = 999;
  3000. pModel_t[playerid] = CreatePlayerTextDraw(playerid, 228.0, 200.0, "_");
  3001. PlayerTextDrawFont(playerid, pModel_t[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
  3002. PlayerTextDrawTextSize(playerid, pModel_t[playerid], 200.0, 200.0);
  3003. PlayerTextDrawSetPreviewModel(playerid, pModel_t[playerid], Dealerships[d][dCars][listitem]);
  3004. PlayerTextDrawSetPreviewRot(playerid, pModel_t[playerid], -16.0, 0.0, -55.0);
  3005. PlayerTextDrawUseBox(playerid, pModel_t[playerid], 0);
  3006. PlayerTextDrawBackgroundColor(playerid, pModel_t[playerid], 0x00000000);
  3007. PlayerTextDrawShow(playerid, pModel_t[playerid]);
  3008. pModelState[playerid] = 3;
  3009. pModelRot[playerid][0] = 0;
  3010. pModelRot[playerid][1] = 0;
  3011. pModelRot[playerid][2] = 0;
  3012. pModelTimer[playerid] = SetTimerEx("UpdatePreviewModel", 1000, 1, "i", playerid);
  3013. 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]);
  3014. ShowPlayerDialog(playerid, 12461, DIALOG_STYLE_MSGBOX, "Confirm Purchase", str, "Purchase", "Cancel");
  3015. SetPVarInt(playerid, "buyingcarid", listitem);
  3016. }
  3017. }
  3018. return 1;
  3019. }
  3020. if(dialogid == 12461)
  3021. {
  3022. PlayerTextDrawDestroy(playerid, pModel_t[playerid]);
  3023. pModelState[playerid] = 999;
  3024. if(!response)
  3025. {
  3026. DeletePVar(playerid, "buyingdealer");
  3027. DeletePVar(playerid, "buyingcarid");
  3028. return 1;
  3029. }
  3030. else
  3031. {
  3032. new d = GetPVarInt(playerid, "buyingdealer");
  3033. if(Dealerships[d][dCreated] == false)
  3034. {
  3035. DeletePVar(playerid, "buyingdealer");
  3036. DeletePVar(playerid, "buyingcarid");
  3037. return 1;
  3038. }
  3039. new cid = GetPVarInt(playerid, "buyingcarid");
  3040. new model = Dealerships[d][dCars][cid];
  3041. if(model < 400 || model > 600)
  3042. {
  3043. DeletePVar(playerid, "buyingdealer");
  3044. DeletePVar(playerid, "buyingcarid");
  3045. return 1;
  3046. }
  3047. new price = Dealerships[d][dCarPrice][cid];
  3048. if(price < 1)
  3049. {
  3050. DeletePVar(playerid, "buyingdealer");
  3051. DeletePVar(playerid, "buyingcarid");
  3052. return 1;
  3053. }
  3054. if(GetMoney(playerid) < price)
  3055. {
  3056. DeletePVar(playerid, "buyingdealer");
  3057. DeletePVar(playerid, "buyingcarid");
  3058. SendClientMessage(playerid, COLOR_GRAD1, "You can not afford that.");
  3059. return 1;
  3060. }
  3061. new slot = GetPlayerFreeCarslot( playerid );
  3062. GiveMoney(playerid, -price);
  3063. createPlayerVehicle(playerid, slot, model, Dealerships[d][dPos][3], Dealerships[d][dPos][4], Dealerships[d][dPos][5], Dealerships[d][dPos][6]);
  3064. if( playerSpawnedVehicle[playerid] > -1 ) {
  3065. destroyPlayerVehicle( playerid, playerSpawnedVehicle[playerid] );
  3066. }
  3067. spawnPlayerVehicle( playerid, slot );
  3068. 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]);
  3069. SendClientMessage(playerid, COLOR_YELLOW, str);
  3070. }
  3071. return 1;
  3072. }
  3073. if(dialogid == 12400) // ID is dedit
  3074. {
  3075. if(!response)
  3076. {
  3077. DeletePVar(playerid, "edittingdealer");
  3078. return 1;
  3079. }
  3080. if(listitem == 0)
  3081. {
  3082. new d = GetPVarInt(playerid, "edittingdealer");
  3083. if(Dealerships[d][dCreated] == false)
  3084. {
  3085. DeletePVar(playerid, "edittingdealer");
  3086. return 1;
  3087. }
  3088. ShowPlayerDialog(playerid, 12410, DIALOG_STYLE_INPUT, "Change Dealership Name", "Enter a new name for the dealership.", "Done", "Cancel");
  3089. }
  3090. else if(listitem == 1)
  3091. {
  3092. new d = GetPVarInt(playerid, "edittingdealer");
  3093. if(Dealerships[d][dCreated] == false)
  3094. {
  3095. DeletePVar(playerid, "edittingdealer");
  3096. return 1;
  3097. }
  3098. new carsstring[1024];
  3099. format(carsstring, sizeof(carsstring), "Add Car\n");
  3100. for(new i = 0; i < 64; i++)
  3101. {
  3102. if(Dealerships[d][dCars][i] >= 400)
  3103. {
  3104. format(carsstring, sizeof(carsstring), "%s%d. %s ($%d)\n", carsstring, i, GetVehicleFriendlyNameFromModel(Dealerships[d][dCars][i]), Dealerships[d][dCarPrice][i]);
  3105. }
  3106. }
  3107. ShowPlayerDialog(playerid, 12420, DIALOG_STYLE_LIST, "Manage Dealership Cars", carsstring, "Select", "Cancel");
  3108. }
  3109. else if(listitem == 2)
  3110. {
  3111. new d = GetPVarInt(playerid, "edittingdealer");
  3112. if(Dealerships[d][dCreated] == false)
  3113. {
  3114. DeletePVar(playerid, "edittingdealer");
  3115. return 1;
  3116. }
  3117. SetPVarInt(playerid, "movedealerid", d);
  3118. SetPVarInt(playerid, "movingdealerid", 1);
  3119. SendClientMessage(playerid, COLOR_YELLOW, "Use /ddone in the new position to update the position.");
  3120. }
  3121. else if(listitem == 3)
  3122. {
  3123. new d = GetPVarInt(playerid, "edittingdealer");
  3124. if(Dealerships[d][dCreated] == false)
  3125. {
  3126. DeletePVar(playerid, "edittingdealer");
  3127. return 1;
  3128. }
  3129. SetPVarInt(playerid, "movedealerid", d);
  3130. SetPVarInt(playerid, "movingdealerid", 2);
  3131. SendClientMessage(playerid, COLOR_YELLOW, "Use /ddone in the new position to update the vehicle spawning position.");
  3132. }
  3133. else if(listitem == 4)
  3134. {
  3135. new d = GetPVarInt(playerid, "edittingdealer");
  3136. if(Dealerships[d][dCreated] == false)
  3137. {
  3138. DeletePVar(playerid, "edittingdealer");
  3139. return 1;
  3140. }
  3141. 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");
  3142. }
  3143. return 1;
  3144. }
  3145. if(dialogid == 12410) // id is changing dealership name
  3146. {
  3147. if(!response)
  3148. {
  3149. DeletePVar(playerid, "edittingdealer");
  3150. return 1;
  3151. }
  3152. if(strlen(inputtext))
  3153. {
  3154. new d = GetPVarInt(playerid, "edittingdealer");
  3155. if(Dealerships[d][dCreated] == false)
  3156. {
  3157. DeletePVar(playerid, "edittingdealer");
  3158. return 1;
  3159. }
  3160. strmid(Dealerships[d][dName], inputtext, 0, 64, 64);
  3161. format(str, sizeof(str), "Dealership\nName: %s\nID: %d\n/buycar to buy a car.", Dealerships[d][dName], d);
  3162. UpdateDynamic3DTextLabelText(Dealerships[d][d3DText], 0xFE9A2EFF, str);
  3163. SaveDealerships();
  3164. format(str, sizeof(str), "You have changed Dealership ID %d's name to \"%s\".", d, Dealerships[d][dName]);
  3165. SendClientMessage(playerid, COLOR_YELLOW, str);
  3166. }
  3167. return 1;
  3168. }
  3169. if(dialogid == 12420) // id is managing dealership cars
  3170. {
  3171. if(!response)
  3172. {
  3173. DeletePVar(playerid, "edittingdealer");
  3174. return 1;
  3175. }
  3176. if(listitem == 0)
  3177. {
  3178. new d = GetPVarInt(playerid, "edittingdealer");
  3179. if(Dealerships[d][dCreated] == false)
  3180. {
  3181. DeletePVar(playerid, "edittingdealer");
  3182. return 1;
  3183. }
  3184. 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");
  3185. }
  3186. else
  3187. {
  3188. new d = GetPVarInt(playerid, "edittingdealer");
  3189. if(Dealerships[d][dCreated] == false)
  3190. {
  3191. DeletePVar(playerid, "edittingdealer");
  3192. return 1;
  3193. }
  3194. new car = listitem - 1;
  3195. if(Dealerships[d][dCars][car] >= 400)
  3196. {
  3197. Dealerships[d][dCars][car] = 0;
  3198. Dealerships[d][dCarPrice][car] = 0;
  3199. new ca = 0; // car id fix
  3200. for(new i = 0; i < 64; i++)
  3201. {
  3202. if(Dealerships[d][dCars][i] >= 400)
  3203. {
  3204. new oldid, oldprice;
  3205. oldid = Dealerships[d][dCars][i];
  3206. oldprice = Dealerships[d][dCarPrice][i];
  3207. Dealerships[d][dCars][i] = 0;
  3208. Dealerships[d][dCarPrice][i] = 0;
  3209. // here's the fix
  3210. Dealerships[d][dCars][ca] = oldid;
  3211. Dealerships[d][dCarPrice][ca] = oldprice;
  3212. ca++;
  3213. }
  3214. }
  3215. SaveDealerships();
  3216. SendClientMessage(playerid, COLOR_YELLOW, "You have removed that vehicle from the dealership.");
  3217. }
  3218. }
  3219. return 1;
  3220. }
  3221. if(dialogid == 12421) // id is adding car name dialog
  3222. {
  3223. if(!response)
  3224. {
  3225. DeletePVar(playerid, "edittingdealer");
  3226. return 1;
  3227. }
  3228. else
  3229. {
  3230. new d = GetPVarInt(playerid, "edittingdealer");
  3231. if(Dealerships[d][dCreated] == false)
  3232. {
  3233. DeletePVar(playerid, "edittingdealer");
  3234. return 1;
  3235. }
  3236. new modelid = ReturnVehicleModelID(inputtext);
  3237. if(modelid < 400 || modelid > 600) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid vehicle model.");
  3238. SetPVarInt(playerid, "managedcarmodel", modelid);
  3239. format(str, sizeof(str), "Enter the price you want for a %s.", GetVehicleFriendlyNameFromModel(GetPVarInt(playerid, "managedcarmodel")));
  3240. ShowPlayerDialog(playerid, 12422, DIALOG_STYLE_INPUT, "Enter Price", str, "Okay", "Cancel");
  3241. }
  3242. return 1;
  3243. }
  3244. if(dialogid == 12422) // id is adding car price dialog
  3245. {
  3246. if(!response)
  3247. {
  3248. DeletePVar(playerid, "edittingdealer");
  3249. return 1;
  3250. }
  3251. else
  3252. {
  3253. new d = GetPVarInt(playerid, "edittingdealer");
  3254. if(Dealerships[d][dCreated] == false)
  3255. {
  3256. DeletePVar(playerid, "edittingdealer");
  3257. return 1;
  3258. }
  3259. new price = strval(inputtext);
  3260. if(price < 1) return SendClientMessage(playerid, COLOR_GRAD1, "The price can not be below 1.");
  3261. new openindex = -1;
  3262. for(new c = 0; c < 64; c++)
  3263. {
  3264. if(Dealerships[d][dCars][c] < 400)
  3265. {
  3266. openindex = c;
  3267. break;
  3268. }
  3269. }
  3270. if(openindex == -1) return SendClientMessage(playerid, COLOR_GRAD1, "Failed to add car (Error 104)");
  3271. Dealerships[d][dCars][openindex] = GetPVarInt(playerid, "managedcarmodel");
  3272. Dealerships[d][dCarPrice][openindex] = price;
  3273. SaveDealerships();
  3274. format(str, sizeof(str), "Added %s to dealership %s for price $%d.", GetVehicleFriendlyNameFromModel(GetPVarInt(playerid, "managedcarmodel")), Dealerships[d][dName], Dealerships[d][dCarPrice][openindex]);
  3275. SendClientMessage(playerid, COLOR_YELLOW, str);
  3276. }
  3277. return 1;
  3278. }
  3279. if(dialogid == 12430) // id is removing dealership
  3280. {
  3281. if(!response)
  3282. {
  3283. DeletePVar(playerid, "edittingdealer");
  3284. return 1;
  3285. }
  3286. else
  3287. {
  3288. new d = GetPVarInt(playerid, "edittingdealer");
  3289. if(Dealerships[d][dCreated] == false)
  3290. {
  3291. DeletePVar(playerid, "edittingdealer");
  3292. return 1;
  3293. }
  3294. strdel(Dealerships[d][dName], 0, 64);
  3295. Dealerships[d][dPos][0] = 0.0;
  3296. Dealerships[d][dPos][1] = 0.0;
  3297. Dealerships[d][dPos][2] = 0.0;
  3298. Dealerships[d][dPos][3] = 0.0;
  3299. Dealerships[d][dPos][4] = 0.0;
  3300. Dealerships[d][dPos][5] = 0.0;
  3301. Dealerships[d][dPos][6] = 0.0;
  3302. for(new c = 0; c < 64; c++)
  3303. {
  3304. Dealerships[d][dCars][c] = 0;
  3305. Dealerships[d][dCarPrice][c] = 0;
  3306. }
  3307. DestroyDynamic3DTextLabel(Dealerships[d][d3DText]);
  3308. DestroyDynamicPickup(Dealerships[d][dPickup]);
  3309. Dealerships[d][d3DText] = Text3D:INVALID_3DTEXT_ID;
  3310. Dealerships[d][dPickup] = 0;
  3311. Dealerships[d][dCreated] = false;
  3312. SaveDealerships();
  3313. format(str, sizeof(str), "dealerships/%d.ini", d);
  3314. if(fexist(str))
  3315. {
  3316. fremove(str);
  3317. }
  3318. SendClientMessage(playerid, COLOR_YELLOW, "You have successfully deleted the dealership.");
  3319. }
  3320. return 1;
  3321. }
  3322. if(dialogid == 24200) // ID is Giving Accessory From List
  3323. {
  3324. if(response)
  3325. {
  3326. new player = GetPVarInt(playerid, "ToRemoveAccessor");
  3327. Accessories[player][listitem] = 0;
  3328. AccessoriesX[player][listitem] = 0;
  3329. AccessoriesY[player][listitem] = 0;
  3330. AccessoriesZ[player][listitem] = 0;
  3331. AccessoriesrX[player][listitem] = 0;
  3332. AccessoriesrY[player][listitem] = 0;
  3333. AccessoriesrZ[player][listitem] = 0;
  3334. AccessoriessX[player][listitem] = 0;
  3335. AccessoriessY[player][listitem] = 0;
  3336. AccessoriessZ[player][listitem] = 0;
  3337. Accessoriesc1[player][listitem] = 0;
  3338. RemovePlayerAttachedObject(playerid, listitem);
  3339. SendClientMessage(player, COLOR_LIGHTBLUE, "* An admin has removed one of your gear.");
  3340. }
  3341. return 1;
  3342. }
  3343. if(dialogid == 24207) // ID is Giving Accessory From List
  3344. {
  3345. if(response)
  3346. {
  3347. new freeslot = -1, player = GetPVarInt(playerid, "ToGiveAccessorTo");
  3348. for(new i = 0; i < 7; i++)
  3349. {
  3350. if(Accessories[player][i] == 0)
  3351. {
  3352. freeslot = i;
  3353. break;
  3354. }
  3355. }
  3356. if(freeslot == -1) return SendClientMessage(playerid, COLOR_GRAD1, "That player does not have enough space for that.");
  3357. Accessories[player][freeslot] = AdminAccessers[listitem][modid];
  3358. AccessoriesB[player][freeslot] = 1;
  3359. AccessoriessX[player][freeslot] = 1;
  3360. AccessoriessY[player][freeslot] = 1;
  3361. AccessoriessZ[player][freeslot] = 1;
  3362. format(str, sizeof(str), "An admin has given you a \"%s\", Type /gear to equip it.", AdminAccessers[listitem][modname]);
  3363. SendClientMessage(player, COLOR_LIGHTBLUE, str);
  3364. format(str, sizeof(str), "You have given %s a \"%s\".", PlayerICName(player), AdminAccessers[listitem][modname]);
  3365. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3366. }
  3367. return 1;
  3368. }
  3369. if(dialogid == 24208) // ID is Giving Accessory From Search
  3370. {
  3371. if(response)
  3372. {
  3373. new freeslot = -1, player = GetPVarInt(playerid, "ToGiveAccessorTo");
  3374. for(new i = 0; i < 7; i++)
  3375. {
  3376. if(Accessories[player][i] == 0)
  3377. {
  3378. freeslot = i;
  3379. break;
  3380. }
  3381. }
  3382. if(freeslot == -1) return SendClientMessage(playerid, COLOR_GRAD1, "That player does not have enough space for that.");
  3383. Accessories[player][freeslot] = AdminAccessers[accessorysr[playerid][listitem]][modid];
  3384. AccessoriesB[player][freeslot] = 1;
  3385. AccessoriessX[player][freeslot] = 1;
  3386. AccessoriessY[player][freeslot] = 1;
  3387. AccessoriessZ[player][freeslot] = 1;
  3388. format(str, sizeof(str), "An admin has given you a \"%s\", Type /gear to equip it.", AdminAccessers[accessorysr[playerid][listitem]][modname]);
  3389. SendClientMessage(player, COLOR_LIGHTBLUE, str);
  3390. format(str, sizeof(str), "You have given %s a \"%s\".", PlayerICName(player), AdminAccessers[accessorysr[playerid][listitem]][modname]);
  3391. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3392. }
  3393. return 1;
  3394. }
  3395. if(dialogid == 24209) // ID is Giving Accessory Search
  3396. {
  3397. if(response)
  3398. {
  3399. new hugestring[4096], listnum = 0;
  3400. for(new i = 0; i < sizeof(AdminAccessers); i++)
  3401. {
  3402. if(AdminAccessers[i][modid] > 1 && strfind(AdminAccessers[i][modname], inputtext, true) != -1)
  3403. {
  3404. format(hugestring, sizeof(hugestring), "%s\n%s", hugestring, AdminAccessers[i][modname]);
  3405. accessorysr[playerid][listnum] = i;
  3406. listnum++;
  3407. }
  3408. }
  3409. ShowPlayerDialog(playerid, 24208, DIALOG_STYLE_LIST, "Search results", hugestring, "Give", "Cancel");
  3410. }
  3411. return 1;
  3412. }
  3413. if(dialogid == 24210) // ID is Giving Accessory
  3414. {
  3415. if(response)
  3416. {
  3417. 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");
  3418. }
  3419. else
  3420. {
  3421. new hugestring[4096];
  3422. for(new i = 0; i < sizeof(AdminAccessers); i++)
  3423. {
  3424. if(AdminAccessers[i][modid] > 1)
  3425. {
  3426. format(hugestring, sizeof(hugestring), "%s\n%s", hugestring, AdminAccessers[i][modname]);
  3427. }
  3428. }
  3429. ShowPlayerDialog(playerid, 24207, DIALOG_STYLE_LIST, "List of models to give", hugestring, "Give", "Cancel");
  3430. }
  3431. return 1;
  3432. }
  3433. if(dialogid == DIALOG_BUYACCESSOR_MAIN) // ID is Buying Accessories
  3434. {
  3435. if(response)
  3436. {
  3437. new hugestring[3700];
  3438. new pricestr[13];
  3439. new pricestr2[13];
  3440. switch(listitem)
  3441. {
  3442. case 0: //Clothing Items 1
  3443. {
  3444. for(new a = 0; a < 127; a++)
  3445. {
  3446. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3447. format(pricestr, sizeof(pricestr), "[Ticket]");
  3448. } else {
  3449. valstr(pricestr2, AccessNames[a][modprice]);
  3450. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3451. }
  3452. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3453. }
  3454. listItemClothes[playerid] = 0;
  3455. }
  3456. case 1: //Clothing Items 2
  3457. {
  3458. for(new a = 127; a < 244; a++)
  3459. {
  3460. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3461. format(pricestr, sizeof(pricestr), "[Ticket]");
  3462. } else {
  3463. valstr(pricestr2, AccessNames[a][modprice]);
  3464. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3465. }
  3466. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3467. }
  3468. listItemClothes[playerid] = 127;
  3469. }
  3470. case 2: //Toys 1
  3471. {
  3472. for(new a = 244; a < 283; a++)
  3473. {
  3474. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3475. format(pricestr, sizeof(pricestr), "[Ticket]");
  3476. } else {
  3477. valstr(pricestr2, AccessNames[a][modprice]);
  3478. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3479. }
  3480. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3481. }
  3482. listItemClothes[playerid] = 244;
  3483. }
  3484. case 3: //Toys 2
  3485. {
  3486. for(new a = 283; a < 345; a++)
  3487. {
  3488. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3489. format(pricestr, sizeof(pricestr), "[Ticket]");
  3490. } else {
  3491. valstr(pricestr2, AccessNames[a][modprice]);
  3492. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3493. }
  3494. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3495. }
  3496. listItemClothes[playerid] = 283;
  3497. }
  3498. case 4: //VIP
  3499. {
  3500. for(new a = 345; a < sizeof(AccessNames); a++)
  3501. {
  3502. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3503. format(pricestr, sizeof(pricestr), "[Ticket]");
  3504. } else {
  3505. valstr(pricestr2, AccessNames[a][modprice]);
  3506. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3507. }
  3508. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3509. }
  3510. listItemClothes[playerid] = 345;
  3511. }
  3512. }
  3513. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR, DIALOG_STYLE_LIST, "Gear", hugestring, "Purchase", "Back");
  3514. }
  3515. return 1;
  3516. }
  3517. if(dialogid == DIALOG_BUYACCESSOR) // ID is Buying Accessories
  3518. {
  3519. if(response)
  3520. {
  3521. //0 + 127-127+1
  3522. listitem = listItemClothes[playerid] +listitem;
  3523. if(!IsAtClothShop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not at a clothes shop.");
  3524. new biz = GetPlayerVirtualWorld(playerid);
  3525. if(GetMoney(playerid) < AccessNames[listitem][modprice]) return SendClientMessage(playerid, COLOR_GRAD1, "You do not have enough money to pay for that.");
  3526. new freeslot = -1;
  3527. for(new i = 0; i < 7; i++)
  3528. {
  3529. if(Accessories[playerid][i] == 0)
  3530. {
  3531. freeslot = i;
  3532. break;
  3533. }
  3534. }
  3535. if(freeslot == -1) return SendClientMessage(playerid, COLOR_GRAD1, "You do not have enough space for that.");
  3536. PlayerTextDrawDestroy(playerid, pModel_t[playerid]);
  3537. pModelState[playerid] = 999;
  3538. pModel_t[playerid] = CreatePlayerTextDraw(playerid, 220.0, 220.0, "_");
  3539. PlayerTextDrawFont(playerid, pModel_t[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
  3540. PlayerTextDrawTextSize(playerid, pModel_t[playerid], 200.0, 200.0);
  3541. PlayerTextDrawSetPreviewModel(playerid, pModel_t[playerid], AccessNames[listitem][modid]);
  3542. PlayerTextDrawSetPreviewRot(playerid, pModel_t[playerid], -15.0, 0.0, 0.0);
  3543. PlayerTextDrawUseBox(playerid, pModel_t[playerid], 0);
  3544. PlayerTextDrawBackgroundColor(playerid, pModel_t[playerid], 0x00000000);
  3545. PlayerTextDrawShow(playerid, pModel_t[playerid]);
  3546. pModelState[playerid] = 1;
  3547. pModelRot[playerid][0] = 0;
  3548. pModelRot[playerid][1] = 0;
  3549. pModelRot[playerid][2] = 0;
  3550. pModelTimer[playerid] = SetTimerEx("UpdatePreviewModel", 1000, 1, "i", playerid);
  3551. format(str, sizeof(str), "{B4B5B7}Are you sure you would like to purchase the %s for $%d?", AccessNames[listitem][modname], AccessNames[listitem][modprice]);
  3552. ShowPlayerDialog(playerid, 772, DIALOG_STYLE_MSGBOX, "Are you sure?", str, "Purchase", "Back");
  3553. SetPVarInt(playerid, "buyaccbincobiz", biz);
  3554. SetPVarInt(playerid, "buyaccbinco", listitem);
  3555. }
  3556. else
  3557. {
  3558. listItemClothes[playerid] = -1;
  3559. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR_MAIN, DIALOG_STYLE_LIST, "Gear", "Clothing Items 1\nClothing Items 2\nToys 1\nToys 2\nSpecial", "Select", "Cancel");
  3560. }
  3561. return 1;
  3562. }
  3563. if(dialogid == 772)
  3564. {
  3565. PlayerTextDrawDestroy(playerid, pModel_t[playerid]);
  3566. pModelState[playerid] = 999;
  3567. if(!response)
  3568. {
  3569. DeletePVar(playerid, "buyaccbincobiz");
  3570. DeletePVar(playerid, "buyaccbinco");
  3571. new hugestring[3700];
  3572. new pricestr[13];
  3573. new pricestr2[13];
  3574. switch(listItemClothes[playerid])
  3575. {
  3576. case 0:
  3577. { //Clothing Items 1
  3578. for(new a = 0; a < 127; a++)
  3579. {
  3580. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3581. format(pricestr, sizeof(pricestr), "[Ticket]");
  3582. } else {
  3583. valstr(pricestr2, AccessNames[a][modprice]);
  3584. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3585. }
  3586. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3587. listItemClothes[playerid] = 0;
  3588. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR, DIALOG_STYLE_LIST, "Gear", hugestring, "Purchase", "Back");
  3589. }
  3590. }
  3591. case 127:
  3592. { //Clothing Items 2
  3593. for(new a = 127; a < 244; a++)
  3594. {
  3595. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3596. format(pricestr, sizeof(pricestr), "[Ticket]");
  3597. } else {
  3598. valstr(pricestr2, AccessNames[a][modprice]);
  3599. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3600. }
  3601. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3602. listItemClothes[playerid] = 127;
  3603. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR, DIALOG_STYLE_LIST, "Gear", hugestring, "Purchase", "Back");
  3604. }
  3605. }
  3606. case 244:
  3607. { //Toys 1
  3608. for(new a = 244; a < 283; a++)
  3609. {
  3610. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3611. format(pricestr, sizeof(pricestr), "[Ticket]");
  3612. } else {
  3613. valstr(pricestr2, AccessNames[a][modprice]);
  3614. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3615. }
  3616. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3617. listItemClothes[playerid] = 244;
  3618. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR, DIALOG_STYLE_LIST, "Gear", hugestring, "Purchase", "Back");
  3619. }
  3620. }
  3621. case 283:
  3622. { //Toys 2
  3623. for(new a = 283; a < 345; a++)
  3624. {
  3625. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3626. format(pricestr, sizeof(pricestr), "[Ticket]");
  3627. } else {
  3628. valstr(pricestr2, AccessNames[a][modprice]);
  3629. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3630. }
  3631. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3632. listItemClothes[playerid] = 283;
  3633. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR, DIALOG_STYLE_LIST, "Gear", hugestring, "Purchase", "Back");
  3634. }
  3635. }
  3636. case 345:
  3637. { //Special
  3638. for(new a = 345; a < sizeof(AccessNames); a++)
  3639. {
  3640. if(AccessNames[a][modprice] == 1) { // item needs gear ticket
  3641. format(pricestr, sizeof(pricestr), "[Ticket]");
  3642. } else {
  3643. valstr(pricestr2, AccessNames[a][modprice]);
  3644. format(pricestr, sizeof(pricestr), "$%s", pricestr2);
  3645. }
  3646. format(hugestring, sizeof(hugestring), "%s\n%s %s", hugestring, AccessNames[a][modname], pricestr);
  3647. listItemClothes[playerid] = 345;
  3648. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR, DIALOG_STYLE_LIST, "Gear", hugestring, "Purchase", "Back");
  3649. }
  3650. }
  3651. default:
  3652. {
  3653. listItemClothes[playerid] = -1;
  3654. ShowPlayerDialog(playerid, DIALOG_BUYACCESSOR_MAIN, DIALOG_STYLE_LIST, "Gear", "Clothing Items 1\nClothing Items 2\nToys 1\nToys 2\nSpecial", "Select", "Cancel");
  3655. }
  3656. }
  3657. return 1;
  3658. }
  3659. else
  3660. {
  3661. new biz = GetPVarInt(playerid, "buyaccbincobiz");
  3662. new accid = GetPVarInt(playerid, "buyaccbinco");
  3663. new freeslot = -1;
  3664. for(new i = 0; i < 7; i++)
  3665. {
  3666. if(Accessories[playerid][i] == 0)
  3667. {
  3668. freeslot = i;
  3669. break;
  3670. }
  3671. }
  3672. if(freeslot == -1)
  3673. {
  3674. listItemClothes[playerid] = -1;
  3675. SendClientMessage(playerid, COLOR_GRAD1, "You do not have enough space for that.");
  3676. return 1;
  3677. }
  3678. if(AccessNames[accid][modprice] == 1) //if the accessory modprice is 1 then it's a special gear
  3679. { //special menu
  3680. if(PlayerInfo[playerid][gTicket] < 1)
  3681. {
  3682. listItemClothes[playerid] = -1;
  3683. SendClientMessage(playerid, COLOR_GRAD1, "You do not have any gear tickets, you can purchase them at donate.p-rp.xyz.");
  3684. return 1;
  3685. }
  3686. PlayerInfo[playerid][gTicket]--;
  3687. format(str, sizeof(str), "* You have used a Gear Ticket, you have %d remaining.", PlayerInfo[playerid][gTicket]);
  3688. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3689. }
  3690. Accessories[playerid][freeslot] = AccessNames[accid][modid];
  3691. AccessoriesB[playerid][freeslot] = 1;
  3692. AccessoriessX[playerid][freeslot] = 1;
  3693. AccessoriessY[playerid][freeslot] = 1;
  3694. AccessoriessZ[playerid][freeslot] = 1;
  3695. BizInfo[biz][bTill] += AccessNames[accid][modprice];
  3696. BizInfo[biz][bProducts] -= 1;
  3697. GiveMoney(playerid, -AccessNames[accid][modprice]);
  3698. new buygearstr[128];
  3699. format(buygearstr, sizeof(buygearstr), "~r~%s~w~ purchased! Type /gear to equip it.", AccessNames[accid][modname]);
  3700. displayCenterHUDInfo(playerid, buygearstr, 8); //display for 8 seconds
  3701. listItemClothes[playerid] = -1;
  3702. DeletePVar(playerid, "buyaccbincobiz");
  3703. DeletePVar(playerid, "buyaccbinco");
  3704. }
  3705. return 1;
  3706. }
  3707. if(dialogid == 24215) // ID is Inventory Accessory List
  3708. {
  3709. if(response)
  3710. {
  3711. if(listitem <= 6) //if it's a gear slot
  3712. {
  3713. if(Accessories[playerid][listitem] == 0) //if there is nothing in the slot
  3714. {
  3715. SendClientMessage(playerid, COLOR_GRAD1, "That slot is empty.");
  3716. ShowAccessDialog(playerid, 0);
  3717. return 1;
  3718. }
  3719. else
  3720. {
  3721. new titlestring[128];
  3722. format(titlestring, sizeof(titlestring), "Gear %d", listitem +1);
  3723. SetPVarInt(playerid, "ManageAccessID", listitem);
  3724. if(!IsPlayerAttachedObjectSlotUsed(playerid, listitem))
  3725. {
  3726. ShowPlayerDialog(playerid, 24216, DIALOG_STYLE_LIST, titlestring, "Equip\nAdjust Position\nChange Bone\nChange Color\nDelete", "Select", "Back");
  3727. }
  3728. else
  3729. {
  3730. ShowPlayerDialog(playerid, 24216, DIALOG_STYLE_LIST, titlestring, "Unequip\nAdjust Position\nChange Bone\nChange Color\nDelete", "Select", "Back");
  3731. }
  3732. }
  3733. }
  3734. else if(listitem == 7)
  3735. {
  3736. equipAllGear(playerid);
  3737. }
  3738. else if(listitem == 8)
  3739. {
  3740. removeAllGear(playerid);
  3741. }
  3742. }
  3743. return 1;
  3744. }
  3745. if(dialogid == 24216) // ID is Inventory Manage Item
  3746. {
  3747. if(response)
  3748. {
  3749. new manageid = GetPVarInt(playerid, "ManageAccessID");
  3750. if(listitem == 0)
  3751. {
  3752. if(GetPVarInt(playerid, "ManageAccessID") < 0 || GetPVarInt(playerid, "ManageAccessID") > 6) return SendClientMessage(playerid, COLOR_RED, "ACCESS DENIED: Hacking attempt.");
  3753. if(IsPlayerAttachedObjectSlotUsed(playerid, manageid))
  3754. {
  3755. RemovePlayerAttachedObject(playerid, manageid);
  3756. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have unequipped the gear.");
  3757. }
  3758. else
  3759. {
  3760. //equipping for the first time, bone/position is default
  3761. if(AccessoriesX[playerid][manageid] == 0.0 && AccessoriesY[playerid][manageid] == 0.0 && AccessoriesZ[playerid][manageid] == 0.0)
  3762. {
  3763. new bonestring[256 +1];
  3764. for(new i; i < sizeof(AttachmentBones); i++)
  3765. {
  3766. format(bonestring, sizeof(bonestring), "%s\n%s", bonestring, AttachmentBones[i]);
  3767. }
  3768. ShowPlayerDialog(playerid, 24217, DIALOG_STYLE_LIST, "Select Bone", bonestring, "Select", "Back");
  3769. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Select the bodypart which you would like to equip the gear to.");
  3770. }
  3771. else
  3772. {
  3773. 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]));
  3774. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have equipped the gear.");
  3775. DeletePVar(playerid, "ManageAccessID");
  3776. }
  3777. }
  3778. }
  3779. else if(listitem == 1)
  3780. {
  3781. if(GetPVarInt(playerid, "ManageAccessID") < 0 || GetPVarInt(playerid, "ManageAccessID") > 6) return SendClientMessage(playerid, COLOR_RED, "ACCESS DENIED: Hacking attempt.");
  3782. if(AccessoriesB[playerid][manageid] <= 0)
  3783. {
  3784. AccessoriesB[playerid][manageid] = 1;
  3785. }
  3786. if(AccessoriessX[playerid][manageid] <= 0 && AccessoriessY[playerid][manageid] <= 0 && AccessoriessZ[playerid][manageid] <= 0)
  3787. {
  3788. AccessoriessX[playerid][manageid] = 1;
  3789. AccessoriessY[playerid][manageid] = 1;
  3790. AccessoriessZ[playerid][manageid] = 1;
  3791. }
  3792. 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]));
  3793. EditAttachedObject(playerid, manageid);
  3794. 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.");
  3795. }
  3796. else if(listitem == 2)
  3797. {
  3798. if(GetPVarInt(playerid, "ManageAccessID") < 0 || GetPVarInt(playerid, "ManageAccessID") > 6) return SendClientMessage(playerid, COLOR_RED, "ACCESS DENIED: Hacking attempt.");
  3799. new bonestring[256 +1];
  3800. for(new i; i < sizeof(AttachmentBones); i++)
  3801. {
  3802. format(bonestring, sizeof(bonestring), "%s\n%s", bonestring, AttachmentBones[i]);
  3803. }
  3804. ShowPlayerDialog(playerid, 24217, DIALOG_STYLE_LIST, "Select Bone", bonestring, "Select", "Back");
  3805. }
  3806. else if(listitem == 3) //color
  3807. {
  3808. if(GetPVarInt(playerid, "ManageAccessID") < 0 || GetPVarInt(playerid, "ManageAccessID") > 6) return SendClientMessage(playerid, COLOR_RED, "ACCESS DENIED: Hacking attempt."); //dont know what this is for..
  3809. 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");
  3810. }
  3811. else if(listitem == 4)
  3812. {
  3813. new msg[128];
  3814. for(new check = 0; check < sizeof(AccessNames); check++)
  3815. {
  3816. if(AccessNames[check][modid] == Accessories[playerid][manageid])
  3817. {
  3818. format(msg, sizeof(msg), "Are you sure you want to delete %s?", AccessNames[check][modname]);
  3819. break;
  3820. }
  3821. }
  3822. ShowPlayerDialog(playerid, DIALOG_GEAR_DELETE, DIALOG_STYLE_MSGBOX, "Gear Delete Confirmation", msg, "Delete", "Cancel");
  3823. }
  3824. }
  3825. else
  3826. {
  3827. ShowAccessDialog(playerid, 0);
  3828. }
  3829. return 1;
  3830. }
  3831. if(dialogid == DIALOG_GEAR_DELETE)
  3832. {
  3833. if(response)
  3834. {
  3835. new manageid = GetPVarInt(playerid, "ManageAccessID");
  3836. if(manageid < 0 || manageid > 6) return SendClientMessage(playerid, COLOR_RED, "ACCESS DENIED: Hacking attempt.");
  3837. RemovePlayerAttachedObject(playerid, manageid);
  3838. Accessories[playerid][manageid] = 0;
  3839. AccessoriesB[playerid][manageid] = 0;
  3840. AccessoriesX[playerid][manageid] = 0;
  3841. AccessoriesY[playerid][manageid] = 0;
  3842. AccessoriesZ[playerid][manageid] = 0;
  3843. AccessoriesrX[playerid][manageid] = 0;
  3844. AccessoriesrY[playerid][manageid] = 0;
  3845. AccessoriesrZ[playerid][manageid] = 0;
  3846. AccessoriessX[playerid][manageid] = 0;
  3847. AccessoriessY[playerid][manageid] = 0;
  3848. AccessoriessZ[playerid][manageid] = 0;
  3849. Accessoriesc1[playerid][manageid] = 0; //color1
  3850. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have deleted the gear.");
  3851. DeletePVar(playerid, "ManageAccessID");
  3852. }
  3853. }
  3854. if(dialogid == 24218)
  3855. {
  3856. if(response)
  3857. {
  3858. new manageid = GetPVarInt(playerid, "ManageAccessID");
  3859. if(GetPVarInt(playerid, "ManageAccessID") < 0 || GetPVarInt(playerid, "ManageAccessID") > 6) return SendClientMessage(playerid, COLOR_RED, "ACCESS DENIED: Hacking attempt.");
  3860. Accessoriesc1[playerid][manageid] = listitem;
  3861. if(IsPlayerAttachedObjectSlotUsed(playerid, manageid))
  3862. {
  3863. 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]));
  3864. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have adjusted the color of the gear.");
  3865. }
  3866. }
  3867. else
  3868. {
  3869. }
  3870. DeletePVar(playerid, "ManageAccessID");
  3871. return 1;
  3872. }
  3873. if(dialogid == 24217) //edit accessory select bone
  3874. {
  3875. new manageid = GetPVarInt(playerid, "ManageAccessID");
  3876. if(response)
  3877. {
  3878. AccessoriesB[playerid][manageid] = listitem +1;
  3879. 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]));
  3880. EditAttachedObject(playerid, manageid);
  3881. 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.");
  3882. DeletePVar(playerid, "ManageAccessID"); //added
  3883. }
  3884. else
  3885. {
  3886. new titlestring[128], access;
  3887. for(new check = 0; check < sizeof(AccessNames); check++)
  3888. {
  3889. if(AccessNames[check][modid] == Accessories[playerid][manageid])
  3890. {
  3891. access = check;
  3892. }
  3893. }
  3894. format(titlestring, sizeof(titlestring), "%s", AccessNames[access][modname]);
  3895. if(!IsPlayerAttachedObjectSlotUsed(playerid, listitem))
  3896. {
  3897. ShowPlayerDialog(playerid, 24216, DIALOG_STYLE_LIST, titlestring, "Equip\nAdjust Position\nChange Bone\nChange Color\nDelete", "Select", "Back");
  3898. }
  3899. else
  3900. {
  3901. ShowPlayerDialog(playerid, 24216, DIALOG_STYLE_LIST, titlestring, "Unequip\nAdjust Position\nChange Bone\nChange Color\nDelete", "Select", "Back");
  3902. }
  3903. }
  3904. return 1;
  3905. }
  3906. if(dialogid == DIALOG_BUSSINESS_BUY) //247
  3907. {
  3908. if(response)
  3909. {
  3910. new biz = GetPlayerVirtualWorld(playerid);
  3911. if(listitem == 0) //cellphone
  3912. {
  3913. if(PlayerInfo[playerid][pCash] > 499)
  3914. {
  3915. GiveMoney(playerid, -500);
  3916. BizInfo[biz][bTill] += 500;
  3917. BizInfo[biz][bProducts] -= 1;
  3918. buyCellphone(playerid, 0); //0 = default type
  3919. format(str, sizeof(str), "~r~-$%d", 500);
  3920. GameTextForPlayer(playerid, str, 5000, 1);
  3921. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  3922. }
  3923. else
  3924. {
  3925. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3926. }
  3927. }
  3928. if(listitem == 1) //phonebook
  3929. {
  3930. if(PlayerInfo[playerid][pPhoneBook] == 1)
  3931. {
  3932. SendClientMessage(playerid, COLOR_GRAD2, "You already have a phonebook.");
  3933. return 1;
  3934. }
  3935. if(PlayerInfo[playerid][pCash] > 4999)
  3936. {
  3937. GiveMoney(playerid, -5000);
  3938. BizInfo[biz][bTill] += 5000;
  3939. BizInfo[biz][bProducts] -= 1;
  3940. PlayerInfo[playerid][pPhoneBook] = 1;
  3941. format(str, sizeof(str), "~r~-$%d", 5000);
  3942. GameTextForPlayer(playerid, str, 5000, 1);
  3943. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  3944. displayCenterHUDInfo(playerid, "~r~Phonebook~w~ purchased!~n~Type ~y~/number~w~ to look up other players numbers.", 8); //display for 8 seconds
  3945. }
  3946. else
  3947. {
  3948. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3949. }
  3950. }
  3951. if(listitem == 2) //dice
  3952. {
  3953. if(PlayerInfo[playerid][pDice] == 1)
  3954. {
  3955. SendClientMessage(playerid, COLOR_GRAD2, "You already have dice.");
  3956. return 1;
  3957. }
  3958. if(PlayerInfo[playerid][pCash] > 499)
  3959. {
  3960. GiveMoney(playerid, -500);
  3961. BizInfo[biz][bTill] += 500;
  3962. BizInfo[biz][bProducts] -= 1;
  3963. PlayerInfo[playerid][pDice] = 1;
  3964. format(str, sizeof(str), "~r~-$%d", 500);
  3965. GameTextForPlayer(playerid, str, 5000, 1);
  3966. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  3967. displayCenterHUDInfo(playerid, "~r~Dice~w~ purchased!~n~Type ~y~/dice~w~ to use.", 8); //display for 8 seconds
  3968. }
  3969. else
  3970. {
  3971. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3972. }
  3973. }
  3974. if(listitem == 3)
  3975. {
  3976. if(PlayerInfo[playerid][piPod] > 0)
  3977. {
  3978. SendClientMessage(playerid, COLOR_GRAD2, "You already have a iPod.");
  3979. return 1;
  3980. }
  3981. if(PlayerInfo[playerid][pCash] > 2499)
  3982. {
  3983. GiveMoney(playerid, -2500);
  3984. BizInfo[biz][bTill] += 2500;
  3985. BizInfo[biz][bProducts] -= 1;
  3986. PlayerInfo[playerid][piPod] = 1;
  3987. format(str, sizeof(str), "~r~-$%d", 2500);
  3988. GameTextForPlayer(playerid, str, 5000, 1);
  3989. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  3990. displayCenterHUDInfo(playerid, "~r~iPod~w~ purchased!~n~type ~y~/ipod~w~ to listen to music.", 8); //display for 8 seconds
  3991. }
  3992. else
  3993. {
  3994. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3995. }
  3996. }
  3997. if(listitem == 4)
  3998. {
  3999. if(PlayerInfo[playerid][pSpraycan] >= 10)
  4000. {
  4001. SendClientMessage(playerid, COLOR_GRAD2, "You already have 10 or more spray cans.");
  4002. return 1;
  4003. }
  4004. if(PlayerInfo[playerid][pCash] >= 200)
  4005. {
  4006. GiveMoney(playerid, -200);
  4007. BizInfo[biz][bTill] += 200;
  4008. BizInfo[biz][bProducts] -= 1;
  4009. PlayerInfo[playerid][pSpraycan] += 10;
  4010. format(str, sizeof(str), "~r~-$%d", 200);
  4011. GameTextForPlayer(playerid, str, 5000, 1);
  4012. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4013. displayCenterHUDInfo(playerid, "~r~10 Spraycans~w~ purchased!~n~type ~y~/colorcar~w~ or ~y~/paintcar~w~ to paint vehicles.", 8); //display for 8 seconds
  4014. }
  4015. else
  4016. {
  4017. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4018. }
  4019. }
  4020. if(listitem == 5)
  4021. {
  4022. if(PlayerInfo[playerid][pRope] >= 9)
  4023. {
  4024. SendClientMessage(playerid, COLOR_GRAD2, "You already have 9 or more ropes.");
  4025. return 1;
  4026. }
  4027. if(PlayerInfo[playerid][pCash] > 999)
  4028. {
  4029. GiveMoney(playerid, -1000);
  4030. BizInfo[biz][bTill] += 1000;
  4031. BizInfo[biz][bProducts] -= 1;
  4032. PlayerInfo[playerid][pRope] += 3;
  4033. format(str, sizeof(str), "~r~-$%d", 1000);
  4034. GameTextForPlayer(playerid, str, 5000, 1);
  4035. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4036. 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
  4037. }
  4038. else
  4039. {
  4040. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4041. }
  4042. }
  4043. if(listitem == 6)
  4044. {
  4045. if(PlayerInfo[playerid][pCigars] >= 10)
  4046. {
  4047. SendClientMessage(playerid, COLOR_GRAD2, "You already have 10 or more cigars.");
  4048. return 1;
  4049. }
  4050. if(PlayerInfo[playerid][pCash] > 50)
  4051. {
  4052. GiveMoney(playerid, -50);
  4053. BizInfo[biz][bTill] += 50;
  4054. BizInfo[biz][bProducts] -= 1;
  4055. PlayerInfo[playerid][pCigars] += 10;
  4056. format(str, sizeof(str), "~r~-$%d", 50);
  4057. GameTextForPlayer(playerid, str, 5000, 1);
  4058. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4059. 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
  4060. }
  4061. else
  4062. {
  4063. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4064. }
  4065. }
  4066. if(listitem == 7)
  4067. {
  4068. if(PlayerInfo[playerid][pSprunk] >= 3)
  4069. {
  4070. SendClientMessage(playerid, COLOR_GRAD2, "You already have 3 or more cans of sprunk.");
  4071. return 1;
  4072. }
  4073. if(PlayerInfo[playerid][pCash] > 9)
  4074. {
  4075. GiveMoney(playerid, -10);
  4076. BizInfo[biz][bTill] += 10;
  4077. BizInfo[biz][bProducts] -= 1;
  4078. PlayerInfo[playerid][pSprunk] += 1;
  4079. format(str, sizeof(str), "~r~-$%d", 10);
  4080. GameTextForPlayer(playerid, str, 5000, 1);
  4081. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4082. 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
  4083. }
  4084. else
  4085. {
  4086. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4087. }
  4088. }
  4089. if(listitem == 8) //walkie talkie
  4090. {
  4091. if(PlayerInfo[playerid][pWT] == 1)
  4092. {
  4093. SendClientMessage(playerid, COLOR_GRAD2, "You already have a Walkie Talkie.");
  4094. return 1;
  4095. }
  4096. if(PlayerInfo[playerid][pCash] > 199)
  4097. {
  4098. GiveMoney(playerid, -200);
  4099. BizInfo[biz][bTill] += 200;
  4100. BizInfo[biz][bProducts] -= 1;
  4101. PlayerInfo[playerid][pWT] = 1;
  4102. format(str, sizeof(str), "~r~-$%d", 200);
  4103. GameTextForPlayer(playerid, str, 5000, 1);
  4104. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4105. 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
  4106. }
  4107. else
  4108. {
  4109. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4110. }
  4111. }
  4112. if(listitem == 9) //screw drivers
  4113. {
  4114. if(PlayerInfo[playerid][pScrew] >= 5)
  4115. {
  4116. SendClientMessage(playerid, COLOR_GRAD2, "You already have 5 or more screw drivers.");
  4117. return 1;
  4118. }
  4119. if(PlayerInfo[playerid][pCash] > 49)
  4120. {
  4121. GiveMoney(playerid, -50);
  4122. BizInfo[biz][bTill] += 50;
  4123. BizInfo[biz][bProducts] -= 1;
  4124. PlayerInfo[playerid][pScrew] += 5;
  4125. format(str, sizeof(str), "~r~-$%d", 50);
  4126. GameTextForPlayer(playerid, str, 5000, 1);
  4127. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4128. 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
  4129. }
  4130. else
  4131. {
  4132. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4133. }
  4134. }
  4135. if(listitem == 10) //blindfolds
  4136. {
  4137. if(PlayerInfo[playerid][pBlindfolds] >= 6)
  4138. {
  4139. SendClientMessage(playerid, COLOR_GRAD2, "You already have 6 or more blindfolds.");
  4140. return 1;
  4141. }
  4142. if(PlayerInfo[playerid][pCash] >= 2500)
  4143. {
  4144. GiveMoney(playerid, -2500);
  4145. BizInfo[biz][bTill] += 2500;
  4146. BizInfo[biz][bProducts] -= 1;
  4147. PlayerInfo[playerid][pBlindfolds] += 2;
  4148. format(str, sizeof(str), "~r~-$%d", 2500);
  4149. GameTextForPlayer(playerid, str, 5000, 1);
  4150. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4151. displayCenterHUDInfo(playerid, "~r~2 Blindfolds~w~ purchased!~n~type ~y~/blindfold~w~ to blindfold someone who is tied.", 8); //display for 8 seconds
  4152. }
  4153. else
  4154. {
  4155. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4156. }
  4157. }
  4158. if(listitem == 11) //cards
  4159. {
  4160. if(PlayerInfo[playerid][pCash] >= 2000)
  4161. {
  4162. GiveMoney(playerid, -2000);
  4163. BizInfo[biz][bTill] += 2000;
  4164. BizInfo[biz][bProducts] -= 1;
  4165. format(str, sizeof(str), "~r~-$%d", 2000);
  4166. GameTextForPlayer(playerid, str, 5000, 1);
  4167. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4168. PlayerInfo[playerid][pDeck] = 1;
  4169. displayCenterHUDInfo(playerid, "~r~Deck Of Cards~w~ purchased!~n~type ~y~/help~w~ view the gambling commands.", 8); //display for 8 seconds
  4170. }
  4171. else
  4172. {
  4173. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4174. }
  4175. }
  4176. if(listitem == 12) //address book
  4177. {
  4178. if(PlayerInfo[playerid][pCash] >= 1000)
  4179. {
  4180. GiveMoney(playerid, -1000);
  4181. BizInfo[biz][bTill] += 1000;
  4182. BizInfo[biz][bProducts] -= 1;
  4183. PlayerInfo[playerid][pAddressBook] = 1;
  4184. format(str, sizeof(str), "~r~-$%d", 1000);
  4185. GameTextForPlayer(playerid, str, 5000, 1);
  4186. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4187. displayCenterHUDInfo(playerid, "~r~2 Address Book~w~ purchased!~n~type ~y~/address~w~ to find out where someone lives.", 8); //display for 8 seconds
  4188. }
  4189. else
  4190. {
  4191. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4192. }
  4193. }
  4194. if(listitem == 13)
  4195. {
  4196. if(PlayerInfo[playerid][pCash] >= 50)
  4197. {
  4198. GiveMoney(playerid, -50);
  4199. BizInfo[biz][bTill] += 50;
  4200. BizInfo[biz][bProducts] -= 1;
  4201. PlayerInfo[playerid][pCalculator] = 1;
  4202. format(str, sizeof(str), "~r~-$%d", 50);
  4203. GameTextForPlayer(playerid, str, 5000, 1);
  4204. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4205. displayCenterHUDInfo(playerid, "~r~Calculator~w~ purchased!~n~type ~y~/calculate~w~ to use it.", 8); //display for 8 seconds
  4206. }
  4207. else
  4208. {
  4209. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4210. }
  4211. }
  4212. if(listitem == 14) // Stero
  4213. {
  4214. if(PlayerInfo[playerid][pStereo] > 0) return SendClientMessage(playerid, COLOR_GRAD2, "You already have a Boombox.");
  4215. if(PlayerInfo[playerid][pCash] >= 3500)
  4216. {
  4217. GiveMoney(playerid, -3500);
  4218. BizInfo[biz][bTill] += 3500;
  4219. BizInfo[biz][bProducts] -= 1;
  4220. PlayerInfo[playerid][pStereo] = 1;
  4221. format(str, sizeof(str), "~r~-$%d", 3500);
  4222. GameTextForPlayer(playerid, str, 5000, 1);
  4223. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4224. displayCenterHUDInfo(playerid, "~r~Boombox~w~ purchased!~n~type ~y~/placeboombox~w~ to place it on the ground.", 8); //display for 8 seconds
  4225. }
  4226. else
  4227. {
  4228. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4229. }
  4230. }
  4231. if(listitem == 15) //map
  4232. {
  4233. if(PlayerInfo[playerid][pMap] != 0) return SendClientMessage(playerid, COLOR_GREY, "You already have a map.");
  4234. if(PlayerInfo[playerid][pCash] >= 500)
  4235. {
  4236. GiveMoney(playerid, -500);
  4237. BizInfo[biz][bTill] += 500;
  4238. BizInfo[biz][bProducts] -= 1;
  4239. format(str, sizeof(str), "~r~-%d", 500);
  4240. PlayerInfo[playerid][pMap] = 1;
  4241. GameTextForPlayer(playerid, str, 5000, 1);
  4242. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4243. displayCenterHUDInfo(playerid, "~r~Map~w~ purchased!~n~type ~y~/map~w~ to use it", 8);
  4244. }
  4245. else
  4246. {
  4247. return SendClientMessage(playerid, COLOR_GREY, "You don't have the cash for that.");
  4248. }
  4249. }
  4250. if(listitem == 16) //Box of Matches
  4251. {
  4252. if(PlayerInfo[playerid][pMatches] > 0) return SendClientMessage(playerid, COLOR_GRAD2, "You can only carry one box of matches.");
  4253. if(PlayerInfo[playerid][pCash] >= 500)
  4254. {
  4255. GiveMoney(playerid, -500);
  4256. BizInfo[biz][bTill] += 500;
  4257. BizInfo[biz][bProducts] -= 1;
  4258. PlayerInfo[playerid][pMatches] = 3;
  4259. format(str, sizeof(str), "~r~-$%d", 500);
  4260. GameTextForPlayer(playerid, str, 5000, 1);
  4261. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4262. displayCenterHUDInfo(playerid, "~r~Box of Matches~w~ purchased!~n~type ~y~/lightfire~w~ to light a fire.", 8); //display for 8 seconds
  4263. }
  4264. else
  4265. {
  4266. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4267. }
  4268. }
  4269. if(listitem == 17) //Jerry Can
  4270. {
  4271. if(PlayerInfo[playerid][pJerrycan] > 0) return SendClientMessage(playerid, COLOR_GRAD2, "You can only carry one jerry can.");
  4272. if(PlayerInfo[playerid][pCash] >= 1000)
  4273. {
  4274. GiveMoney(playerid, -1000);
  4275. BizInfo[biz][bTill] += 1000;
  4276. BizInfo[biz][bProducts] -= 1;
  4277. PlayerInfo[playerid][pJerrycan] = 1;
  4278. format(str, sizeof(str), "~r~-$%d", 1000);
  4279. GameTextForPlayer(playerid, str, 5000, 1);
  4280. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4281. displayCenterHUDInfo(playerid, "~r~Jerry Can~w~ purchased!~n~type ~y~/fill~w~ to fill the jerry can.", 8); //display for 8 seconds
  4282. }
  4283. else
  4284. {
  4285. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4286. }
  4287. }
  4288. if(listitem == 18) //case of beer
  4289. {
  4290. if(PlayerInfo[playerid][pCash] >= 1000)
  4291. {
  4292. GiveMoney(playerid, -1000);
  4293. BizInfo[biz][bTill] += 1000;
  4294. BizInfo[biz][bProducts] -= 1;
  4295. PlayerInfo[playerid][pBeer] = 5;
  4296. format(str, sizeof(str), "~r~-$%d", 1000);
  4297. GameTextForPlayer(playerid, str, 5000, 1);
  4298. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4299. 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
  4300. }
  4301. else
  4302. {
  4303. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4304. }
  4305. }
  4306. if(listitem == 19) // drill
  4307. {
  4308. if(PlayerInfo[playerid][pLevel] < 4) return SendClientMessage(playerid, COLOR_GREY, "You need level 4+ to buy this.");
  4309. if(PlayerInfo[playerid][pDrill] == 1) return SendClientMessage(playerid, COLOR_GREY, "You already have a drill, /usedrill near the vault to use it.");
  4310. if(PlayerInfo[playerid][pCash] >= 250000)
  4311. {
  4312. GiveMoney(playerid, -250000);
  4313. BizInfo[biz][bTill] += 25000; // 10 percents
  4314. BizInfo[biz][bProducts] -= 1;
  4315. PlayerInfo[playerid][pDrill] = 1;
  4316. format(str, sizeof(str), "~r~-$%d", 250000);
  4317. GameTextForPlayer(playerid, str, 5000, 1);
  4318. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4319. displayCenterHUDInfo(playerid, "~r~Drillt~w~ purchased!~n~type ~y~/usedrill~w~ near the vault to start drilling.", 8); //display for 8 seconds
  4320. }
  4321. else
  4322. {
  4323. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4324. }
  4325. }
  4326. if(listitem == 20) // duffle bag
  4327. {
  4328. if(holdingDufflebag[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You already have a dufflebag, /dufflebag.");
  4329. // cooldown is here to ensure players arent buying and dropping duffle bags constantly, therefore filling the world with objects
  4330. // duffle bags disappear 10 minutes after they are dropped
  4331. if(gettime() < PlayerInfo[playerid][pDuffleBagTime]) return SendClientMessage(playerid, COLOR_GREY, "You must wait 20 minutes before purchasing another duffle bag.");
  4332. if(PlayerInfo[playerid][pCash] >= 5000)
  4333. {
  4334. new duffleid = CreateDuffleBag();
  4335. // in case duffleid is -1, it means that dufflebags reached their maximum (200 on the server)
  4336. // if we do get to such a case, i might adjust MAXIMUM_DUFFLEBAGS on dufflebag.inc
  4337. if(duffleid == -1) return SendClientMessage(playerid, COLOR_GREY, "An error occured ~ contact Desmond.");
  4338. AttachDufflebagToPlayer(playerid, duffleid);
  4339. GiveMoney(playerid, -5000);
  4340. BizInfo[biz][bTill] += 5000;
  4341. BizInfo[biz][bProducts] -= 1;
  4342. PlayerInfo[playerid][pDuffleBagTime] = gettime()+DUFFLEBAG_COOLDOWN;
  4343. format(str, sizeof(str), "~r~-$%d", 5000);
  4344. GameTextForPlayer(playerid, str, 5000, 1);
  4345. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4346. displayCenterHUDInfo(playerid, "~r~Dufflebagt~w~ purchased!~n~type ~y~/dufflebag.", 8); //display for 8 seconds
  4347. }
  4348. else
  4349. {
  4350. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4351. }
  4352. }
  4353. if(BizInfo[biz][bProducts] <= 0) SetNoProductsDate(biz);
  4354. }
  4355. return 1;
  4356. }
  4357. if(dialogid == DIALOG_BUSINESS_DRINK) //bar
  4358. {
  4359. if(response)
  4360. {
  4361. new biz = GetPlayerVirtualWorld(playerid);
  4362. if(BizInfo[biz][bProducts] <= 0 && GetPlayerVirtualWorld(playerid) != 0)
  4363. {
  4364. SendClientMessage(playerid, COLOR_GREY, "This business doesn't have any products left.");
  4365. return 1;
  4366. }
  4367. if(listitem == 0) //beer
  4368. {
  4369. if(PlayerInfo[playerid][pCash] > 19)
  4370. {
  4371. GiveMoney(playerid, -20);
  4372. BizInfo[biz][bTill] += 20;
  4373. BizInfo[biz][bProducts] -=1;
  4374. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  4375. format(str, sizeof(str), "~r~-$%d", 20);
  4376. GameTextForPlayer(playerid, str, 5000, 1);
  4377. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4378. displayCenterHUDInfo(playerid, "~r~Beer~w~ purchased!~n~press LMB to drink, press F to drop.", 8); //display for 8 seconds
  4379. }
  4380. else
  4381. {
  4382. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4383. }
  4384. }
  4385. if(listitem == 1) //vodka
  4386. {
  4387. if(PlayerInfo[playerid][pCash] > 29)
  4388. {
  4389. GiveMoney(playerid, -30);
  4390. BizInfo[biz][bTill] += 30;
  4391. BizInfo[biz][bProducts] -=1;
  4392. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  4393. format(str, sizeof(str), "~r~-$%d", 30);
  4394. GameTextForPlayer(playerid, str, 5000, 1);
  4395. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4396. displayCenterHUDInfo(playerid, "~r~Vodka~w~ purchased!~n~press LMB to drink, press F to drop.", 8); //display for 8 seconds
  4397. }
  4398. else
  4399. {
  4400. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4401. }
  4402. }
  4403. if(listitem == 2) //whiskey
  4404. {
  4405. if(PlayerInfo[playerid][pCash] > 34)
  4406. {
  4407. GiveMoney(playerid, -35);
  4408. BizInfo[biz][bTill] += 35;
  4409. BizInfo[biz][bProducts] -=1;
  4410. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  4411. format(str, sizeof(str), "~r~-$%d", 35);
  4412. GameTextForPlayer(playerid, str, 5000, 1);
  4413. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4414. displayCenterHUDInfo(playerid, "~r~Whiskey~w~ purchased!~n~press LMB to drink, press F to drop.", 8); //display for 8 seconds
  4415. }
  4416. else
  4417. {
  4418. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4419. }
  4420. }
  4421. if(listitem == 3) //wine
  4422. {
  4423. if(PlayerInfo[playerid][pCash] > 24)
  4424. {
  4425. GiveMoney(playerid, -25);
  4426. BizInfo[biz][bTill] += 25;
  4427. BizInfo[biz][bProducts] -=1;
  4428. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  4429. format(str, sizeof(str), "~r~-$%d", 25);
  4430. GameTextForPlayer(playerid, str, 5000, 1);
  4431. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4432. displayCenterHUDInfo(playerid, "~r~Wine~w~ purchased!~n~press LMB to drink, press F to drop.", 8); //display for 8 seconds
  4433. }
  4434. else
  4435. {
  4436. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4437. }
  4438. }
  4439. if(listitem == 4) //soda
  4440. {
  4441. if(PlayerInfo[playerid][pCash] > 14)
  4442. {
  4443. GiveMoney(playerid, -15);
  4444. BizInfo[biz][bTill] += 15;
  4445. BizInfo[biz][bProducts] -=1;
  4446. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  4447. format(str, sizeof(str), "~r~-$%d", 15);
  4448. GameTextForPlayer(playerid, str, 5000, 1);
  4449. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4450. displayCenterHUDInfo(playerid, "~r~Sprunk~w~ purchased!~n~press LMB to drink, press F to drop.", 8); //display for 8 seconds
  4451. }
  4452. else
  4453. {
  4454. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4455. }
  4456. }
  4457. if(BizInfo[biz][bProducts] <= 0)
  4458. {
  4459. SetNoProductsDate(biz);
  4460. }
  4461. }
  4462. return 1;
  4463. }
  4464. if(dialogid == DIALOG_TRAIN) //gym
  4465. {
  4466. if(response)
  4467. {
  4468. if(listitem == 0) //normal
  4469. {
  4470. PlayerInfo[playerid][pFightingStyle] = FIGHT_STYLE_NORMAL;
  4471. SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightingStyle]);
  4472. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4473. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have learned a new fighting style.");
  4474. }
  4475. if(listitem == 1) //boxing
  4476. {
  4477. if(PlayerInfo[playerid][pCash] > 49999)
  4478. {
  4479. PlayerInfo[playerid][pFightingStyle] = FIGHT_STYLE_BOXING;
  4480. SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightingStyle]);
  4481. GiveMoney(playerid, -50000);
  4482. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4483. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have learned a new fighting style.");
  4484. }
  4485. else
  4486. {
  4487. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4488. }
  4489. }
  4490. if(listitem == 2) //kung fu
  4491. {
  4492. if(PlayerInfo[playerid][pCash] > 49999)
  4493. {
  4494. PlayerInfo[playerid][pFightingStyle] = FIGHT_STYLE_KUNGFU;
  4495. SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightingStyle]);
  4496. GiveMoney(playerid, -50000);
  4497. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4498. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have learned a new fighting style.");
  4499. }
  4500. else
  4501. {
  4502. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4503. }
  4504. }
  4505. if(listitem == 3) //kneehead
  4506. {
  4507. if(PlayerInfo[playerid][pCash] > 49999)
  4508. {
  4509. PlayerInfo[playerid][pFightingStyle] = FIGHT_STYLE_KNEEHEAD;
  4510. SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightingStyle]);
  4511. GiveMoney(playerid, -50000);
  4512. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4513. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have learned a new fighting style.");
  4514. }
  4515. else
  4516. {
  4517. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4518. }
  4519. }
  4520. if(listitem == 4) //grabkick
  4521. {
  4522. if(PlayerInfo[playerid][pCash] > 49999)
  4523. {
  4524. PlayerInfo[playerid][pFightingStyle] = FIGHT_STYLE_GRABKICK;
  4525. SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightingStyle]);
  4526. GiveMoney(playerid, -50000);
  4527. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4528. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have learned a new fighting style.");
  4529. }
  4530. else
  4531. {
  4532. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4533. }
  4534. }
  4535. if(listitem == 5) //elbow
  4536. {
  4537. if(PlayerInfo[playerid][pCash] > 49999)
  4538. {
  4539. PlayerInfo[playerid][pFightingStyle] = FIGHT_STYLE_ELBOW;
  4540. SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightingStyle]);
  4541. GiveMoney(playerid, -50000);
  4542. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4543. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have learned a new fighting style.");
  4544. }
  4545. else
  4546. {
  4547. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4548. }
  4549. }
  4550. }
  4551. return 1;
  4552. }
  4553. if(dialogid == DIALOG_BUYMEAL) //Cafeteria // COMMENTED
  4554. {
  4555. if(response)
  4556. {
  4557. new Float:playerHP;
  4558. GetPlayerHealth(playerid, playerHP);
  4559. if(listitem == 0) //Bread
  4560. {
  4561. if(PlayerInfo[playerid][pCash] > 2)
  4562. {
  4563. GiveMoney(playerid, -2);
  4564. if(playerHP > 98)
  4565. {
  4566. SetPlayerHealth(playerid, 100.0);
  4567. }
  4568. else
  4569. {
  4570. SetPlayerHealth(playerid, playerHP + 2.0);
  4571. }
  4572. SendClientMessage(playerid, COLOR_GRAD4, "Bread purchased.");
  4573. }
  4574. else
  4575. {
  4576. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4577. return 1;
  4578. }
  4579. }
  4580. if(listitem == 1) //Apple
  4581. {
  4582. if(PlayerInfo[playerid][pCash] > 3)
  4583. {
  4584. GiveMoney(playerid, -3);
  4585. if(playerHP > 97)
  4586. {
  4587. SetPlayerHealth(playerid, 100.0);
  4588. }
  4589. else
  4590. {
  4591. SetPlayerHealth(playerid, playerHP + 3.0);
  4592. }
  4593. SendClientMessage(playerid, COLOR_GRAD4, "Apple purchased.");
  4594. }
  4595. else
  4596. {
  4597. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4598. return 1;
  4599. }
  4600. }
  4601. if(listitem == 2) //Cok O Pops
  4602. {
  4603. if(PlayerInfo[playerid][pCash] > 5)
  4604. {
  4605. GiveMoney(playerid, -5);
  4606. if(playerHP > 95)
  4607. {
  4608. SetPlayerHealth(playerid, 100.0);
  4609. }
  4610. else
  4611. {
  4612. SetPlayerHealth(playerid, playerHP + 5.0);
  4613. }
  4614. SendClientMessage(playerid, COLOR_GRAD4, "Cok O Pops purchased.");
  4615. }
  4616. else
  4617. {
  4618. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4619. return 1;
  4620. }
  4621. }
  4622. if(listitem == 3) //Mashed Potatoes
  4623. {
  4624. if(PlayerInfo[playerid][pCash] > 5)
  4625. {
  4626. GiveMoney(playerid, -5);
  4627. if(playerHP > 95)
  4628. {
  4629. SetPlayerHealth(playerid, 100.0);
  4630. }
  4631. else
  4632. {
  4633. SetPlayerHealth(playerid, playerHP + 5.0);
  4634. }
  4635. SendClientMessage(playerid, COLOR_GRAD4, "Mashed Potatoes purchased.");
  4636. }
  4637. else
  4638. {
  4639. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4640. return 1;
  4641. }
  4642. }
  4643. if(listitem == 4) //Carrot
  4644. {
  4645. if(PlayerInfo[playerid][pCash] > 1)
  4646. {
  4647. GiveMoney(playerid, -1);
  4648. if(playerHP > 99)
  4649. {
  4650. SetPlayerHealth(playerid, 100.0);
  4651. }
  4652. else
  4653. {
  4654. SetPlayerHealth(playerid, playerHP + 1.0);
  4655. }
  4656. SendClientMessage(playerid, COLOR_GRAD4, "Carrot purchased.");
  4657. }
  4658. else
  4659. {
  4660. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4661. return 1;
  4662. }
  4663. }
  4664. if(listitem == 5) //Green Beans
  4665. {
  4666. if(PlayerInfo[playerid][pCash] > 4)
  4667. {
  4668. GiveMoney(playerid, -4);
  4669. if(playerHP > 96)
  4670. {
  4671. SetPlayerHealth(playerid, 100.0);
  4672. }
  4673. else
  4674. {
  4675. SetPlayerHealth(playerid, playerHP + 4.0);
  4676. }
  4677. SendClientMessage(playerid, COLOR_GRAD4, "Green Beans purchased.");
  4678. }
  4679. else
  4680. {
  4681. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4682. return 1;
  4683. }
  4684. }
  4685. if(listitem == 6) //Pork Roll
  4686. {
  4687. if(PlayerInfo[playerid][pCash] > 5)
  4688. {
  4689. GiveMoney(playerid, -5);
  4690. if(playerHP > 95)
  4691. {
  4692. SetPlayerHealth(playerid, 100.0);
  4693. }
  4694. else
  4695. {
  4696. SetPlayerHealth(playerid, playerHP + 5.0);
  4697. }
  4698. SendClientMessage(playerid, COLOR_GRAD4, "Pork Roll purchased.");
  4699. }
  4700. else
  4701. {
  4702. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4703. return 1;
  4704. }
  4705. }
  4706. if(listitem == 7) //Sausage
  4707. {
  4708. if(PlayerInfo[playerid][pCash] > 7)
  4709. {
  4710. GiveMoney(playerid, -7);
  4711. if(playerHP > 93)
  4712. {
  4713. SetPlayerHealth(playerid, 100.0);
  4714. }
  4715. else
  4716. {
  4717. SetPlayerHealth(playerid, playerHP + 7.0);
  4718. }
  4719. SendClientMessage(playerid, COLOR_GRAD4, "Sausage purchased.");
  4720. }
  4721. else
  4722. {
  4723. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4724. return 1;
  4725. }
  4726. }
  4727. if(listitem == 8) //Chicken
  4728. {
  4729. if(PlayerInfo[playerid][pCash] > 20)
  4730. {
  4731. GiveMoney(playerid, -20);
  4732. if(playerHP > 80)
  4733. {
  4734. SetPlayerHealth(playerid, 100.0);
  4735. }
  4736. else
  4737. {
  4738. SetPlayerHealth(playerid, playerHP + 20.0);
  4739. }
  4740. SendClientMessage(playerid, COLOR_GRAD4, "Chicken purchased.");
  4741. }
  4742. else
  4743. {
  4744. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4745. return 1;
  4746. }
  4747. }
  4748. ApplyAnimationEx(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  4749. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  4750. }
  4751. return 1;
  4752. }
  4753. if(dialogid == DIALOG_PG_MAIN) // DoC lockers
  4754. {
  4755. if(response)
  4756. {
  4757. if(listitem == 0) // Duty
  4758. {
  4759. if(PlayerInfo[playerid][pOnDuty] == 0)
  4760. {
  4761. format(str, sizeof(str), "* %s takes their bade and equipment from the locker.", PlayerICName(playerid));
  4762. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  4763. if(PlayerInfo[playerid][pMember] == 11) FakeFaction[playerid] = 5;
  4764. SetPlayerColor(playerid, COLOR_DOC_NAMETAG);
  4765. GivePlayerGun(playerid, WEAPON_NITESTICK);
  4766. GivePlayerGun(playerid, WEAPON_SPRAYCAN);
  4767. SetPlayerArmour(playerid, 100.0);
  4768. PlayerInfo[playerid][pOnDuty] = 1;
  4769. PlayerInfo[playerid][pClothes] = 0;
  4770. }
  4771. else if(PlayerInfo[playerid][pOnDuty] == 1)
  4772. {
  4773. format(str, sizeof(str), "* %s places their badge and equipment back into thes locker.", PlayerICName(playerid));
  4774. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  4775. SetPlayerColor(playerid, TCOLOR_WHITE);
  4776. ResetPlayerWeapons(playerid);
  4777. ClearGuns(playerid);
  4778. PlayerInfo[playerid][pGun1] = 0;
  4779. PlayerInfo[playerid][pGun3] = 0;
  4780. PlayerInfo[playerid][pGun5] = 0;
  4781. SetPlayerArmour(playerid, 0.0);
  4782. PlayerInfo[playerid][pClothes] = 0;
  4783. PlayerInfo[playerid][pOnDuty] = 0;
  4784. // Set off-duty skin
  4785. new undercoverskins[10];
  4786. undercoverskins[0] = 17; undercoverskins[5] = 303;
  4787. undercoverskins[1] = 185; undercoverskins[6] = 304;
  4788. undercoverskins[2] = 46; undercoverskins[7] = 305;
  4789. undercoverskins[3] = 73; undercoverskins[8] = 2;
  4790. undercoverskins[4] = 72; undercoverskins[9] = 7;
  4791. new randomnumber = random(sizeof(undercoverskins));
  4792. SetPlayerSkin(playerid, undercoverskins[randomnumber]);
  4793. PlayerInfo[playerid][pModel] = undercoverskins[randomnumber];
  4794. }
  4795. }
  4796. if(listitem == 1) // Equipment
  4797. {
  4798. 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");
  4799. }
  4800. if(listitem == 2) // Clearing
  4801. {
  4802. SendClientMessage(playerid, COLOR_YELLOW, "Please type the name of the player you want to clear.");
  4803. SAPDClearing[playerid] = 1;
  4804. }
  4805. if(listitem == 3) // Uniform
  4806. {
  4807. 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");
  4808. }
  4809. if(listitem == 4) // SWAT
  4810. {
  4811. if(PlayerInfo[playerid][pRank] < 2)
  4812. return SendClientMessage(playerid, COLOR_GREY, "This can only be used by R2+.");
  4813. SetPlayerSkin(playerid, 285);
  4814. SetPlayerArmour(playerid, 100);
  4815. }
  4816. }
  4817. return 1;
  4818. }
  4819. if(dialogid == DIALOG_PG_UNIFORM) { // DoC uniforms
  4820. if(!response)
  4821. return 1;
  4822. switch(listitem) {
  4823. case 0: SetPlayerSkin(playerid, 311);
  4824. case 1: SetPlayerSkin(playerid, 310);
  4825. case 2: SetPlayerSkin(playerid, 302);
  4826. case 3: SetPlayerSkin(playerid, 282);
  4827. case 4: SetPlayerSkin(playerid, 283);
  4828. case 5: SetPlayerSkin(playerid, 309);
  4829. }
  4830. PlayerInfo[playerid][pModel] = GetPlayerSkin(playerid);
  4831. cmd_ame(playerid, "puts on their uniform.");
  4832. }
  4833. if(dialogid == DIALOG_PG_WEAPONRY) // DoC equipment
  4834. {
  4835. if(response)
  4836. {
  4837. if(listitem == 0) // Portable MDC
  4838. {
  4839. PlayerInfo[playerid][pPortMDC] = 1;
  4840. SendClientMessage(playerid, COLOR_ORANGE, "You take a portable MDC unit from the locker.");
  4841. SendClientMessage(playerid, COLOR_ORANGE, "(( This will be lost upon death. ))");
  4842. }
  4843. if(listitem == 1) // Mace
  4844. {
  4845. if(PlayerInfo[playerid][pCash] < 20)
  4846. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4847. GiveMoney(playerid, -20);
  4848. GivePlayerGun(playerid, 41);
  4849. }
  4850. if(listitem == 2) // Night Stick
  4851. {
  4852. if(PlayerInfo[playerid][pCash] < 20)
  4853. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4854. GiveMoney(playerid, -20);
  4855. GivePlayerGun(playerid, 3);
  4856. }
  4857. if(listitem == 3) // Deagle
  4858. {
  4859. if(PlayerInfo[playerid][pCash] < 500)
  4860. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4861. GiveMoney(playerid, -500);
  4862. GivePlayerGun(playerid, 24);
  4863. }
  4864. if(listitem == 4) // Shotgun
  4865. {
  4866. if(PlayerInfo[playerid][pCash] < 200)
  4867. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4868. GiveMoney(playerid, -200);
  4869. GivePlayerGun(playerid, 25);
  4870. }
  4871. if(listitem == 5) // MP5
  4872. {
  4873. if(PlayerInfo[playerid][pCash] < 400)
  4874. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4875. GiveMoney(playerid, -400);
  4876. GivePlayerGun(playerid, 29);
  4877. }
  4878. if(listitem == 6) // Rifle
  4879. {
  4880. if(PlayerInfo[playerid][pCash] < 1000)
  4881. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4882. GiveMoney(playerid, -1000);
  4883. GivePlayerGun(playerid, 33);
  4884. }
  4885. if(listitem == 7) // M4
  4886. {
  4887. if(PlayerInfo[playerid][pCash] < 4000)
  4888. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4889. GiveMoney(playerid, -4000);
  4890. GivePlayerGun(playerid, 31);
  4891. }
  4892. if(listitem == 8) SetPlayerHealth(playerid, 100);
  4893. if(listitem == 9) { // Kevlar
  4894. if(PlayerInfo[playerid][pCash] < 1000)
  4895. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4896. GiveMoney(playerid, -1000);
  4897. SetPlayerArmour(playerid, 100);
  4898. }
  4899. if(listitem == 9) // Rubber bullets
  4900. {
  4901. if(PlayerInfo[playerid][pCash] < 100)
  4902. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4903. hasRubberBullets[playerid] = 1;
  4904. loadedRubberBullets[playerid] = false;
  4905. SendClientMessage(playerid, COLOR_YELLOW, "To use your rubber bullets, use \"/loadrubber\", this only works with a Country Rifle.");
  4906. GiveMoney(playerid, -100);
  4907. }
  4908. }
  4909. return 1;
  4910. }
  4911. if(dialogid == DIALOG_SANG_MAIN) // SANG lockers
  4912. {
  4913. if(response)
  4914. {
  4915. if(listitem == 0) // Duty
  4916. {
  4917. if(PlayerInfo[playerid][pOnDuty] == 0)
  4918. {
  4919. format(str, sizeof(str), "* %s takes their badge and equipment from the locker.", PlayerICName(playerid));
  4920. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  4921. if(PlayerInfo[playerid][pMember] == 11) FakeFaction[playerid] = FACTION_SANG;
  4922. SetPlayerColor(playerid, COLOR_SANG);
  4923. GivePlayerGun(playerid, WEAPON_NITESTICK);
  4924. GivePlayerGun(playerid, WEAPON_SPRAYCAN);
  4925. SetPlayerArmour(playerid, 100.0);
  4926. PlayerInfo[playerid][pOnDuty] = 1;
  4927. PlayerInfo[playerid][pClothes] = 0;
  4928. if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] != FACTION_SANG)
  4929. {
  4930. SetPlayerSkin(playerid, 287);
  4931. PlayerInfo[playerid][pModel] = 287;
  4932. PlayerInfo[playerid][pOnDuty] = 1;
  4933. PlayerInfo[playerid][pMember] = FACTION_SANG;
  4934. PlayerInfo[playerid][pRank] = 1;
  4935. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have been given a badge automatically (SANG Corporal)");
  4936. }
  4937. }
  4938. else if(PlayerInfo[playerid][pOnDuty] == 1)
  4939. {
  4940. format(str, sizeof(str), "* %s places their badge and equipment back into thes locker.", PlayerICName(playerid));
  4941. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  4942. SetPlayerColor(playerid, TCOLOR_WHITE);
  4943. ResetPlayerWeapons(playerid);
  4944. ClearGuns(playerid);
  4945. SetPlayerArmour(playerid, 0.0);
  4946. PlayerInfo[playerid][pClothes] = 0;
  4947. PlayerInfo[playerid][pOnDuty] = 0;
  4948. }
  4949. }
  4950. if(listitem == 1) // Equipment
  4951. {
  4952. 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");
  4953. }
  4954. if(listitem == 2) // Clearing
  4955. {
  4956. SendClientMessage(playerid, COLOR_YELLOW, "Please type the name of the player you want to clear.");
  4957. SAPDClearing[playerid] = 1;
  4958. }
  4959. if(listitem == 3) // Uniform
  4960. {
  4961. // Shows faction skin selector
  4962. ShowSkinShop(playerid, false, true, false, false, true);
  4963. }
  4964. if(listitem == 4) // Shows civilian skin selector
  4965. {
  4966. ShowSkinShop(playerid, true, false, false, false, false);
  4967. return 1;
  4968. }
  4969. }
  4970. return 1;
  4971. }
  4972. /*if(dialogid == DIALOG_SANG_UNIFORM) { // SANG uniforms
  4973. if(!response)
  4974. return 1;
  4975. switch(listitem) {
  4976. case 0: SetPlayerSkin(playerid, 287);
  4977. case 1: SetPlayerSkin(playerid, 179);
  4978. case 2: SetPlayerSkin(playerid, 191);
  4979. case 3: SetPlayerSkin(playerid, 73);
  4980. case 4: SetPlayerSkin(playerid, 46);
  4981. }
  4982. PlayerInfo[playerid][pModel] = GetPlayerSkin(playerid);
  4983. cmd_ame(playerid, "puts on their uniform.");
  4984. }*/
  4985. if(dialogid == DIALOG_SANG_WEAPONRY) // DoC equipment
  4986. {
  4987. if(response)
  4988. {
  4989. if(listitem == 0) // Portable MDC
  4990. {
  4991. PlayerInfo[playerid][pPortMDC] = 1;
  4992. SendClientMessage(playerid, COLOR_ORANGE, "You take a portable MDC unit from the locker.");
  4993. SendClientMessage(playerid, COLOR_ORANGE, "(( This will be lost upon death. ))");
  4994. }
  4995. if(listitem == 1) // Mace
  4996. {
  4997. if(PlayerInfo[playerid][pCash] < 20)
  4998. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  4999. GiveMoney(playerid, -20);
  5000. GivePlayerGun(playerid, 41);
  5001. }
  5002. if(listitem == 2) // Night Stick
  5003. {
  5004. if(PlayerInfo[playerid][pCash] < 20)
  5005. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5006. GiveMoney(playerid, -20);
  5007. GivePlayerGun(playerid, 3);
  5008. }
  5009. if(listitem == 3) // Deagle
  5010. {
  5011. if(PlayerInfo[playerid][pCash] < 500)
  5012. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5013. GiveMoney(playerid, -500);
  5014. GivePlayerGun(playerid, 24);
  5015. }
  5016. if(listitem == 4) // Shotgun
  5017. {
  5018. if(PlayerInfo[playerid][pCash] < 200)
  5019. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5020. GiveMoney(playerid, -200);
  5021. GivePlayerGun(playerid, 25);
  5022. }
  5023. if(listitem == 5) // MP5
  5024. {
  5025. if(PlayerInfo[playerid][pCash] < 400)
  5026. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5027. GiveMoney(playerid, -400);
  5028. GivePlayerGun(playerid, 29);
  5029. }
  5030. if(listitem == 6) // Rifle
  5031. {
  5032. if(PlayerInfo[playerid][pCash] < 1000)
  5033. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5034. GiveMoney(playerid, -1000);
  5035. GivePlayerGun(playerid, 33);
  5036. }
  5037. if(listitem == 7) // M4
  5038. {
  5039. if(PlayerInfo[playerid][pCash] < 4000)
  5040. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5041. GiveMoney(playerid, -4000);
  5042. GivePlayerGun(playerid, 31);
  5043. }
  5044. if(listitem == 8) // Spas-12
  5045. {
  5046. if(PlayerInfo[playerid][pCash] < 15000) // 15k
  5047. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5048. GiveMoney(playerid, -15000);
  5049. GivePlayerGun(playerid, 27);
  5050. }
  5051. if(listitem == 9) SetPlayerHealth(playerid, 100);
  5052. if(listitem == 10) { // Kevlar
  5053. if(PlayerInfo[playerid][pCash] < 1000)
  5054. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5055. GiveMoney(playerid, -1000);
  5056. SetPlayerArmour(playerid, 100);
  5057. }
  5058. if(listitem == 11) // Rubber bullets
  5059. {
  5060. if(PlayerInfo[playerid][pCash] < 100)
  5061. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5062. hasRubberBullets[playerid] = 1;
  5063. loadedRubberBullets[playerid] = false;
  5064. SendClientMessage(playerid, COLOR_YELLOW, "To use your rubber bullets, use \"/loadrubber\", this only works with a Country Rifle.");
  5065. GiveMoney(playerid, -100);
  5066. }
  5067. if(listitem == 12) // sniper rifle
  5068. {
  5069. if(PlayerInfo[playerid][pCash] < 12000) // 12k
  5070. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5071. GiveMoney(playerid, -12000);
  5072. GivePlayerGun(playerid, 34);
  5073. }
  5074. }
  5075. return 1;
  5076. }
  5077. if(dialogid == DIALOG_SAS_MAIN) //SAS
  5078. {
  5079. if(response)
  5080. {
  5081. if(listitem == 0)
  5082. {
  5083. if(PlayerInfo[playerid][pOnDuty] == 0) //if player is off duty, set them them on
  5084. {
  5085. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5086. format(str, sizeof(str), "* %s %s takes a Badge from their locker.", GetPlayerRank(playerid), sendername);
  5087. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5088. if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
  5089. {
  5090. SetPlayerColor(playerid, TCOLOR_SAS);
  5091. }
  5092. PlayerInfo[playerid][pOnDuty] = 1;
  5093. }
  5094. else if(PlayerInfo[playerid][pOnDuty] == 1) //if player is on duty, set them off
  5095. {
  5096. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5097. if(PlayerInfo[playerid][pMember] == 15)
  5098. {
  5099. format(str, sizeof(str), "* %s %s places a Badge in their locker.", GetPlayerRank(playerid), sendername);
  5100. }
  5101. else
  5102. {
  5103. format(str, sizeof(str), "* %s %s places a Badge in their locker.", GetPlayerRank(playerid), sendername);
  5104. }
  5105. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5106. SetPlayerColor(playerid, TCOLOR_WHITE);
  5107. PlayerInfo[playerid][pOnDuty] = 0;
  5108. TogglePlayerControllable(playerid, true);
  5109. }
  5110. return 1;
  5111. }
  5112. if(listitem == 1)
  5113. {
  5114. SendClientMessage(playerid, COLOR_GREY, "This feature is deprecated.");
  5115. return 1;
  5116. }
  5117. if(listitem == 2)
  5118. {
  5119. if(PlayerInfo[playerid][pCash] < 5000)
  5120. {
  5121. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5122. TogglePlayerControllable(playerid, true);
  5123. return 1;
  5124. }
  5125. else
  5126. {
  5127. GiveMoney(playerid, -5000);
  5128. SetPlayerHealth(playerid, 100);
  5129. SetPlayerArmour(playerid, 100);
  5130. SendClientMessage(playerid, COLOR_GREY, "Health and Kevlar replenished.");
  5131. TogglePlayerControllable(playerid, true);
  5132. }
  5133. }
  5134. if(listitem == 3)
  5135. {
  5136. if(PlayerInfo[playerid][pCash] < 5000)
  5137. {
  5138. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5139. TogglePlayerControllable(playerid, true);
  5140. return 1;
  5141. }
  5142. else
  5143. {
  5144. GiveMoney(playerid, -1000);
  5145. GivePlayerGun(playerid, 22);
  5146. SendClientMessage(playerid, COLOR_GREY, "You've purchased a Colt45.");
  5147. TogglePlayerControllable(playerid, true);
  5148. }
  5149. }
  5150. }
  5151. return 1;
  5152. }
  5153. if(dialogid == DIALOG_S9_MAIN) // Sector 9 locker
  5154. {
  5155. if(response)
  5156. {
  5157. if(listitem == 0) // Armory
  5158. return showS9Dialog(playerid);
  5159. if(listitem == 1) // Clothes
  5160. {
  5161. return SendClientMessage(playerid, COLOR_LIGHTRED, "Feature is disabled.");
  5162. /* DestroySelectionMenu(playerid);
  5163. SetPVarInt(playerid, "skinc_active", 1);
  5164. CreateSelectionMenu(playerid);
  5165. SelectTextDraw(playerid, 0xACCBF1FF); */
  5166. }
  5167. if(listitem == 2) // Restricted Clothes
  5168. {
  5169. new diastr[2000];
  5170. strcat(diastr, "Agent\t(286)\t\n");
  5171. strcat(diastr, "S.W.A.T Special Forces\t(285)\t\n");
  5172. strcat(diastr, "San Andreas Army\t(287)\t\n");
  5173. strcat(diastr, "Desert Sherrif (Chief)\t(288)\t\n");
  5174. strcat(diastr, "County Sheriff\t(283)\t\n");
  5175. strcat(diastr, "Las Venturas Police Officer\t(282)\t\n");
  5176. strcat(diastr, "San Fierro Police Officer\t(281)\t\n");
  5177. strcat(diastr, "Los Santos Police Officer\t(280)\t\n");
  5178. strcat(diastr, "Officer Tenpenny\t(265)\t\n");
  5179. strcat(diastr, "Officer Pulaski\t(266)\t\n");
  5180. strcat(diastr, "Officer Hernandez\t(267)\t\n");
  5181. strcat(diastr, "White MIB Agent\t(165)\t\n");
  5182. strcat(diastr, "Black MIB Agent\t(166)\t\n");
  5183. strcat(diastr, "Black (White Shirt) Medic\t(274)\t\n");
  5184. strcat(diastr, "White (Blue Shirt) Medic\t(275)\t\n");
  5185. strcat(diastr, "White (Green Shirt) Medic\t(276)\t\n");
  5186. strcat(diastr, "Firefighter (White)\t(277)\t\n");
  5187. strcat(diastr, "Firefighter (Black)\t(278)\t\n");
  5188. strcat(diastr, "San Fierro Figherfighter\t(279)\t\n");
  5189. strcat(diastr, "LSPD Motorbike Cop\t(284)\t");
  5190. ShowPlayerDialog(playerid, DIALOG_S9_RESTRICTED, DIALOG_STYLE_TABLIST, "S9 Skins", diastr, "Select", "Back");
  5191. }
  5192. if(listitem == 3) // Badges
  5193. {
  5194. new diastr[2000];
  5195. strcat(diastr, "Los Santos Police Department\t(1)\t{23c62e}(Enabled){ffffff}\n");
  5196. strcat(diastr, "Federal Bureau of Investigation\t(2)\t{23c62e}(Enabled){ffffff}\n");
  5197. strcat(diastr, "San Andreas Sheriffs Department\t(3)\t{ff4949}(Disabled){ffffff}\n");
  5198. strcat(diastr, "San Andreas Fire & Medical Department\t(4)\t{23c62e}(Enabled){ffffff}\n");
  5199. strcat(diastr, "Department of Corrections\t(5)\t{23c62e}(Enabled){ffffff}\n");
  5200. strcat(diastr, "Government\t(6)\t{23c62e}(Enabled){ffffff}\n");
  5201. strcat(diastr, "Judicial Department\t(7)\t{ff4949}(Disabled){ffffff}\n");
  5202. strcat(diastr, "San Andreas National Guard\t(14)\t{23c62e}(Enabled){ffffff}\n");
  5203. strcat(diastr, "Civilian\t(0)\t");
  5204. ShowPlayerDialog(playerid, DIALOG_S9_BADGES, DIALOG_STYLE_TABLIST, "Faction Badges", diastr, "Select", "Back");
  5205. }
  5206. }
  5207. return 1;
  5208. }
  5209. if(dialogid == DIALOG_S9_RESTRICTED)
  5210. {
  5211. if(!response)
  5212. {
  5213. new bool: Admin;
  5214. foreach( new i: Player )
  5215. {
  5216. if(PlayerInfo[i][pAdmin] > 0)
  5217. {
  5218. Admin = true;
  5219. break;
  5220. }
  5221. }
  5222. 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");
  5223. 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");
  5224. }
  5225. else
  5226. {
  5227. if(listitem == 0) return SetPlayerSkin(playerid, 286);//fbi
  5228. if(listitem == 1)
  5229. {
  5230. SetPlayerSkin(playerid, 285); //swat
  5231. SetPlayerArmour(playerid, 100); // swat skins are granted 100 armor
  5232. }
  5233. if(listitem == 2)
  5234. {
  5235. SetPlayerSkin(playerid, 287); //sang
  5236. SetPlayerArmour(playerid, 100);
  5237. }
  5238. if(listitem == 3) return SetPlayerSkin(playerid, 288);//Chief
  5239. if(listitem == 4) return SetPlayerSkin(playerid, 283);//County Sherrif
  5240. if(listitem == 5) return SetPlayerSkin(playerid, 282);//lvpd cop
  5241. if(listitem == 6) return SetPlayerSkin(playerid, 281);//sfpd cop
  5242. if(listitem == 7) return SetPlayerSkin(playerid, 280);//lspd cop
  5243. if(listitem == 8) return SetPlayerSkin(playerid, 265);//tenpenny
  5244. if(listitem == 9) return SetPlayerSkin(playerid, 266);//pulaski
  5245. if(listitem == 10) return SetPlayerSkin(playerid, 267);//hernandez
  5246. if(listitem == 11) return SetPlayerSkin(playerid, 165);//white mib
  5247. if(listitem == 12) return SetPlayerSkin(playerid, 166);//black mib
  5248. if(listitem == 13) return SetPlayerSkin(playerid, 274);//Black (White Shirt) Medic
  5249. if(listitem == 14) return SetPlayerSkin(playerid, 275);//White (Blue Shirt) Medic
  5250. if(listitem == 15) return SetPlayerSkin(playerid, 267);//White (Green Shirt) Medic
  5251. if(listitem == 16) return SetPlayerSkin(playerid, 277);//Firefighter (White)
  5252. if(listitem == 17) return SetPlayerSkin(playerid, 278);//Firefighter (Black)
  5253. if(listitem == 18) return SetPlayerSkin(playerid, 279);//San Fierro Figherfighter
  5254. if(listitem == 19) return SetPlayerSkin(playerid, 284);//LSPD Motorbike Cop
  5255. PlayerInfo[playerid][pClothes] = GetPlayerSkin(playerid);
  5256. }
  5257. return 1;
  5258. }
  5259. if(dialogid == DIALOG_S9_BADGES)
  5260. {
  5261. if(!response) return ShowS9Armory(playerid);
  5262. ChosenFaction[playerid] = listitem + 1;
  5263. if(listitem == 7) ChosenFaction[playerid] = 14; // SANG is ID 14, different from how this system works
  5264. // If civillian
  5265. if(listitem == 8) {
  5266. SetPlayerColor(playerid, TCOLOR_WHITE);
  5267. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Tip: You can also use '/removebadge'.");
  5268. ChosenFaction[playerid] = 0;
  5269. PlayerInfo[playerid][pOnDuty] = 0;
  5270. return 1;
  5271. }
  5272. // Disabled badges
  5273. if(listitem == 6 || listitem == 2) {
  5274. SendClientMessage(playerid, COLOR_GREY, "That badge is disabled.");
  5275. return ShowS9Armory(playerid);
  5276. }
  5277. // Let the player know which faction he has selected.
  5278. format(str, sizeof(str), "You have selected: %s", GetFactionName(ChosenFaction[playerid]));
  5279. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  5280. // Now to change the rank.
  5281. new diastr[300];
  5282. format(str, sizeof(str), "Change rank for %s.", GetFactionName(ChosenFaction[playerid]));
  5283. // Just adds the rank name to the list item. (e.g. Rank 0 - Cadet)
  5284. format(diastr, sizeof(diastr), "Rank 0 - %s\n", GetFactionRankName(ChosenFaction[playerid], 0));
  5285. format(diastr, sizeof(diastr), "%sRank 1 - %s\n", diastr, GetFactionRankName(ChosenFaction[playerid], 1));
  5286. format(diastr, sizeof(diastr), "%sRank 2 - %s\n", diastr, GetFactionRankName(ChosenFaction[playerid], 2));
  5287. if(PlayerInfo[playerid][pGroupRank] >= GROUP_S9_RANKS-1) {
  5288. format(diastr, sizeof(diastr), "%sRank 3 - %s\n", diastr, GetFactionRankName(ChosenFaction[playerid], 3));
  5289. format(diastr, sizeof(diastr), "%sRank 4 - %s", diastr, GetFactionRankName(ChosenFaction[playerid], 4));
  5290. } else {
  5291. format(diastr, sizeof(diastr), "%sRank 3 - %s", diastr, GetFactionRankName(ChosenFaction[playerid], 3));
  5292. }
  5293. ShowPlayerDialog(playerid, DIALOG_S9_RANKS, DIALOG_STYLE_LIST, str, diastr, "Confirm", "Cancel");
  5294. return 1;
  5295. }
  5296. if(dialogid == DIALOG_S9_RANKS) {
  5297. if(!response) return ShowS9Armory(playerid);
  5298. new skin;
  5299. ChosenRank[playerid] = listitem;
  5300. switch(ChosenFaction[playerid])
  5301. {
  5302. case FACTION_SAPD:
  5303. {
  5304. SetPlayerColor(playerid, TCOLOR_BLUE);
  5305. // To change the player's skin.
  5306. switch(ChosenRank[playerid])
  5307. {
  5308. case 0: skin = 71; // Cadet
  5309. case 1: skin = 280; // Officer
  5310. case 2: skin = 281; // Senior Officer
  5311. case 3: skin = 282; // Sargent
  5312. }
  5313. }
  5314. case FACTION_FBI:
  5315. {
  5316. SetPlayerColor(playerid, TCOLOR_NAVYBLUE);
  5317. skin = 286; // FBI skin
  5318. }
  5319. case FACTION_FMD:
  5320. {
  5321. SetPlayerColor(playerid, TCOLOR_PARAMEDIC);
  5322. switch(ChosenRank[playerid])
  5323. {
  5324. case 0: skin = 276; // Trainee
  5325. case 1..3: skin = 275; // R1-R3
  5326. }
  5327. }
  5328. case FACTION_ARMY:
  5329. {
  5330. SetPlayerColor(playerid, COLOR_DOC_NAMETAG);
  5331. skin = 287; // Army skin
  5332. }
  5333. case 6: // Senate
  5334. {
  5335. SetPlayerColor(playerid, TCOLOR_SENATE);
  5336. skin = 165; // White MIB
  5337. }
  5338. case FACTION_SANG:
  5339. {
  5340. SetPlayerColor(playerid, COLOR_SANG);
  5341. skin = 287; // Army skin
  5342. }
  5343. }
  5344. SetPlayerSkin(playerid, skin);
  5345. PlayerInfo[playerid][pModel] = skin;
  5346. PlayerInfo[playerid][pOnDuty] = 1;
  5347. PlayerInfo[playerid][pMember] = ChosenFaction[playerid];
  5348. PlayerInfo[playerid][pRank] = ChosenRank[playerid];
  5349. format(str, sizeof(str), "You are now a %s %s.", GetFactionName(ChosenFaction[playerid]), GetFactionRankName(ChosenFaction[playerid], ChosenRank[playerid]));
  5350. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  5351. format(customRank[playerid], 24, "%s", GetFactionRankName(ChosenFaction[playerid], ChosenRank[playerid]));
  5352. customRankName[playerid] = true;
  5353. ChosenFaction[playerid] = 0;
  5354. ChosenRank[playerid] = 0;
  5355. return 1;
  5356. }
  5357. if(dialogid == DIALOG_S9_ARMORY)
  5358. {
  5359. if(!response) return ShowS9Armory(playerid);
  5360. if(response)
  5361. {
  5362. if(!IsPlayerNearSector9HQ(playerid))
  5363. return SendClientMessage(playerid, COLOR_GREY, "You are not at your headquarters.");
  5364. new money = PlayerInfo[playerid][pCash];
  5365. switch(listitem)
  5366. {
  5367. case 0: // Desert Eagle
  5368. {
  5369. if(money >= 1000) {
  5370. GiveMoney(playerid, -1000);
  5371. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5372. GivePlayerGun(playerid, WEAPON_DEAGLE);
  5373. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a Desert Eagle for $2,500.");
  5374. } else {
  5375. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5376. }
  5377. }
  5378. case 1: // SD Pistol
  5379. {
  5380. if(money >= 1500) {
  5381. GiveMoney(playerid, -1500);
  5382. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5383. GivePlayerGun(playerid, WEAPON_SILENCED);
  5384. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased an SD Pistol for $5,000.");
  5385. } else {
  5386. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5387. }
  5388. }
  5389. case 2: // Break
  5390. {
  5391. showS9Dialog(playerid);
  5392. }
  5393. case 3: // M4
  5394. {
  5395. if(money >= 6000) {
  5396. GiveMoney(playerid, -6000);
  5397. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5398. GivePlayerGun(playerid, WEAPON_M4);
  5399. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased an M4 for $12,500.");
  5400. } else {
  5401. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5402. }
  5403. }
  5404. case 4: // AK47
  5405. {
  5406. if(money >= 4000) {
  5407. GiveMoney(playerid, -4000);
  5408. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5409. GivePlayerGun(playerid, WEAPON_AK47);
  5410. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased an AK47 for $7,500.");
  5411. } else {
  5412. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5413. }
  5414. }
  5415. case 5: // Break
  5416. {
  5417. showS9Dialog(playerid);
  5418. }
  5419. case 6: // Spas12
  5420. {
  5421. if(money >= 9000) {
  5422. GiveMoney(playerid, -9000);
  5423. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5424. GivePlayerGun(playerid, WEAPON_SHOTGSPA);
  5425. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a combat shotgun for $25,000.");
  5426. } else {
  5427. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5428. }
  5429. }
  5430. case 7: // Shotgun
  5431. {
  5432. if(money >= 1000) {
  5433. GiveMoney(playerid, -1000);
  5434. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5435. GivePlayerGun(playerid, WEAPON_SHOTGUN);
  5436. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a shotgun for $2,000.");
  5437. } else {
  5438. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5439. }
  5440. }
  5441. case 8: // Sawn off
  5442. {
  5443. if(money >= 3000) {
  5444. GiveMoney(playerid, -3000);
  5445. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5446. GivePlayerGun(playerid, WEAPON_SAWEDOFF);
  5447. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a sawn-off shotgun for $7,500.");
  5448. } else {
  5449. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5450. }
  5451. }
  5452. case 9: // Break
  5453. {
  5454. showS9Dialog(playerid);
  5455. }
  5456. case 10: // MP5
  5457. {
  5458. if(money >= 1000) {
  5459. GiveMoney(playerid, -1000);
  5460. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5461. GivePlayerGun(playerid, WEAPON_MP5);
  5462. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased an MP5 for $1,000.");
  5463. } else {
  5464. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5465. }
  5466. }
  5467. case 11: // TEC9
  5468. {
  5469. if(money >= 1500) {
  5470. GiveMoney(playerid, -1500);
  5471. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5472. GivePlayerGun(playerid, WEAPON_TEC9);
  5473. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a TEC9 for $2,500.");
  5474. } else {
  5475. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5476. }
  5477. }
  5478. case 12: // Uzi
  5479. {
  5480. if(money >= 1500) {
  5481. GiveMoney(playerid, -1500);
  5482. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5483. GivePlayerGun(playerid, WEAPON_UZI);
  5484. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased an Uzi for $2,500.");
  5485. } else {
  5486. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5487. }
  5488. }
  5489. case 13: // Break
  5490. {
  5491. showS9Dialog(playerid);
  5492. }
  5493. case 14: // Rifle
  5494. {
  5495. if(money >= 2000) {
  5496. GiveMoney(playerid, -2000);
  5497. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5498. GivePlayerGun(playerid, WEAPON_RIFLE);
  5499. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a country rifle for $2,500.");
  5500. } else {
  5501. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5502. }
  5503. }
  5504. case 15: // Sniper Rifle
  5505. {
  5506. if(money >= 7000) {
  5507. GiveMoney(playerid, -7000);
  5508. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5509. GivePlayerGun(playerid, WEAPON_SNIPER);
  5510. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a sniper rifle for $15,000.");
  5511. } else {
  5512. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5513. }
  5514. }
  5515. case 16: // Break
  5516. {
  5517. showS9Dialog(playerid);
  5518. }
  5519. case 17: // Flamethrower
  5520. {
  5521. if(money >= 8000) {
  5522. GiveMoney(playerid, -8000);
  5523. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5524. GivePlayerGun(playerid, WEAPON_FLAMETHROWER);
  5525. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a flamethrower for $20,000.");
  5526. } else {
  5527. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5528. }
  5529. }
  5530. case 18: // C4
  5531. {
  5532. if(money >= 5000) {
  5533. GiveMoney(playerid, -5000);
  5534. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5535. PlayerInfo[playerid][pBombs] += 1;
  5536. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a block of plastic explosive for $10,000.");
  5537. } else {
  5538. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5539. }
  5540. }
  5541. case 19: // Break
  5542. {
  5543. showS9Dialog(playerid);
  5544. }
  5545. case 20: // Chainsaw
  5546. {
  5547. if(money >= 5000) {
  5548. GiveMoney(playerid, -5000);
  5549. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5550. GivePlayerGun(playerid, WEAPON_CHAINSAW);
  5551. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a chainsaw for $5,000.");
  5552. } else {
  5553. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5554. }
  5555. }
  5556. case 21: // Knife
  5557. {
  5558. if(money >= 1000) {
  5559. GiveMoney(playerid, -1000);
  5560. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5561. GivePlayerGun(playerid, WEAPON_KNIFE);
  5562. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased a knife for $1,000.");
  5563. } else {
  5564. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5565. }
  5566. }
  5567. case 22: // Break
  5568. {
  5569. showS9Dialog(playerid);
  5570. }
  5571. case 23: // Tear Gas
  5572. {
  5573. if(money >= 1000) {
  5574. GiveMoney(playerid, -1000);
  5575. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5576. GivePlayerGun(playerid, WEAPON_TEARGAS);
  5577. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased two canisters of tear gas for $2,500.");
  5578. } else {
  5579. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5580. }
  5581. }
  5582. case 24: // Grenades
  5583. {
  5584. //SendClientMessage(playerid, COLOR_GREY, "Grenades have been disabled.");
  5585. if(money >= 2500) {
  5586. GiveMoney(playerid, -2500);
  5587. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5588. GivePlayerGun(playerid, WEAPON_GRENADE);
  5589. } else {
  5590. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5591. }
  5592. }
  5593. case 25: // Molotov Cocktail
  5594. {
  5595. if(money >= 2500) {
  5596. GiveMoney(playerid, -2500);
  5597. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5598. GivePlayerGun(playerid, WEAPON_MOLTOV);
  5599. } else {
  5600. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5601. }
  5602. }
  5603. case 26: // Break
  5604. {
  5605. showS9Dialog(playerid);
  5606. }
  5607. case 27: // Health and Armour
  5608. {
  5609. if(money >= 1000) {
  5610. GiveMoney(playerid, -1000);
  5611. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5612. SetPlayerHealth(playerid, 100.0);
  5613. SetPlayerArmour(playerid, 100.0);
  5614. } else {
  5615. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5616. }
  5617. }
  5618. case 28: // Half Vest
  5619. {
  5620. if(money >= 500) {
  5621. GiveMoney(playerid, -1000);
  5622. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5623. SetPlayerArmour(playerid, 50.0);
  5624. } else {
  5625. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't afford that.");
  5626. }
  5627. }
  5628. case 29: // Break
  5629. {
  5630. showS9Dialog(playerid);
  5631. }
  5632. case 30: // Jammer
  5633. {
  5634. if(money >= 1000)
  5635. {
  5636. GiveMoney(playerid, -1000);
  5637. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5638. PlayerInfo[playerid][pJammer] += 1;
  5639. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased a signal jammer for $1,000.");
  5640. }
  5641. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  5642. }
  5643. case 31: // Lock pick
  5644. {
  5645. if(money >= 1000)
  5646. {
  5647. if(PlayerInfo[playerid][pHasLockPick] == 1)
  5648. return SendClientMessage(playerid, COLOR_GREY, "You already have a lock pick kit.");
  5649. GiveMoney(playerid, -1000);
  5650. PlayerInfo[playerid][pHasLockPick] = 1;
  5651. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased a lock pick kit for $5,000.");
  5652. }
  5653. else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for that.");
  5654. }
  5655. }
  5656. }
  5657. }
  5658. if(dialogid == DIALOG_LEO_MAIN) //SAPD
  5659. {
  5660. if(response)
  5661. {
  5662. switch(listitem)
  5663. {
  5664. case 0:
  5665. {
  5666. if(PlayerInfo[playerid][pOnDuty] == 0) //if player is off duty, set them them on
  5667. {
  5668. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5669. format(str, sizeof(str), "* %s %s retrieves his equipment from his locker and equips his badge & body camera.", GetPlayerRank(playerid), sendername);
  5670. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5671. if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 11)
  5672. {
  5673. if(PlayerInfo[playerid][pMember] == 11) FakeFaction[playerid] = 1;
  5674. SetPlayerColor(playerid, TCOLOR_BLUE);
  5675. }
  5676. else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 11)
  5677. {
  5678. if(PlayerInfo[playerid][pMember] == 11) FakeFaction[playerid] = 2;
  5679. SetPlayerColor(playerid, TCOLOR_NAVYBLUE);
  5680. }
  5681. else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 11)
  5682. {
  5683. if(PlayerInfo[playerid][pMember] == 11) FakeFaction[playerid] = 3;
  5684. SetPlayerColor(playerid, TCOLOR_BEIGE);
  5685. }
  5686. GivePlayerGun(playerid, 24);
  5687. GivePlayerGun(playerid, 41);
  5688. GivePlayerGun(playerid, 3);
  5689. SetPlayerArmour(playerid, 100.0);
  5690. PlayerInfo[playerid][pOnDuty] = 1;
  5691. TogglePlayerControllable(playerid, true);
  5692. if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] != FACTION_SAPD && IsPlayerNearSAPDHQ(playerid))
  5693. {
  5694. SetPlayerSkin(playerid, 280);
  5695. PlayerInfo[playerid][pModel] = 280;
  5696. customRankName[playerid] = false;
  5697. PlayerInfo[playerid][pOnDuty] = 1;
  5698. PlayerInfo[playerid][pMember] = FACTION_SAPD;
  5699. PlayerInfo[playerid][pRank] = 1;
  5700. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have been given a badge automatically (SAPD Officer)");
  5701. }
  5702. else if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] != FACTION_FBI && IsPlayerNearFBIHQ(playerid))
  5703. {
  5704. SetPlayerSkin(playerid, 286);
  5705. PlayerInfo[playerid][pModel] = 286;
  5706. customRankName[playerid] = false;
  5707. PlayerInfo[playerid][pOnDuty] = 1;
  5708. PlayerInfo[playerid][pMember] = FACTION_FBI;
  5709. PlayerInfo[playerid][pRank] = 1;
  5710. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have been given a badge automatically (FBI Staff)");
  5711. }
  5712. }
  5713. else if(PlayerInfo[playerid][pOnDuty] == 1) //if player is on duty, set them off
  5714. {
  5715. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5716. if(PlayerInfo[playerid][pMember] == 2)
  5717. {
  5718. format(str, sizeof(str), "* %s %s places his equipment inside his locker and removes his badge & body camera.", GetPlayerRank(playerid), sendername);
  5719. }
  5720. else
  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. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5725. SetPlayerColor(playerid, TCOLOR_WHITE);
  5726. PlayerInfo[playerid][pGun2] = 0;
  5727. PlayerInfo[playerid][pGun9] = 0;
  5728. PlayerInfo[playerid][pGun1] = 0;
  5729. ResetPlayerWeapons(playerid);
  5730. ClearGuns(playerid);
  5731. SetPlayerArmour(playerid, 0.0);
  5732. PlayerInfo[playerid][pOnDuty] = 0;
  5733. TogglePlayerControllable(playerid, true);
  5734. PlayerInfo[playerid][pHandtazer] = 0;
  5735. PlayerInfo[playerid][ptazerGun] = 0;
  5736. GivePlayerGun(playerid, 24);
  5737. if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
  5738. {
  5739. GivePlayerGun(playerid, 29);
  5740. }
  5741. }
  5742. return 1;
  5743. }
  5744. case 1:
  5745. {
  5746. // Shows civilian skin selector
  5747. ShowSkinShop(playerid, true, false, false, false, false);
  5748. return 1;
  5749. }
  5750. case 2:
  5751. {
  5752. // Shows faction skin selector
  5753. ShowSkinShop(playerid, false, true, false, false, true);
  5754. return 1;
  5755. }
  5756. case 3:
  5757. {
  5758. showSAPDDialog(playerid);
  5759. }
  5760. case 4:
  5761. {
  5762. if(PlayerInfo[playerid][pMember] == FACTION_SAPD && PlayerInfo[playerid][pRank] < 2)
  5763. {
  5764. SendClientMessage(playerid, COLOR_GREY, "Only R2s+ are able to use this.");
  5765. TogglePlayerControllable(playerid, true);
  5766. return 1;
  5767. }
  5768. ShowPlayerDialog(playerid, DIALOG_SAPD_SWAT, DIALOG_STYLE_LIST, "SWAT", "Weapons\nAccessories\nSWAT Uniform", "Select", "Back");
  5769. }
  5770. case 5:
  5771. {
  5772. SendClientMessage(playerid, COLOR_YELLOW, "Please type the name of the player you want to clear.");
  5773. SAPDClearing[playerid] = 1;
  5774. }
  5775. case 6:
  5776. {
  5777. SendClientMessage(playerid, COLOR_YELLOW, "Please type the name of the player you want to release.");
  5778. SAPDClearing[playerid] = 2;
  5779. }
  5780. case 7: // Namechange
  5781. {
  5782. new bool: Admin;
  5783. foreach( new i: Player )
  5784. {
  5785. if(PlayerInfo[i][pAdmin] > 1)
  5786. {
  5787. Admin = true;
  5788. break;
  5789. }
  5790. }
  5791. 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");
  5792. else ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Namechange", "There are no administrators online that can handle your namechange request!", "Okay", "");
  5793. }
  5794. }
  5795. }
  5796. return 1;
  5797. }
  5798. if(dialogid == DIALOG_FREE_NAMECHANGE)
  5799. {
  5800. if(response)
  5801. {
  5802. 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");
  5803. 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");
  5804. 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");
  5805. new bool: Admin;
  5806. foreach( new i: Player )
  5807. {
  5808. if(PlayerInfo[i][pAdmin] >= 1)
  5809. {
  5810. Admin = true;
  5811. break;
  5812. }
  5813. }
  5814. if(Admin)
  5815. {
  5816. format(str, sizeof(str), "{FFFFFF}Are you sure you want to change your name to %s for free?", inputtext);
  5817. ShowPlayerDialog(playerid, DIALOG_FREE_NAMECHANGE1, DIALOG_STYLE_MSGBOX, "Namechange", str, "Confirm", "Back");
  5818. strmid(NameChangeRequest[playerid], inputtext, 0, strlen(inputtext), 255);
  5819. }
  5820. else
  5821. {
  5822. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Namechange", "There are no administrators online that can handle your namechange request anymore!", "Okay", "");
  5823. strmid(NameChangeRequest[playerid], "0", 0, 255);
  5824. }
  5825. }
  5826. else
  5827. {
  5828. if(IsPlayerInRangeOfPoint(playerid, 3, 226.7504, 122.7705, 999.0406))
  5829. {
  5830. new bool: Admin;
  5831. foreach( new i: Player )
  5832. {
  5833. if(PlayerInfo[i][pAdmin] > 0)
  5834. {
  5835. Admin = true;
  5836. break;
  5837. }
  5838. }
  5839. 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");
  5840. 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");
  5841. }
  5842. }
  5843. }
  5844. if(dialogid == DIALOG_FREE_NAMECHANGE1)
  5845. {
  5846. if(response)
  5847. {
  5848. new query[128];
  5849. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name` FROM `players` WHERE `Name` = '%e' LIMIT 1", NameChangeRequest[playerid]);
  5850. mysql_pquery(sqlGameConnection, query, "OnNamechange", "is", playerid, NameChangeRequest[playerid]);
  5851. format(str, sizeof(str), "Your free namechange request to %s has been dispatched to Administrators.", NameChangeRequest[playerid]);
  5852. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Namechange", str, "Okay", "");
  5853. }
  5854. else
  5855. {
  5856. new bool: Admin;
  5857. foreach( new i: Player )
  5858. {
  5859. if(PlayerInfo[i][pAdmin] > 1)
  5860. {
  5861. Admin = true;
  5862. break;
  5863. }
  5864. }
  5865. 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");
  5866. else ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Namechange", "There are no administrators online that can handle your namechange request!", "Okay", "");
  5867. }
  5868. }
  5869. if(dialogid == DIALOG_SAPD_WEAPONRY)
  5870. {
  5871. if(response)
  5872. {
  5873. if(listitem == 0) // Portable MDC
  5874. {
  5875. PlayerInfo[playerid][pPortMDC] = 1;
  5876. SendClientMessage(playerid, COLOR_ORANGE, "You take a portable MDC unit from the locker.");
  5877. SendClientMessage(playerid, COLOR_ORANGE, "(( This will be lost upon death. ))");
  5878. }
  5879. if(listitem == 1) // Mace
  5880. {
  5881. if(PlayerInfo[playerid][pCash] < 20)
  5882. {
  5883. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5884. TogglePlayerControllable(playerid, true);
  5885. return 1;
  5886. }
  5887. else
  5888. {
  5889. GiveMoney(playerid, -20);
  5890. GivePlayerGun(playerid, 41);
  5891. TogglePlayerControllable(playerid, true);
  5892. }
  5893. }
  5894. if(listitem == 2) // Night Stick
  5895. {
  5896. if(PlayerInfo[playerid][pCash] < 20)
  5897. {
  5898. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5899. TogglePlayerControllable(playerid, true);
  5900. return 1;
  5901. }
  5902. else
  5903. {
  5904. GiveMoney(playerid, -20);
  5905. GivePlayerGun(playerid, 3);
  5906. TogglePlayerControllable(playerid, true);
  5907. }
  5908. }
  5909. if(listitem == 3) // Deagle
  5910. {
  5911. if(PlayerInfo[playerid][pCash] < 500)
  5912. {
  5913. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5914. TogglePlayerControllable(playerid, true);
  5915. return 1;
  5916. }
  5917. else
  5918. {
  5919. GiveMoney(playerid, -500);
  5920. GivePlayerGun(playerid, 24);
  5921. TogglePlayerControllable(playerid, true);
  5922. }
  5923. }
  5924. if(listitem == 4) //Shotgun
  5925. {
  5926. if(PlayerInfo[playerid][pCash] < 200)
  5927. {
  5928. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5929. TogglePlayerControllable(playerid, true);
  5930. return 1;
  5931. }
  5932. else
  5933. {
  5934. GiveMoney(playerid, -200);
  5935. GivePlayerGun(playerid, 25);
  5936. TogglePlayerControllable(playerid, true);
  5937. }
  5938. }
  5939. if(listitem == 5) //MP5
  5940. {
  5941. if(PlayerInfo[playerid][pCash] < 400)
  5942. {
  5943. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5944. TogglePlayerControllable(playerid, true);
  5945. return 1;
  5946. }
  5947. else
  5948. {
  5949. GiveMoney(playerid, -400);
  5950. GivePlayerGun(playerid, 29);
  5951. TogglePlayerControllable(playerid, true);
  5952. }
  5953. }
  5954. if(listitem == 6) //Rifle
  5955. {
  5956. if(PlayerInfo[playerid][pCash] < 1000)
  5957. {
  5958. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5959. TogglePlayerControllable(playerid, true);
  5960. return 1;
  5961. }
  5962. else
  5963. {
  5964. GiveMoney(playerid, -1000);
  5965. GivePlayerGun(playerid, 33);
  5966. TogglePlayerControllable(playerid, true);
  5967. }
  5968. }
  5969. if(listitem == 7) //M4
  5970. {
  5971. if(PlayerInfo[playerid][pCash] < 6000)
  5972. {
  5973. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5974. TogglePlayerControllable(playerid, true);
  5975. return 1;
  5976. }
  5977. else
  5978. {
  5979. GiveMoney(playerid, -6000);
  5980. GivePlayerGun(playerid, 31);
  5981. TogglePlayerControllable(playerid, true);
  5982. }
  5983. }
  5984. if(listitem == 8) //first aid
  5985. {
  5986. if(PlayerInfo[playerid][pCash] < 200)
  5987. {
  5988. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  5989. TogglePlayerControllable(playerid, true);
  5990. return 1;
  5991. }
  5992. else
  5993. {
  5994. format(str, sizeof(str), "* %s %s has used a first aid kit.", GetPlayerRank(playerid), PlayerICName(playerid));
  5995. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5996. GiveMoney(playerid, -200);
  5997. SetPlayerHealth(playerid, 100.0);
  5998. TogglePlayerControllable(playerid, true);
  5999. }
  6000. }
  6001. if(listitem == 9) //kevlar
  6002. {
  6003. if(PlayerInfo[playerid][pCash] < 1000)
  6004. {
  6005. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6006. TogglePlayerControllable(playerid, true);
  6007. return 1;
  6008. }
  6009. else
  6010. {
  6011. SetPlayerArmour(playerid, 100.0);
  6012. GiveMoney(playerid, -1000);
  6013. }
  6014. }
  6015. if(listitem == 10) //rubber bullets
  6016. {
  6017. if(PlayerInfo[playerid][pRank] < 2 && IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Only rank 2+ can use this.");
  6018. if(PlayerInfo[playerid][pRank] < 1 && IsAFBI(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Only rank 1+ can use this.");
  6019. if(PlayerInfo[playerid][pCash] < 100)
  6020. {
  6021. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6022. TogglePlayerControllable(playerid, true);
  6023. return 1;
  6024. }
  6025. else
  6026. {
  6027. hasRubberBullets[playerid] = 1;
  6028. loadedRubberBullets[playerid] = false;
  6029. SendClientMessage(playerid, COLOR_YELLOW, "To use your rubber bullets, use \"/loadrubber\", this only works with a Country Rifle.");
  6030. GiveMoney(playerid, -100);
  6031. }
  6032. }
  6033. if(listitem == 11) //C2 explosives
  6034. {
  6035. if(PlayerInfo[playerid][pMember] == FACTION_SAPD && PlayerInfo[playerid][pRank] < 3) return SendClientMessage( playerid, COLOR_GREY, "You do not have access to this equipment ((R3+))." );
  6036. if( PlayerInfo[playerid][pCash] < 80000 ) {
  6037. SendClientMessage( playerid, COLOR_GREY, "You can't afford that." );
  6038. TogglePlayerControllable( playerid, true );
  6039. return 1;
  6040. }
  6041. else {
  6042. GiveMoney( playerid, -80000 );
  6043. PlayerInfo[playerid][pHasCBomb] = 1;
  6044. SendClientMessage( playerid, COLOR_YELLOW, "To deploy this explosive use \"/deployexplosive\", this will allow you to breach houses, doors and gates." );
  6045. }
  6046. }
  6047. if(listitem == 12) // Signal Jammer
  6048. {
  6049. if(PlayerInfo[playerid][pMember] != FACTION_FBI)
  6050. return AdmErrorMsg;
  6051. TogglePlayerControllable(playerid, true);
  6052. if(PlayerInfo[playerid][pCash] < 1000) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6053. GiveMoney(playerid, -1000);
  6054. PlayerInfo[playerid][pJammer] = 1;
  6055. SendClientMessage(playerid, COLOR_GREY, "Signal jammer purchased! (/placejammer)");
  6056. }
  6057. showSAPDDialog(playerid);
  6058. }
  6059. else
  6060. {
  6061. ShowPlayerDialog(playerid, DIALOG_LEO_MAIN, DIALOG_STYLE_LIST, GetPlayerFactionName(playerid), "Duty\nUndercover\nChange Uniform\nArmory\nSWAT\nClear Suspect\nRelease Suspect", "Select", "Cancel");
  6062. }
  6063. return 1;
  6064. }
  6065. if(dialogid == DIALOG_SAPD_SWAT) // SWAT MENU
  6066. {
  6067. if(response)
  6068. {
  6069. if(listitem == 0) //WEAPONS
  6070. {
  6071. ShowPlayerDialog(playerid, DIALOG_SAPD_SWAT_WEAPONS, DIALOG_STYLE_TABLIST, "SWAT Weapons",
  6072. "Desert Eagle\t$500\n\
  6073. Shotgun\t$200\n\
  6074. MP5\t$400\n\
  6075. Rifle\t$1,000\n\
  6076. M4\t$6,000\n\
  6077. Sniper Rifle\t$12,000\n\
  6078. Spas-12\t$15,000\n\
  6079. Infrared Goggles\t$1,500",
  6080. "Select", "Back");
  6081. }
  6082. if(listitem == 1) //ACCESSORIES
  6083. {
  6084. ShowPlayerDialog(playerid, DIALOG_SAPD_SWAT_ACCESSORIES, DIALOG_STYLE_TABLIST, "SWAT Accessories",
  6085. "Tear Gas\t$800\n\
  6086. Grenades\t$800\n\
  6087. Kevlar\t$2,000",
  6088. "Select", "Back");
  6089. }
  6090. if(listitem == 2)
  6091. {
  6092. PlayerInfo[playerid][pClothes] = 0;
  6093. SetPlayerSkin(playerid, 285);
  6094. PlayerInfo[playerid][pModel] = 285;
  6095. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You equipped your SWAT Uniform *");
  6096. }
  6097. }
  6098. else
  6099. {
  6100. ShowPlayerDialog(playerid, DIALOG_LEO_MAIN, DIALOG_STYLE_LIST, GetPlayerFactionName(playerid), "Duty\nUndercover\nChange Uniform\nArmory\nSWAT\nClear Suspect\nRelease Suspect", "Select", "Cancel");
  6101. }
  6102. return 1;
  6103. }
  6104. if(dialogid == DIALOG_SAPD_SWAT_WEAPONS) //WEAPONS
  6105. {
  6106. if(response)
  6107. {
  6108. new playercash = PlayerInfo[playerid][pCash];
  6109. if(listitem == 0)
  6110. {
  6111. if(playercash < 500)
  6112. {
  6113. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6114. TogglePlayerControllable(playerid, true);
  6115. return 1;
  6116. }
  6117. GiveMoney(playerid, -500);
  6118. GivePlayerGun(playerid, 24);
  6119. TogglePlayerControllable(playerid, true);
  6120. }
  6121. if(listitem == 1)
  6122. {
  6123. if(playercash < 200)
  6124. {
  6125. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6126. TogglePlayerControllable(playerid, true);
  6127. return 1;
  6128. }
  6129. GiveMoney(playerid, -200);
  6130. GivePlayerGun(playerid, 25);
  6131. TogglePlayerControllable(playerid, true);
  6132. }
  6133. if(listitem == 2)
  6134. {
  6135. if(playercash < 400)
  6136. {
  6137. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6138. TogglePlayerControllable(playerid, true);
  6139. return 1;
  6140. }
  6141. GiveMoney(playerid, -400);
  6142. GivePlayerGun(playerid, 29);
  6143. TogglePlayerControllable(playerid, true);
  6144. }
  6145. if(listitem == 3)
  6146. {
  6147. if(playercash < 1000)
  6148. {
  6149. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6150. TogglePlayerControllable(playerid, true);
  6151. return 1;
  6152. }
  6153. GiveMoney(playerid, -1000);
  6154. GivePlayerGun(playerid, 33);
  6155. TogglePlayerControllable(playerid, true);
  6156. }
  6157. if(listitem == 4)
  6158. {
  6159. if(playercash < 6000)
  6160. {
  6161. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6162. TogglePlayerControllable(playerid, true);
  6163. return 1;
  6164. }
  6165. GiveMoney(playerid, -6000);
  6166. GivePlayerGun(playerid, 31);
  6167. TogglePlayerControllable(playerid, true);
  6168. }
  6169. if(listitem == 5)
  6170. {
  6171. if(playercash < 12000)
  6172. {
  6173. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6174. TogglePlayerControllable(playerid, true);
  6175. return 1;
  6176. }
  6177. GiveMoney(playerid, -12000);
  6178. GivePlayerGun(playerid, 34);
  6179. TogglePlayerControllable(playerid, true);
  6180. }
  6181. if(listitem == 6)
  6182. {
  6183. if(playercash < 15000)
  6184. {
  6185. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6186. TogglePlayerControllable(playerid, true);
  6187. return 1;
  6188. }
  6189. GiveMoney(playerid, -15000);
  6190. GivePlayerGun(playerid, 27);
  6191. TogglePlayerControllable(playerid, true);
  6192. }
  6193. if(listitem == 7) //Thermal goggles
  6194. {
  6195. if(PlayerInfo[playerid][pCash] < 1500)
  6196. {
  6197. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6198. TogglePlayerControllable(playerid, true);
  6199. return 1;
  6200. }
  6201. else
  6202. {
  6203. GiveMoney(playerid, -1500);
  6204. GivePlayerGun(playerid, 45);
  6205. }
  6206. }
  6207. ShowPlayerDialog(playerid, DIALOG_SAPD_SWAT_WEAPONS, DIALOG_STYLE_TABLIST, "SWAT Weapons",
  6208. "Desert Eagle\t$500\n\
  6209. Shotgun\t$200\n\
  6210. MP5\t$400\n\
  6211. Rifle\t$1,000\n\
  6212. M4\t$6,000\n\
  6213. Sniper Rifle\t$12,000\n\
  6214. Spas-12\t$15,000\n\
  6215. Infrared Goggles\t$1,500",
  6216. "Select", "Back");
  6217. }
  6218. else
  6219. {
  6220. ShowPlayerDialog(playerid, DIALOG_SAPD_SWAT, DIALOG_STYLE_LIST, "SWAT", "Weapons\nAccessories\nSWAT Uniform", "Select", "Back");
  6221. }
  6222. return 1;
  6223. }
  6224. if(dialogid == DIALOG_SAPD_SWAT_ACCESSORIES) //ACCESSORIES
  6225. {
  6226. if(response)
  6227. {
  6228. new playercash = PlayerInfo[playerid][pCash];
  6229. if(listitem == 0) // tear gas
  6230. {
  6231. if(playercash < 800)
  6232. {
  6233. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6234. TogglePlayerControllable(playerid, true);
  6235. return 1;
  6236. }
  6237. GiveMoney(playerid, -800);
  6238. GivePlayerGun(playerid, 17);
  6239. TogglePlayerControllable(playerid, true);
  6240. }
  6241. if(listitem == 1) // grenades
  6242. {
  6243. return SendClientMessage(playerid, COLOR_GREY, "Grenades have been disabled.");
  6244. /*
  6245. if(playercash < 1000)
  6246. {
  6247. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6248. TogglePlayerControllable(playerid, true);
  6249. return 1;
  6250. }
  6251. GiveMoney(playerid, -1000);
  6252. GivePlayerGun(playerid, 16);
  6253. if(GetPlayerAmmo(playerid) >= 2) //ammo fix
  6254. {
  6255. GivePlayerGun(playerid, 16);
  6256. }
  6257. TogglePlayerControllable(playerid, true);*/
  6258. }
  6259. if(listitem == 2) // armor
  6260. {
  6261. if(playercash < 2000)
  6262. {
  6263. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  6264. TogglePlayerControllable(playerid, true);
  6265. return 1;
  6266. }
  6267. GiveMoney(playerid, -2000);
  6268. SetPlayerArmour(playerid, 100.0);
  6269. TogglePlayerControllable(playerid, true);
  6270. }
  6271. ShowPlayerDialog(playerid, DIALOG_SAPD_SWAT_ACCESSORIES, DIALOG_STYLE_TABLIST, "SWAT Accessories",
  6272. "Tear Gas\t$800\n\
  6273. Grenades\t$800\n\
  6274. Kevlar\t$2,000",
  6275. "Select", "Back");
  6276. }
  6277. else
  6278. {
  6279. ShowPlayerDialog(playerid, DIALOG_SAPD_SWAT, DIALOG_STYLE_LIST, "SWAT", "Weapons\nAccessories\nSWAT Uniform", "Select", "Back");
  6280. }
  6281. return 1;
  6282. }
  6283. if(dialogid == DIALOG_ADMIN_COLORCHANGER)
  6284. {
  6285. if(response)
  6286. {
  6287. if(listitem == 0) // DEFINE MACROS COLORS, BUG
  6288. {
  6289. SetPlayerColor(playerid, 0x80008000);
  6290. }
  6291. if(listitem == 1)
  6292. {
  6293. SetPlayerColor(playerid, 0xFFFF0000);
  6294. }
  6295. if(listitem == 2)
  6296. {
  6297. SetPlayerColor(playerid, 0xff000000);
  6298. }
  6299. if(listitem == 3)
  6300. {
  6301. SetPlayerColor(playerid, 0x33CCFF00);
  6302. }
  6303. if(listitem == 4)
  6304. {
  6305. SetPlayerColor(playerid, 0xFF990000);
  6306. }
  6307. if(listitem == 5)
  6308. {
  6309. SetPlayerColor(playerid, 0x33AA3300);
  6310. }
  6311. if(listitem == 6)
  6312. {
  6313. SetPlayerColor(playerid, 0x4B00B000);
  6314. }
  6315. if(listitem == 7)
  6316. {
  6317. SetPlayerColor(playerid, 0xFF66FF00);
  6318. }
  6319. if(listitem == 8)
  6320. {
  6321. SetPlayerColor(playerid, 0x00000000);
  6322. }
  6323. }
  6324. return 1;
  6325. }
  6326. if(dialogid == DIALOG_APPEARANCE_GENDER)
  6327. {
  6328. if(response) // pressed male
  6329. {
  6330. if(PlayerInfo[playerid][pCash] < 25000) return SendClientMessage(playerid, COLOR_GRAD1, "You need $25,000 to change your gender!");
  6331. if(listitem == 0)
  6332. {
  6333. SendClientMessage(playerid, COLOR_YELLOW, "You have successfully changed your sex to: Male.");
  6334. PlayerInfo[playerid][pCash] -= 25000;
  6335. PlayerInfo[playerid][pSex] = 1;
  6336. ShowAppearanceMain(playerid);
  6337. return OnPlayerSave(playerid);
  6338. }
  6339. if(listitem == 1) // pressed female
  6340. {
  6341. SendClientMessage(playerid, COLOR_YELLOW, "You have successfully changed your sex to: Female.");
  6342. PlayerInfo[playerid][pCash] -= 25000;
  6343. PlayerInfo[playerid][pSex] = 2;
  6344. ShowAppearanceMain(playerid);
  6345. return OnPlayerSave(playerid);
  6346. }
  6347. return 1;
  6348. }
  6349. return ShowAppearanceMain(playerid);
  6350. }
  6351. if(dialogid == DIALOG_APPEARANCE_DISPLAY) return 1;
  6352. if(dialogid == DIALOG_APPEARANCE_DISPLAYMDC)
  6353. {
  6354. if(response)
  6355. {
  6356. 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");
  6357. }
  6358. return 1;
  6359. }
  6360. if(dialogid == DIALOG_APPEARANCE_AGE)
  6361. {
  6362. if(response)
  6363. {
  6364. if(PlayerInfo[playerid][pCash] < 25000) return SendClientMessage(playerid, COLOR_GRAD1, "You need $25,000 to change your age!");
  6365. new amount = strval(inputtext);
  6366. if(amount < 16 || amount > 75) return SendClientMessage(playerid, COLOR_GREY, "Your age can't be above 75, or below 16.");
  6367. format(str, sizeof(str), "You have successfully changed your age to: %d years old.", amount);
  6368. SendClientMessage(playerid, COLOR_YELLOW, str);
  6369. PlayerInfo[playerid][pCash] -= 25000;
  6370. PlayerInfo[playerid][pAge] = amount;
  6371. ShowAppearanceMain(playerid);
  6372. return OnPlayerSave(playerid);
  6373. }
  6374. return ShowAppearanceMain(playerid);
  6375. }
  6376. if(dialogid == DIALOG_APPEARANCE_ETHNICITY)
  6377. {
  6378. if(response)
  6379. {
  6380. PlayerInfo[playerid][pEthnicity] = listitem;
  6381. format(str, sizeof(str), "You have successfully changed your ethnicity to: %s.", GetPlayerEthnicity(playerid));
  6382. SendClientMessage(playerid, COLOR_YELLOW, str);
  6383. ShowAppearanceMain(playerid);
  6384. return OnPlayerSave(playerid);
  6385. }
  6386. return ShowAppearanceMain(playerid);
  6387. }
  6388. if(dialogid == DIALOG_APPEARANCE_EYE)
  6389. {
  6390. if(response)
  6391. {
  6392. PlayerInfo[playerid][pEyeColour] = listitem;
  6393. format(str, sizeof(str), "You have successfully changed your eye colour to: %s.", GetPlayerEyeColour(playerid));
  6394. SendClientMessage(playerid, COLOR_YELLOW, str);
  6395. ShowAppearanceMain(playerid);
  6396. return OnPlayerSave(playerid);
  6397. }
  6398. return ShowAppearanceMain(playerid);
  6399. }
  6400. if(dialogid == DIALOG_APPEARANCE_BUILD)
  6401. {
  6402. if(response)
  6403. {
  6404. PlayerInfo[playerid][pBuild] = listitem;
  6405. format(str, sizeof(str), "You have successfully changed your body build type to: %s.", GetPlayerBuild(playerid));
  6406. SendClientMessage(playerid, COLOR_YELLOW, str);
  6407. ShowAppearanceMain(playerid);
  6408. return OnPlayerSave(playerid);
  6409. }
  6410. return ShowAppearanceMain(playerid);
  6411. }
  6412. if(dialogid == DIALOG_APPEARANCE_HEIGHT)
  6413. {
  6414. if(response)
  6415. {
  6416. new amount = strval(inputtext);
  6417. if(amount < 140 || amount > 210) return SendClientMessage(playerid, COLOR_GRAD2, "Character height must be between 140cm and 210cm!");
  6418. PlayerInfo[playerid][pHeight] = amount;
  6419. format(str, sizeof(str), "You have successfully changed your height to: %dcm.", amount);
  6420. SendClientMessage(playerid, COLOR_YELLOW, str);
  6421. ShowAppearanceMain(playerid);
  6422. return OnPlayerSave(playerid);
  6423. }
  6424. return ShowAppearanceMain(playerid);
  6425. }
  6426. if(dialogid == DIALOG_APPEARANCE_UNIQUE)
  6427. {
  6428. if(response)
  6429. {
  6430. if(strlen(inputtext) >= 64) return SendClientMessage(playerid, COLOR_GRAD1, "Too much text - please keep it within 64 letters.");
  6431. strmid(PlayerInfo[playerid][pAppearance], inputtext, 0, strlen(inputtext), 255); // Don't want string length too long, 64 is good?
  6432. format(str, sizeof(str), "You have successfully changed your unique features to: %s.", inputtext);
  6433. SendClientMessage(playerid, COLOR_YELLOW, str);
  6434. ShowAppearanceMain(playerid);
  6435. return OnPlayerSave(playerid);
  6436. }
  6437. return ShowAppearanceMain(playerid);
  6438. }
  6439. if(dialogid == DIALOG_APPEARANCE_MAIN)
  6440. {
  6441. //ShowPlayerDialog(playerid, DIALOG_APPEARANCE_MAIN, DIALOG_STYLE_LIST, "Character Appearance", "Gender\nAge\nEthnicity\nEye Colour\nBuild\nHeight (feet)\nUnique Features", "Select", "Cancel");
  6442. if(response)
  6443. {
  6444. if(listitem == 0) return ShowPlayerDialog(playerid, DIALOG_APPEARANCE_GENDER, DIALOG_STYLE_LIST, "Appearance: Gender ($25,000)", "Male\nFemale", "Select", "Back");
  6445. if(listitem == 1) return ShowPlayerDialog(playerid, DIALOG_APPEARANCE_AGE, DIALOG_STYLE_INPUT, "Appearance: Age ($25,000)", "Please enter your character's age.", "Select", "Back");
  6446. if(listitem == 2) return ShowPlayerDialog(playerid, DIALOG_APPEARANCE_ETHNICITY, DIALOG_STYLE_LIST, "Appearance: Ethnicity", "White\nBlack\nAsian\nHispanic\nLatino\nNative American", "Select", "Back");
  6447. if(listitem == 3) return ShowPlayerDialog(playerid, DIALOG_APPEARANCE_EYE, DIALOG_STYLE_LIST, "Appearance: Eye Colour", "Blue\nBrown\nGreen", "Select", "Back");
  6448. if(listitem == 4) return ShowPlayerDialog(playerid, DIALOG_APPEARANCE_BUILD, DIALOG_STYLE_LIST, "Appearance: Build", "Slim\nAverage\nMuscular", "Select", "Back");
  6449. if(listitem == 5) return ShowPlayerDialog(playerid, DIALOG_APPEARANCE_HEIGHT, DIALOG_STYLE_INPUT, "Appearance: Height", "Please enter your character's height.", "Select", "Back");
  6450. 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");
  6451. }
  6452. return 1; // Pressed cancel
  6453. }
  6454. if(dialogid == AMSGS) // Admin Messages
  6455. {
  6456. if(!response)
  6457. {
  6458. return 1;
  6459. }
  6460. else
  6461. {
  6462. if(!strlen(inputtext))
  6463. {
  6464. displayAdminMessages(playerid);
  6465. SendClientMessage(playerid, COLOR_GRAD1, "You must enter a message before clicking submit.");
  6466. return 1;
  6467. }
  6468. else
  6469. {
  6470. //get time
  6471. new hour, mins, sec;
  6472. gettime(hour, mins, sec);
  6473. hour = FixHour(hour);
  6474. //get admin color based on rank
  6475. new acolor[25];
  6476. if(PlayerInfo[playerid][pAdmin] == 1)
  6477. {
  6478. acolor = C_SILENT_ADMIN;
  6479. }
  6480. if(PlayerInfo[playerid][pAdmin] == 2)
  6481. {
  6482. acolor = C_JUNIOR_ADMIN;
  6483. }
  6484. if(PlayerInfo[playerid][pAdmin] == 3)
  6485. {
  6486. acolor = C_GENERAL_ADMIN;
  6487. }
  6488. if(PlayerInfo[playerid][pAdmin] >= 4 && PlayerInfo[playerid][pAdmin] < 1337)
  6489. {
  6490. acolor = C_SENIOR_ADMIN;
  6491. }
  6492. if(PlayerInfo[playerid][pAdmin] >= 1337 && PlayerInfo[playerid][pAdmin] < 99999)
  6493. {
  6494. acolor = C_HEAD_ADMIN;
  6495. }
  6496. if(PlayerInfo[playerid][pAdmin] >= 99999)
  6497. {
  6498. acolor = C_EXEC_ADMIN;
  6499. }
  6500. format(str, sizeof(str), "[%d:%d]%s %s{BFBDBE}: %s", hour, mins, acolor, PlayerICName(playerid), inputtext);
  6501. if(LINES_AMOUNT == sizeof(aMessageInfo)) //if at the end of the array
  6502. {
  6503. shiftArray(); //shift all msgs back 1 index
  6504. strmid(aMessageInfo[LINES_AMOUNT -1], str, 0, 128);
  6505. }
  6506. else
  6507. {
  6508. strmid(aMessageInfo[LINES_AMOUNT], str, 0, 128);
  6509. LINES_AMOUNT++;
  6510. }
  6511. SaveAdminMessages();
  6512. displayAdminMessages(playerid);
  6513. }
  6514. }
  6515. return 1;
  6516. }
  6517. if(dialogid == FAMILY_DIALOG)
  6518. {
  6519. if(!response) return 1;
  6520. if(listitem != -1)
  6521. {
  6522. new famstring[512];
  6523. new playersOnline = 0;
  6524. foreach( new i: Player )
  6525. {
  6526. if(PlayerInfo[i][pFMember] == listitem)
  6527. {
  6528. playersOnline++;
  6529. }
  6530. }
  6531. new nextxp = GetFamilyNextXP(listitem);
  6532. new level = GetFamilyLevel(listitem);
  6533. if(FamilyInfo[listitem][FamilyLeaderHide])
  6534. {
  6535. 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]);
  6536. 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);
  6537. }
  6538. else
  6539. {
  6540. 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]);
  6541. 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);
  6542. }
  6543. ShowPlayerDialog(playerid, FAMILY_INFO, DIALOG_STYLE_MSGBOX, "Families", famstring, "Ok", "Cancel");
  6544. }
  6545. return 1;
  6546. }
  6547. if(dialogid == 48) //refund
  6548. {
  6549. if(!IsPlayerConnected(RefundingID[playerid]) || RefundingID[playerid] == INVALID_PLAYER_ID)
  6550. {
  6551. RefundingID[playerid] = 999;
  6552. RefundingNumber[playerid] = 999;
  6553. SendClientMessage(playerid, COLOR_GREY, "That player is Offline / Invalid ID.");
  6554. return 1;
  6555. }
  6556. if(!response) //cancel
  6557. {
  6558. RefundingNumber[playerid] = 999;
  6559. DisplayDialogForPlayer(playerid, 47); //refund
  6560. }
  6561. if(response)
  6562. {
  6563. if(!strlen(inputtext)) //no text inputted
  6564. {
  6565. RefundingNumber[playerid] = 999;
  6566. DisplayDialogForPlayer(playerid, 47); //refund
  6567. return 1;
  6568. }
  6569. new amount;
  6570. amount = strval(inputtext);
  6571. new year, month, day;
  6572. getdate(year, month, day);
  6573. new stat = RefundingNumber[playerid];
  6574. new giveplayerid = RefundingID[playerid];
  6575. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  6576. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  6577. switch(stat)
  6578. {
  6579. case 0: //Level
  6580. {
  6581. if(amount != 2){
  6582. RefundingNumber[playerid] = 999;
  6583. PlayerInfo[giveplayerid][pLevel] = amount; //edit
  6584. format(str, sizeof(str), "* You have set %s's Level to %d.", giveplayer, amount); //edit
  6585. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6586. format(str, sizeof(str), "* An Admin has set your Level to %d.", amount); //edit
  6587. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6588. DisplayDialogForPlayer(playerid, 47); //refund
  6589. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6590. StatLog(str);
  6591. } else {
  6592. RefundingNumber[playerid] = 999;
  6593. PlayerInfo[giveplayerid][pLevel] = amount; //edit
  6594. format(str, sizeof(str), "* You have set %s's Level to %d.", giveplayer, amount); //edit
  6595. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6596. format(str, sizeof(str), "* An Admin has set your Level to %d.", amount); //edit
  6597. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6598. DisplayDialogForPlayer(playerid, 47); //refund
  6599. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6600. StatLog(str);
  6601. SendClientMessage(giveplayerid, COLOR_YELLOW, "REMINDER: Global Chat is available for you now, use /togglobal to enable it.");
  6602. }
  6603. }
  6604. case 1: //Cash
  6605. {
  6606. RefundingNumber[playerid] = 999;
  6607. ResetMoney(giveplayerid);
  6608. GiveMoney(giveplayerid, amount);
  6609. format(str, sizeof(str), "* You have set %s's Cash to $%d.", giveplayer, amount); //edit
  6610. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6611. format(str, sizeof(str), "* An Admin has set your Cash to $%d.", amount); //edit
  6612. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6613. DisplayDialogForPlayer(playerid, 47); //refund
  6614. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Cash to $%d", day, month, year, sendername, giveplayer, amount); //edit
  6615. StatLog(str);
  6616. }
  6617. case 2: //Bank
  6618. {
  6619. RefundingNumber[playerid] = 999;
  6620. PlayerInfo[giveplayerid][pAccount] = amount; //edit
  6621. format(str, sizeof(str), "* You have set %s's Bank Account to $%d.", giveplayer, amount); //edit
  6622. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6623. format(str, sizeof(str), "* An Admin has set your Bank Account to $%d.", amount); //edit
  6624. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6625. DisplayDialogForPlayer(playerid, 47); //refund
  6626. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Bank Account to $%d", day, month, year, sendername, giveplayer, amount); //edit
  6627. StatLog(str);
  6628. }
  6629. case 3: //Materials
  6630. {
  6631. RefundingNumber[playerid] = 999;
  6632. PlayerInfo[giveplayerid][pMats] = amount; //edit
  6633. format(str, sizeof(str), "* You have set %s's Materials to %d.", giveplayer, amount); //edit
  6634. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6635. format(str, sizeof(str), "* An Admin has set your Materials to %d.", amount); //edit
  6636. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6637. DisplayDialogForPlayer(playerid, 47); //refund
  6638. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Materials to %d", day, month, year, sendername, giveplayer, amount); //edit
  6639. StatLog(str);
  6640. }
  6641. case 4: //Crack
  6642. {
  6643. RefundingNumber[playerid] = 999;
  6644. PlayerInfo[giveplayerid][pCocaine] = amount; //edit
  6645. format(str, sizeof(str), "* You have set %s's Cocaine to %d.", giveplayer, amount); //edit
  6646. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6647. format(str, sizeof(str), "* An Admin has set your Cocaine to %d.", amount); //edit
  6648. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6649. DisplayDialogForPlayer(playerid, 47); //refund
  6650. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Cocaine to %d", day, month, year, sendername, giveplayer, amount); //edit
  6651. StatLog(str);
  6652. }
  6653. case 5: //Pot
  6654. {
  6655. RefundingNumber[playerid] = 999;
  6656. PlayerInfo[giveplayerid][pCannabis] = amount; //edit
  6657. format(str, sizeof(str), "* You have set %s's Pot to %d.", giveplayer, amount); //edit
  6658. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6659. format(str, sizeof(str), "* An Admin has set your Pot to %d.", amount); //edit
  6660. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6661. DisplayDialogForPlayer(playerid, 47); //refund
  6662. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Pot to %d", day, month, year, sendername, giveplayer, amount); //edit
  6663. StatLog(str);
  6664. }
  6665. case 6: //Arms Dealer
  6666. {
  6667. RefundingNumber[playerid] = 999;
  6668. //
  6669. new lvl;
  6670. if(amount == 1)
  6671. {
  6672. lvl = 0;
  6673. }
  6674. else if(amount == 2)
  6675. {
  6676. lvl = 50;
  6677. }
  6678. else if(amount == 3)
  6679. {
  6680. lvl = 100;
  6681. }
  6682. else if(amount == 4)
  6683. {
  6684. lvl = 200;
  6685. }
  6686. else if(amount == 5)
  6687. {
  6688. lvl = 400;
  6689. }
  6690. else
  6691. {
  6692. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6693. DisplayDialogForPlayer(playerid, 47);
  6694. return 1;
  6695. }
  6696. PlayerInfo[giveplayerid][pArmsSkill] = lvl; //edit
  6697. //
  6698. format(str, sizeof(str), "* You have set %s's Arms Dealer Level to %d.", giveplayer, amount); //edit
  6699. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6700. format(str, sizeof(str), "* An Admin has set your Arms Dealer Level to %d.", amount); //edit
  6701. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6702. DisplayDialogForPlayer(playerid, 47); //refund
  6703. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Arms Dealer Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6704. StatLog(str);
  6705. }
  6706. case 7: //Carjacker
  6707. {
  6708. RefundingNumber[playerid] = 999;
  6709. //
  6710. new lvl;
  6711. if(amount == 1)
  6712. {
  6713. lvl = 0;
  6714. }
  6715. else if(amount == 2)
  6716. {
  6717. lvl = 50;
  6718. }
  6719. else if(amount == 3)
  6720. {
  6721. lvl = 100;
  6722. }
  6723. else if(amount == 4)
  6724. {
  6725. lvl = 200;
  6726. }
  6727. else if(amount == 5)
  6728. {
  6729. lvl = 400;
  6730. }
  6731. else
  6732. {
  6733. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6734. DisplayDialogForPlayer(playerid, 47);
  6735. return 1;
  6736. }
  6737. PlayerInfo[giveplayerid][pJackSkill] = lvl; //edit
  6738. //
  6739. format(str, sizeof(str), "* You have set %s's Car Jacker Level to %d.", giveplayer, amount); //edit
  6740. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6741. format(str, sizeof(str), "* An Admin has set your Car Jacker Level to %d.", amount); //edit
  6742. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6743. DisplayDialogForPlayer(playerid, 47); //refund
  6744. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Car Jacker Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6745. StatLog(str);
  6746. }
  6747. case 8: //Detective
  6748. {
  6749. RefundingNumber[playerid] = 999;
  6750. //
  6751. new lvl;
  6752. if(amount == 1)
  6753. {
  6754. lvl = 0;
  6755. }
  6756. else if(amount == 2)
  6757. {
  6758. lvl = 50;
  6759. }
  6760. else if(amount == 3)
  6761. {
  6762. lvl = 100;
  6763. }
  6764. else if(amount == 4)
  6765. {
  6766. lvl = 200;
  6767. }
  6768. else if(amount == 5)
  6769. {
  6770. lvl = 400;
  6771. }
  6772. else
  6773. {
  6774. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6775. DisplayDialogForPlayer(playerid, 47);
  6776. return 1;
  6777. }
  6778. PlayerInfo[giveplayerid][pDetSkill] = lvl; //edit
  6779. //
  6780. format(str, sizeof(str), "* You have set %s's Detective Level to %d.", giveplayer, amount); //edit
  6781. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6782. format(str, sizeof(str), "* An Admin has set your Detective Level to %d.", amount); //edit
  6783. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6784. DisplayDialogForPlayer(playerid, 47); //refund
  6785. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Detective Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6786. StatLog(str);
  6787. }
  6788. case 9: //Lawyer
  6789. {
  6790. RefundingNumber[playerid] = 999;
  6791. //
  6792. new lvl;
  6793. if(amount == 1)
  6794. {
  6795. lvl = 0;
  6796. }
  6797. else if(amount == 2)
  6798. {
  6799. lvl = 50;
  6800. }
  6801. else if(amount == 3)
  6802. {
  6803. lvl = 100;
  6804. }
  6805. else if(amount == 4)
  6806. {
  6807. lvl = 200;
  6808. }
  6809. else if(amount == 5)
  6810. {
  6811. lvl = 400;
  6812. }
  6813. else
  6814. {
  6815. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6816. DisplayDialogForPlayer(playerid, 47);
  6817. return 1;
  6818. }
  6819. PlayerInfo[giveplayerid][pLawSkill] = lvl; //edit
  6820. //
  6821. format(str, sizeof(str), "* You have set %s's Lawyer Level to %d.", giveplayer, amount); //edit
  6822. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6823. format(str, sizeof(str), "* An Admin has set your Lawyer Level to %d.", amount); //edit
  6824. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6825. DisplayDialogForPlayer(playerid, 47); //refund
  6826. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Lawyer Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6827. StatLog(str);
  6828. }
  6829. case 10: //Mechanic
  6830. {
  6831. RefundingNumber[playerid] = 999;
  6832. //
  6833. new lvl;
  6834. if(amount == 1)
  6835. {
  6836. lvl = 0;
  6837. }
  6838. else if(amount == 2)
  6839. {
  6840. lvl = 50;
  6841. }
  6842. else if(amount == 3)
  6843. {
  6844. lvl = 100;
  6845. }
  6846. else if(amount == 4)
  6847. {
  6848. lvl = 200;
  6849. }
  6850. else if(amount == 5)
  6851. {
  6852. lvl = 400;
  6853. }
  6854. else
  6855. {
  6856. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6857. DisplayDialogForPlayer(playerid, 47);
  6858. return 1;
  6859. }
  6860. PlayerInfo[giveplayerid][pMechSkill] = lvl; //edit
  6861. //
  6862. format(str, sizeof(str), "* You have set %s's Mechanic Level to %d.", giveplayer, amount); //edit
  6863. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6864. format(str, sizeof(str), "* An Admin has set your Mechanic Level to %d.", amount); //edit
  6865. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6866. DisplayDialogForPlayer(playerid, 47); //refund
  6867. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Mechanic Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6868. StatLog(str);
  6869. }
  6870. case 11: //Drug Dealer
  6871. {
  6872. RefundingNumber[playerid] = 999;
  6873. //
  6874. new lvl;
  6875. if(amount == 1)
  6876. {
  6877. lvl = 0;
  6878. }
  6879. else if(amount == 2)
  6880. {
  6881. lvl = 50;
  6882. }
  6883. else if(amount == 3)
  6884. {
  6885. lvl = 100;
  6886. }
  6887. else if(amount == 4)
  6888. {
  6889. lvl = 200;
  6890. }
  6891. else if(amount == 5)
  6892. {
  6893. lvl = 400;
  6894. }
  6895. else
  6896. {
  6897. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6898. DisplayDialogForPlayer(playerid, 47);
  6899. return 1;
  6900. }
  6901. PlayerInfo[giveplayerid][pDrugsSkill] = lvl; //edit
  6902. //
  6903. //PlayerInfo[giveplayerid][pDrugsSkill] = amount; //edit
  6904. format(str, sizeof(str), "* You have set %s's Drug Dealer Level to %d.", giveplayer, amount); //edit
  6905. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6906. format(str, sizeof(str), "* An Admin has set your Drug Dealer Level to %d.", amount); //edit
  6907. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6908. DisplayDialogForPlayer(playerid, 47); //refund
  6909. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Drug Dealer Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6910. StatLog(str);
  6911. }
  6912. case 12: //Sex
  6913. {
  6914. RefundingNumber[playerid] = 999;
  6915. //
  6916. new lvl;
  6917. if(amount == 1)
  6918. {
  6919. lvl = 0;
  6920. }
  6921. else if(amount == 2)
  6922. {
  6923. lvl = 50;
  6924. }
  6925. else if(amount == 3)
  6926. {
  6927. lvl = 100;
  6928. }
  6929. else if(amount == 4)
  6930. {
  6931. lvl = 200;
  6932. }
  6933. else if(amount == 5)
  6934. {
  6935. lvl = 400;
  6936. }
  6937. else
  6938. {
  6939. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6940. DisplayDialogForPlayer(playerid, 47);
  6941. return 1;
  6942. }
  6943. PlayerInfo[giveplayerid][pSexSkill] = lvl; //edit
  6944. format(str, sizeof(str), "* You have set %s's Sex Level to %d.", giveplayer, amount); //edit
  6945. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6946. format(str, sizeof(str), "* An Admin has set your Sex Level to %d.", amount); //edit
  6947. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6948. DisplayDialogForPlayer(playerid, 47); //refund
  6949. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Sex Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6950. StatLog(str);
  6951. }
  6952. case 13: //Boxing
  6953. {
  6954. RefundingNumber[playerid] = 999;
  6955. //
  6956. new lvl;
  6957. if(amount == 1)
  6958. {
  6959. lvl = 0;
  6960. }
  6961. else if(amount == 2)
  6962. {
  6963. lvl = 50;
  6964. }
  6965. else if(amount == 3)
  6966. {
  6967. lvl = 100;
  6968. }
  6969. else if(amount == 4)
  6970. {
  6971. lvl = 200;
  6972. }
  6973. else if(amount == 5)
  6974. {
  6975. lvl = 400;
  6976. }
  6977. else
  6978. {
  6979. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  6980. DisplayDialogForPlayer(playerid, 47);
  6981. return 1;
  6982. }
  6983. PlayerInfo[giveplayerid][pBoxSkill] = lvl; //edit
  6984. //
  6985. format(str, sizeof(str), "* You have set %s's Boxing Level to %d.", giveplayer, amount); //edit
  6986. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6987. format(str, sizeof(str), "* An Admin has set your Boxing Level to %d.", amount); //edit
  6988. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6989. DisplayDialogForPlayer(playerid, 47); //refund
  6990. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Boxing Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  6991. StatLog(str);
  6992. }
  6993. case 14: //Fishing
  6994. {
  6995. RefundingNumber[playerid] = 999;
  6996. //
  6997. new lvl;
  6998. if(amount == 1)
  6999. {
  7000. lvl = 0;
  7001. }
  7002. else if(amount == 2)
  7003. {
  7004. lvl = 50;
  7005. }
  7006. else if(amount == 3)
  7007. {
  7008. lvl = 100;
  7009. }
  7010. else if(amount == 4)
  7011. {
  7012. lvl = 200;
  7013. }
  7014. else if(amount == 5)
  7015. {
  7016. lvl = 400;
  7017. }
  7018. else
  7019. {
  7020. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  7021. DisplayDialogForPlayer(playerid, 47);
  7022. return 1;
  7023. }
  7024. PlayerInfo[giveplayerid][pFishSkill] = lvl; //edit
  7025. //
  7026. format(str, sizeof(str), "* You have set %s's Fishing Level to %d.", giveplayer, amount); //edit
  7027. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  7028. format(str, sizeof(str), "* An Admin has set your Fishing Level to %d.", amount); //edit
  7029. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  7030. DisplayDialogForPlayer(playerid, 47); //refund
  7031. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Fishing Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  7032. StatLog(str);
  7033. }
  7034. case 15:
  7035. {
  7036. RefundingNumber[playerid] = 999;
  7037. new lvl;
  7038. switch(amount)
  7039. {
  7040. case 1: lvl = 0;
  7041. case 2: lvl = 50;
  7042. case 3: lvl = 120;
  7043. case 4: lvl = 200;
  7044. case 5: lvl = 270;
  7045. default:
  7046. {
  7047. SendClientMessage(playerid, COLOR_GREY, "Amount can't be below 0 or above 5."); //edit
  7048. DisplayDialogForPlayer(playerid, 47);
  7049. return 1;
  7050. }
  7051. }
  7052. PlayerInfo[playerid][pPizzaSkill] = lvl;
  7053. format(str, sizeof(str), "* You have set %s's Pizza Level to %d.", giveplayer, amount); //edit
  7054. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  7055. format(str, sizeof(str), "* An Admin has set your Pizza Level to %d.", amount); //edit
  7056. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  7057. DisplayDialogForPlayer(playerid, 47); //refund
  7058. format(str, sizeof(str), "[%d/%d/%d] %s has set %s's Pizza Level to %d", day, month, year, sendername, giveplayer, amount); //edit
  7059. StatLog(str);
  7060. }
  7061. default:
  7062. {
  7063. DisplayDialogForPlayer(playerid, 47); //refund
  7064. SendClientMessage(giveplayerid, COLOR_GREY, "Invalid stat code.");
  7065. return 1;
  7066. }
  7067. }
  7068. }
  7069. return 1;
  7070. }
  7071. if(dialogid == 47) //refund
  7072. {
  7073. if(!response)
  7074. {
  7075. RefundingID[playerid] = 999;
  7076. }
  7077. if(response)
  7078. {
  7079. new statname[32];
  7080. strmid(giveplayer, PlayerICName(RefundingID[playerid]), 0, MAX_PLAYER_NAME);
  7081. switch(listitem)
  7082. {
  7083. case 0:
  7084. {
  7085. RefundingNumber[playerid] = 0;
  7086. statname = "Level";
  7087. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7088. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7089. }
  7090. case 1:
  7091. {
  7092. RefundingNumber[playerid] = 1;
  7093. statname = "Cash";
  7094. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7095. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7096. }
  7097. case 2:
  7098. {
  7099. RefundingNumber[playerid] = 2;
  7100. statname = "Bank";
  7101. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7102. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7103. return 1;
  7104. }
  7105. case 3:
  7106. {
  7107. RefundingNumber[playerid] = 3;
  7108. statname = "Materials";
  7109. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7110. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7111. }
  7112. case 4:
  7113. {
  7114. RefundingNumber[playerid] = 6;
  7115. statname = "Arms Dealer Skill";
  7116. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7117. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7118. }
  7119. case 5:
  7120. {
  7121. RefundingNumber[playerid] = 7;
  7122. statname = "Carjacker Skill";
  7123. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7124. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7125. }
  7126. case 6:
  7127. {
  7128. RefundingNumber[playerid] = 8;
  7129. statname = "Detective Skill";
  7130. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7131. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7132. }
  7133. case 7:
  7134. {
  7135. RefundingNumber[playerid] = 9;
  7136. statname = "Lawyer Skill";
  7137. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7138. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7139. }
  7140. case 8:
  7141. {
  7142. RefundingNumber[playerid] = 10;
  7143. statname = "Mechanic Skill";
  7144. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7145. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7146. }
  7147. case 9:
  7148. {
  7149. RefundingNumber[playerid] = 11;
  7150. statname = "Drug Dealer Skill";
  7151. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7152. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7153. }
  7154. case 10:
  7155. {
  7156. RefundingNumber[playerid] = 12;
  7157. statname = "Sex Skill";
  7158. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7159. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7160. }
  7161. case 11:
  7162. {
  7163. RefundingNumber[playerid] = 13;
  7164. statname = "Boxing Skill";
  7165. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7166. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7167. }
  7168. case 12:
  7169. {
  7170. RefundingNumber[playerid] = 14;
  7171. statname = "Fishing Skill";
  7172. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7173. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7174. }
  7175. case 13:
  7176. {
  7177. RefundingNumber[playerid] = 15;
  7178. statname = "Pizza Skill";
  7179. format(str, sizeof(str), "Refunding [%d]%s's %s", RefundingID[playerid], giveplayer, statname);
  7180. ShowPlayerDialog(playerid, 48, DIALOG_STYLE_INPUT, str, "Enter the amount below.", "Confirm", "Cancel");
  7181. }
  7182. }
  7183. return 1;
  7184. }
  7185. return 1;
  7186. }
  7187. if(dialogid == 59)
  7188. {
  7189. if(response)
  7190. {
  7191. if(strlen(inputtext))
  7192. {
  7193. new amount = strval(inputtext);
  7194. if(amount < 1 || amount > 100000)
  7195. {
  7196. SendClientMessage(playerid, COLOR_GRAD1, "You can't withdraw under $1 or more than $100,000 at a time.");
  7197. return 1;
  7198. }
  7199. if(PlayerInfo[playerid][pAccount] < amount)
  7200. {
  7201. 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]);
  7202. ShowPlayerDialog(playerid, 60, DIALOG_STYLE_MSGBOX, "ATM", str, "Done", "Cancel");
  7203. return 1;
  7204. }
  7205. PlayerInfo[playerid][pAccount] -= amount;
  7206. GiveMoney(playerid, amount);
  7207. format(str, sizeof(str), "You have withdrawn $%d from your bank acount.\nNew balance: $%d", amount, PlayerInfo[playerid][pAccount]);
  7208. ShowPlayerDialog(playerid, 61, DIALOG_STYLE_MSGBOX, "ATM", str, "Done", "Cancel");
  7209. format(str, sizeof(str), "* %s takes their cash out of the machine and puts their card in their pocket.", PlayerICName(playerid));
  7210. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7211. return 1;
  7212. }
  7213. }
  7214. return 1;
  7215. }
  7216. if(dialogid == 60)
  7217. {
  7218. if(response) { }
  7219. return 1;
  7220. }
  7221. if(dialogid == 3242)
  7222. {
  7223. if(response)
  7224. {
  7225. if(listitem == 0)
  7226. {
  7227. if(PlayerInfo[playerid][pDonateRank] >= 1)
  7228. {
  7229. if(PlayerInfo[playerid][pVipColor] == 0)
  7230. {
  7231. PlayerInfo[playerid][pVipColor] = 1;
  7232. SendClientMessage(playerid, 0x80008000, "Your name is now colored.");
  7233. SetPlayerToTeamColor(playerid);
  7234. }
  7235. else if(PlayerInfo[playerid][pVipColor] == 1)
  7236. {
  7237. PlayerInfo[playerid][pVipColor] = 0;
  7238. SendClientMessage(playerid, COLOR_GRAD2, "Your name is no longer colored.");
  7239. SetPlayerToTeamColor(playerid);
  7240. }
  7241. }
  7242. }
  7243. if(listitem == 1) // car repair
  7244. {
  7245. /*if(!IsPlayerInAnyVehicle(playerid))
  7246. {
  7247. SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
  7248. return 1;
  7249. }
  7250. if(vipRepairTime[playerid] > 0)
  7251. {
  7252. format(str, sizeof(str), "Please wait %d seconds before repairing another vehicle.", vipRepairTime[playerid]);
  7253. return SendClientMessage(playerid, COLOR_GREY, str);
  7254. }
  7255. format(str, sizeof(str), "* %s has repaired the vehicle.", PlayerICName(playerid));
  7256. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7257. new carid = GetPlayerVehicleID(playerid);
  7258. //RepairVehicle(carid);
  7259. SetVehicleHealth(carid, 999.0);
  7260. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7261. vipRepairTime[playerid] = 60; // 60 seconds*/
  7262. SendClientMessage(playerid, COLOR_GREY, "This feature is currently disabled!");
  7263. }
  7264. if(listitem == 2) // skin
  7265. {
  7266. 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");
  7267. }
  7268. }
  7269. return 1;
  7270. }
  7271. if(dialogid == 62)
  7272. {
  7273. if(response)
  7274. {
  7275. if(listitem == 0)
  7276. {
  7277. if(PlayerInfo[playerid][pDonateRank] == 1 || PlayerInfo[playerid][pDonateRank] == 2 || PlayerInfo[playerid][pDonateRank] == 3)
  7278. {
  7279. if(PlayerInfo[playerid][pVipColor] == 0)
  7280. {
  7281. PlayerInfo[playerid][pVipColor] = 1;
  7282. SendClientMessage(playerid, 0x80008000, "Your name is now colored.");
  7283. SetPlayerToTeamColor(playerid);
  7284. }
  7285. else if(PlayerInfo[playerid][pVipColor] == 1)
  7286. {
  7287. PlayerInfo[playerid][pVipColor] = 0;
  7288. SendClientMessage(playerid, COLOR_GRAD2, "Your name is no longer colored.");
  7289. SetPlayerToTeamColor(playerid);
  7290. }
  7291. }
  7292. else if(PlayerInfo[playerid][pDonateRank] == 4){
  7293. if(PlayerInfo[playerid][pVipColor] == 0)
  7294. {
  7295. PlayerInfo[playerid][pVipColor] = 1;
  7296. SendClientMessage(playerid, COL_VPLATINUM, "Your name is now colored.");
  7297. SetPlayerColor(playerid, COL_VPLATINUM);
  7298. }
  7299. else if(PlayerInfo[playerid][pVipColor] == 1)
  7300. {
  7301. PlayerInfo[playerid][pVipColor] = 0;
  7302. SendClientMessage(playerid, COLOR_GRAD2, "Your name is no longer colored.");
  7303. SetPlayerToTeamColor(playerid);
  7304. }
  7305. }
  7306. }
  7307. if(listitem == 1) // car tune
  7308. {
  7309. new tempid = GetPlayerVehicleID(playerid);
  7310. if(!IsPlayerInAnyVehicle(playerid))
  7311. {
  7312. SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
  7313. return 1;
  7314. }
  7315. if(IsAPlane(tempid) || IsAHelicopter(tempid) || IsABike(tempid) || IsATrain(tempid) || IsABoat(tempid))
  7316. {
  7317. SendClientMessage(playerid, COLOR_GREY, "You can't mod this.");
  7318. return 1;
  7319. }
  7320. ShowPlayerDialog(playerid, 63, DIALOG_STYLE_LIST, "Tune Menu", "Colors\nPaintjobs\nWheels\nHydraulics\nRepair", "Select", "Cancel");
  7321. }
  7322. if(listitem == 2) // skin
  7323. {
  7324. 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");
  7325. }
  7326. }
  7327. return 1;
  7328. }
  7329. if(dialogid == 1246)
  7330. {
  7331. if(response)
  7332. {
  7333. if(listitem == 0)
  7334. {
  7335. SendClientMessage(playerid, COLOR_GRAD1, "You have set your skin to \"Wu Zi Mu\" (ID: 294)");
  7336. SetPlayerSkin(playerid, 294);
  7337. }
  7338. if(listitem == 1)
  7339. {
  7340. SendClientMessage(playerid, COLOR_GRAD1, "You have set your skin to \"Kent Paul\" (ID: 291)");
  7341. SetPlayerSkin(playerid, 291);
  7342. }
  7343. if(listitem == 2)
  7344. {
  7345. SendClientMessage(playerid, COLOR_GRAD1, "You have set your skin to \"Maccer\" (ID: 2)");
  7346. SetPlayerSkin(playerid, 2);
  7347. }
  7348. if(listitem == 3)
  7349. {
  7350. SendClientMessage(playerid, COLOR_GRAD1, "You have set your skin to \"Ken Rosenberg\" (ID: 290)");
  7351. SetPlayerSkin(playerid, 290);
  7352. }
  7353. if(listitem == 4)
  7354. {
  7355. SendClientMessage(playerid, COLOR_GRAD1, "You have set your skin to \"White MIB agent\" (ID: 165)");
  7356. SetPlayerSkin(playerid, 165);
  7357. }
  7358. if(listitem == 5)
  7359. {
  7360. SendClientMessage(playerid, COLOR_GRAD1, "You have set your skin to \"Michael Toreno\" (ID: 295)");
  7361. SetPlayerSkin(playerid, 295);
  7362. }
  7363. if(listitem == 6)
  7364. {
  7365. SendClientMessage(playerid, COLOR_GRAD1, "You have set your skin to \"Jizzy B.\" (ID: 296)");
  7366. SetPlayerSkin(playerid, 296);
  7367. }
  7368. }
  7369. return 1;
  7370. }
  7371. if(dialogid == 63)
  7372. {
  7373. if(response)
  7374. {
  7375. if(listitem == 0) // Colors
  7376. {
  7377. ShowPlayerDialog(playerid, 64, DIALOG_STYLE_LIST, "Vehicle Color", "Black\nWhite\nDark Blue\nLight Blue\nGreen\nYellow\nPink\nRed", "Change", "Cancel");
  7378. }
  7379. if(listitem == 1) // Paintjobs
  7380. {
  7381. ShowPlayerDialog(playerid, 65, DIALOG_STYLE_LIST, "Paint Jobs", "Style1\nStyle2\nStyle3", "Change", "Cancel");
  7382. }
  7383. if(listitem == 2) // Wheels
  7384. {
  7385. ShowPlayerDialog(playerid, 66, DIALOG_STYLE_LIST, "Wheels", "Style 1 \nStyle 2 \nStyle 3 \nStyle 4 \nStyle 5 \nStyle 6", "Change", "Cancel");
  7386. }
  7387. if(listitem == 3) // Hydraulics
  7388. {
  7389. new vipcar = GetPlayerVehicleID(playerid);
  7390. if(!IsPlayerInAnyVehicle(playerid))
  7391. {
  7392. SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
  7393. return 1;
  7394. }
  7395. if(IsAPlane(vipcar) || IsAHelicopter(vipcar) || IsABike(vipcar) || IsATrain(vipcar) || IsABoat(vipcar))
  7396. {
  7397. SendClientMessage(playerid, COLOR_GREY, "You can't mod this.");
  7398. return 1;
  7399. }
  7400. AddVehicleComponent(vipcar, 1087);
  7401. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7402. }
  7403. if(listitem == 4) // Repair
  7404. {
  7405. /*if(!IsPlayerInAnyVehicle(playerid))
  7406. {
  7407. SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
  7408. return 1;
  7409. }
  7410. if(vipRepairTime[playerid] > 0)
  7411. {
  7412. format(str, sizeof(str), "Please wait %d seconds before repairing another vehicle.", vipRepairTime[playerid]);
  7413. return SendClientMessage(playerid, COLOR_GREY, str);
  7414. }
  7415. format(str, sizeof(str), "* %s has repaired the vehicle.", PlayerICName(playerid));
  7416. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7417. new carid = GetPlayerVehicleID(playerid);
  7418. //RepairVehicle(carid);
  7419. SetVehicleHealth(carid, 999.0);
  7420. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7421. vipRepairTime[playerid] = 60; // 60 seconds*/
  7422. SendClientMessage(playerid, COLOR_GREY, "This feature is currently disabled!");
  7423. }
  7424. }
  7425. return 1;
  7426. }
  7427. if(dialogid == 64)
  7428. {
  7429. if(response)
  7430. {
  7431. new vipcar = GetPlayerVehicleID(playerid);
  7432. if(listitem == 0) // black
  7433. {
  7434. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7435. ChangeVehicleColor(vipcar, 0, 0);
  7436. }
  7437. if(listitem == 1) //White
  7438. {
  7439. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7440. ChangeVehicleColor(vipcar, 1, 1);
  7441. }
  7442. if(listitem == 2) //Dark Blue
  7443. {
  7444. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7445. ChangeVehicleColor(vipcar, 425, 425);
  7446. }
  7447. if(listitem == 3) // Light Blue
  7448. {
  7449. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7450. ChangeVehicleColor(vipcar, 147, 147);
  7451. }
  7452. if(listitem == 4) //Green
  7453. {
  7454. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7455. ChangeVehicleColor(vipcar, 16, 16);
  7456. }
  7457. if(listitem == 5) //Yellow
  7458. {
  7459. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7460. ChangeVehicleColor(vipcar, 6, 6);
  7461. }
  7462. if(listitem == 6) //Pink
  7463. {
  7464. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7465. ChangeVehicleColor(vipcar, 146, 146);
  7466. }
  7467. if(listitem == 7) // Red
  7468. {
  7469. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7470. ChangeVehicleColor(vipcar, 3, 3);
  7471. }
  7472. }
  7473. return 1;
  7474. }
  7475. if(dialogid == 65)
  7476. {
  7477. if(response)
  7478. {
  7479. new vipcar = GetPlayerVehicleID(playerid);
  7480. if(listitem == 0) // style 1
  7481. {
  7482. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7483. ChangeVehiclePaintjob(vipcar, 0);
  7484. }
  7485. if(listitem == 1) //Style 2
  7486. {
  7487. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7488. ChangeVehiclePaintjob(vipcar, 1);
  7489. }
  7490. if(listitem == 2) //style 3
  7491. {
  7492. PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
  7493. ChangeVehiclePaintjob(vipcar, 2);
  7494. }
  7495. }
  7496. return 1;
  7497. }
  7498. if(dialogid == 66)
  7499. {
  7500. if(response)
  7501. {
  7502. new vipcar = GetPlayerVehicleID(playerid);
  7503. if(!IsPlayerInAnyVehicle(playerid))
  7504. {
  7505. SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
  7506. return 1;
  7507. }
  7508. if(IsAPlane(vipcar) || IsAHelicopter(vipcar) || IsABike(vipcar) || IsATrain(vipcar) || IsABoat(vipcar))
  7509. {
  7510. //in case they somehow bypass the /vip check
  7511. SendClientMessage(playerid, COLOR_GREY, "You can't mod this.");
  7512. return 1;
  7513. }
  7514. if(listitem == 0) // style 1
  7515. {
  7516. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7517. AddVehicleComponent(vipcar, 1084);
  7518. }
  7519. if(listitem == 1) //Style 2
  7520. {
  7521. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7522. AddVehicleComponent(vipcar, 1073);
  7523. }
  7524. if(listitem == 2) //Style 3
  7525. {
  7526. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7527. AddVehicleComponent(vipcar, 1075);
  7528. }
  7529. if(listitem == 3) //Style 4
  7530. {
  7531. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7532. AddVehicleComponent(vipcar, 1077);
  7533. }
  7534. if(listitem == 4) //Style 5
  7535. {
  7536. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7537. AddVehicleComponent(vipcar, 1079);
  7538. }
  7539. if(listitem == 5) //Style 6
  7540. {
  7541. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  7542. AddVehicleComponent(vipcar, 1080);
  7543. }
  7544. }
  7545. return 1;
  7546. }
  7547. if(dialogid == DIALOG_LSFMD_MAIN) //LSFMD
  7548. {
  7549. if(response)
  7550. {
  7551. if(listitem == 0)
  7552. {
  7553. if(PlayerInfo[playerid][pOnDuty] == 0)
  7554. {
  7555. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  7556. format(str, sizeof(str), "* Paramedic %s takes their Badge and medic kit from their locker.", sendername);
  7557. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7558. PlayerInfo[playerid][pOnDuty] = 1;
  7559. if(PlayerInfo[playerid][pMember] == 11) FakeFaction[playerid] = 4;
  7560. SetPlayerColor(playerid, TCOLOR_PARAMEDIC);
  7561. SetPlayerHealth(playerid, 100);
  7562. SetPlayerArmour(playerid, 100);
  7563. if(PlayerInfo[playerid][pRank] != 0)
  7564. {
  7565. GivePlayerGun(playerid, WEAPON_SPRAYCAN); // Spray can
  7566. }
  7567. if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] != FACTION_FMD)
  7568. {
  7569. SetPlayerSkin(playerid, 275);
  7570. PlayerInfo[playerid][pModel] = 275;
  7571. PlayerInfo[playerid][pOnDuty] = 1;
  7572. PlayerInfo[playerid][pMember] = FACTION_FMD;
  7573. PlayerInfo[playerid][pRank] = 1;
  7574. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have been given a badge automatically (SAFMD EMR)");
  7575. }
  7576. }
  7577. else if(PlayerInfo[playerid][pOnDuty] == 1)
  7578. {
  7579. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  7580. format(str, sizeof(str), "* Paramedic %s puts their Badge and their medic kit in their locker.", sendername);
  7581. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7582. PlayerInfo[playerid][pOnDuty] = 0;
  7583. SetPlayerColor(playerid, TCOLOR_WHITE);
  7584. }
  7585. return 1;
  7586. }
  7587. if(listitem == 1)
  7588. {
  7589. // Shows faction skin selector
  7590. ShowSkinShop(playerid, false, true, false, false, true);
  7591. return 1;
  7592. }
  7593. if(listitem == 2)
  7594. {
  7595. // Shows civilian skin selector
  7596. ShowSkinShop(playerid, true, false, false, false, false);
  7597. return 1;
  7598. }
  7599. if(listitem == 3)
  7600. {
  7601. ShowPlayerDialog(playerid, DIALOG_LSFMD_GEAR, DIALOG_STYLE_TABLIST, "Gear",
  7602. "Fire Extinguisher\t$50\n\
  7603. Desert eagle\t$1000\n\
  7604. Kevlar\t$2000\n\
  7605. Temporary RRK\tFree\n\
  7606. Radio\t$150\n\
  7607. First aid kit\t$150\n\
  7608. Portable MDC\tFree",
  7609. "Purchase", "Back");
  7610. return 1;
  7611. }
  7612. }
  7613. return 1;
  7614. }
  7615. if(dialogid == DIALOG_LSFMD_GEAR) //LSFMD GEAR
  7616. {
  7617. if(response)
  7618. {
  7619. if(listitem == 0) // Fire Extinguisher
  7620. {
  7621. if(PlayerInfo[playerid][pCash] < 50)
  7622. {
  7623. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7624. TogglePlayerControllable(playerid, true);
  7625. return 1;
  7626. }
  7627. else
  7628. {
  7629. GiveMoney(playerid, -50);
  7630. GivePlayerGun(playerid, 42);
  7631. TogglePlayerControllable(playerid, true);
  7632. }
  7633. }
  7634. if(listitem == 1) // Deagle
  7635. {
  7636. if(PlayerInfo[playerid][pRank] < 1) return SendClientMessage(playerid, COLOR_GREY, "This may only be used by R1s+");
  7637. if(PlayerInfo[playerid][pCash] < 1000)
  7638. {
  7639. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7640. TogglePlayerControllable(playerid, true);
  7641. return 1;
  7642. }
  7643. else
  7644. {
  7645. GiveMoney(playerid, -1000);
  7646. GivePlayerGun(playerid, WEAPON_DEAGLE);
  7647. TogglePlayerControllable(playerid, true);
  7648. }
  7649. }
  7650. if(listitem == 2) //Kevlar
  7651. {
  7652. if(PlayerInfo[playerid][pCash] < 2000)
  7653. {
  7654. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7655. TogglePlayerControllable(playerid, true);
  7656. return 1;
  7657. }
  7658. else
  7659. {
  7660. GiveMoney(playerid, -2000);
  7661. SetPlayerArmour(playerid, 100);
  7662. TogglePlayerControllable(playerid, true);
  7663. }
  7664. }
  7665. if(listitem == 3) // Temp RRK
  7666. {
  7667. if(FMD_RRK_DISABLED)
  7668. return SendClientMessage(playerid, COLOR_GREY, "The RRK system is disabled.");
  7669. if(hasTempRRK[playerid] == 0)
  7670. {
  7671. hasTempRRK[playerid] = 1;
  7672. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have taken a temporary RRK from the lockers.");
  7673. TogglePlayerControllable(playerid, true);
  7674. }
  7675. else return SendClientMessage(playerid, COLOR_GREY, "You already have a temporary RRK.");
  7676. }
  7677. if(listitem == 4) //radio
  7678. {
  7679. if(PlayerInfo[playerid][pCash] < 150)
  7680. {
  7681. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7682. TogglePlayerControllable(playerid, true);
  7683. return 1;
  7684. }
  7685. else
  7686. {
  7687. PlayerInfo[playerid][pRadio] = 1;
  7688. GiveMoney(playerid, -150);
  7689. TogglePlayerControllable(playerid, true);
  7690. }
  7691. }
  7692. if(listitem == 5)
  7693. {
  7694. if(PlayerInfo[playerid][pCash] < 150)
  7695. {
  7696. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7697. TogglePlayerControllable(playerid, true);
  7698. return 1;
  7699. }
  7700. else
  7701. {
  7702. format(str, sizeof(str), "* %s %s has used a first aid kit.", GetPlayerRank(playerid), PlayerICName(playerid));
  7703. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7704. GiveMoney(playerid, -200);
  7705. SetPlayerHealth(playerid, 100.0);
  7706. TogglePlayerControllable(playerid, true);
  7707. }
  7708. }
  7709. if(listitem == 6) // portable mdc
  7710. {
  7711. PlayerInfo[playerid][pPortMDC] = 1;
  7712. SendClientMessage(playerid, COLOR_ORANGE, "You take a portable MDC unit from the locker.");
  7713. SendClientMessage(playerid, COLOR_ORANGE, "(( This will be lost upon death. ))");
  7714. }
  7715. }
  7716. else
  7717. {
  7718. ShowPlayerDialog(playerid, DIALOG_LSFMD_MAIN, DIALOG_STYLE_LIST, "SAFMD", "Duty\nChange Uniform\nOff Duty\nGear", "Select", "Cancel");
  7719. }
  7720. return 1;
  7721. }
  7722. if(dialogid == SANEWSLOCKER)
  7723. {
  7724. if(response)
  7725. {
  7726. if(listitem == 0)
  7727. {
  7728. if(PlayerInfo[playerid][pOnDuty] == 0)
  7729. {
  7730. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  7731. format(str, sizeof(str), "* %s %s takes their Press Pass and camera from their locker.", GetPlayerRank(playerid), sendername);
  7732. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7733. PlayerInfo[playerid][pOnDuty] = 1;
  7734. SetPlayerColor(playerid, TCOLOR_LIGHTBLUE);
  7735. }
  7736. else if(PlayerInfo[playerid][pOnDuty] == 1)
  7737. {
  7738. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  7739. format(str, sizeof(str), "* %s %s places their Press Pass and Camera in their locker.", GetPlayerRank(playerid), sendername);
  7740. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7741. PlayerInfo[playerid][pOnDuty] = 0;
  7742. SetPlayerColor(playerid, TCOLOR_WHITE);
  7743. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  7744. PlayerInfo[playerid][pClothes] = 0;
  7745. }
  7746. return 1;
  7747. }
  7748. if(listitem == 1)
  7749. {
  7750. // Show civilian skin selector
  7751. ShowSkinShop(playerid, true, false, false, false, false);
  7752. return 1;
  7753. }
  7754. if(listitem == 2)
  7755. {
  7756. 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");
  7757. return 1;
  7758. }
  7759. }
  7760. return 1;
  7761. }
  7762. if(dialogid == SANEWSGUNS)
  7763. {
  7764. if(response)
  7765. {
  7766. if(listitem == 0) // CAMERA
  7767. {
  7768. if(PlayerInfo[playerid][pCash] < 250)
  7769. {
  7770. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7771. TogglePlayerControllable(playerid, true);
  7772. }
  7773. else
  7774. {
  7775. GiveMoney(playerid, -250);
  7776. GivePlayerGun(playerid, 43);
  7777. TogglePlayerControllable(playerid, true);
  7778. }
  7779. return 1;
  7780. }
  7781. if(listitem == 1) // Kevlar Vest
  7782. {
  7783. if(PlayerInfo[playerid][pCash] < 500)
  7784. {
  7785. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7786. TogglePlayerControllable(playerid, true);
  7787. }
  7788. else
  7789. {
  7790. GiveMoney(playerid, -500);
  7791. SetPlayerArmour(playerid, 100);
  7792. TogglePlayerControllable(playerid, true);
  7793. }
  7794. return 1;
  7795. }
  7796. if(listitem == 2) //radio
  7797. {
  7798. if(PlayerInfo[playerid][pCash] < 150)
  7799. {
  7800. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7801. TogglePlayerControllable(playerid, true);
  7802. return 1;
  7803. }
  7804. else
  7805. {
  7806. PlayerInfo[playerid][pRadio] = 1;
  7807. GiveMoney(playerid, -150);
  7808. TogglePlayerControllable(playerid, true);
  7809. }
  7810. }
  7811. if(listitem == 3) //Mace
  7812. {
  7813. if(PlayerInfo[playerid][pCash] < 25)
  7814. {
  7815. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7816. TogglePlayerControllable(playerid, true);
  7817. return 1;
  7818. }
  7819. else
  7820. {
  7821. GiveMoney(playerid, -25);
  7822. GivePlayerGun(playerid, 41);
  7823. TogglePlayerControllable(playerid, true);
  7824. }
  7825. }
  7826. if(listitem == 4) // Health
  7827. {
  7828. if(PlayerInfo[playerid][pCash] < 150)
  7829. {
  7830. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7831. TogglePlayerControllable(playerid, true);
  7832. }
  7833. else
  7834. {
  7835. GiveMoney(playerid, -150);
  7836. SetPlayerHealth(playerid, 100);
  7837. TogglePlayerControllable(playerid, true);
  7838. }
  7839. return 1;
  7840. }
  7841. }
  7842. else
  7843. {
  7844. ShowPlayerDialog(playerid, SANEWSLOCKER, DIALOG_STYLE_LIST, "SAN", "Duty\nChange Uniform\nGear\n", "Select", "Cancel");
  7845. }
  7846. return 1;
  7847. }
  7848. if(dialogid == 70) //burgershot
  7849. {
  7850. if(response)
  7851. {
  7852. new biz = GetPlayerVirtualWorld(playerid);
  7853. if(strlen(inputtext))
  7854. {
  7855. if(!IsNumeric(inputtext))
  7856. {
  7857. return SendClientMessage(playerid, COLOR_GREY, "You must type a number.");
  7858. }
  7859. if(strcmp(inputtext, "1", true) == 0) //Sprunk
  7860. {
  7861. if(GetMoney(playerid) < 2)
  7862. {
  7863. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  7864. }
  7865. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  7866. 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
  7867. GiveMoney(playerid, -2);
  7868. BizInfo[biz][bTill] += 2;
  7869. BizInfo[biz][bProducts] -= 1;
  7870. }
  7871. else if(strcmp(inputtext, "2", true) == 0) //Koolaid
  7872. {
  7873. if(GetMoney(playerid) < 1)
  7874. {
  7875. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  7876. }
  7877. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  7878. 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
  7879. GiveMoney(playerid, -1);
  7880. BizInfo[biz][bTill] += 2;
  7881. BizInfo[biz][bProducts] -= 1;
  7882. }
  7883. else if(strcmp(inputtext, "3", true) == 0) //Largo Combo
  7884. {
  7885. if(boughtFoodTimer[playerid])
  7886. {
  7887. return SendClientMessage(playerid, COLOR_GREY, "You must wait 1 minute before buying another Meal.");
  7888. }
  7889. if(GetMoney(playerid) < 25)
  7890. {
  7891. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  7892. }
  7893. if(hasFoodTray[playerid])
  7894. {
  7895. return SendClientMessage(playerid, COLOR_GREY, "You are already holding a meal, type /preparefood then type /eat to eat it.");
  7896. }
  7897. format(str, sizeof(str), "* %s has bought a Meat Stack Meal.", PlayerICName(playerid));
  7898. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7899. 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
  7900. hasFoodTray[playerid] = 3; //burgershot
  7901. givePlayerFoodTray(playerid, hasFoodTray[playerid]);
  7902. GiveMoney(playerid, -25);
  7903. BizInfo[biz][bTill] += 2;
  7904. BizInfo[biz][bProducts] -= 1;
  7905. SetTimerEx("boughtFood", 60 *1000, 0, "i", playerid); //1 minute
  7906. boughtFoodTimer[playerid] = true;
  7907. }
  7908. else if(strcmp(inputtext, "4", true) == 0) //Medium Combo
  7909. {
  7910. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  7911. }
  7912. else if(strcmp(inputtext, "5", true) == 0) //Small Combo
  7913. {
  7914. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  7915. }
  7916. else if(strcmp(inputtext, "6", true) == 0) //Salad Meal
  7917. {
  7918. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  7919. }
  7920. if(BizInfo[biz][bProducts] <= 0) SetNoProductsDate(biz);
  7921. }
  7922. }
  7923. return 1;
  7924. }
  7925. if(dialogid == 71) //cluckin bell
  7926. {
  7927. if(response)
  7928. {
  7929. new biz = GetPlayerVirtualWorld(playerid);
  7930. if(strlen(inputtext))
  7931. {
  7932. if(!IsNumeric(inputtext))
  7933. {
  7934. return SendClientMessage(playerid, COLOR_GREY, "You must type a number.");
  7935. }
  7936. if(strcmp(inputtext, "1", true) == 0) //Sprunk
  7937. {
  7938. if(GetMoney(playerid) < 2)
  7939. {
  7940. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  7941. }
  7942. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  7943. 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
  7944. GiveMoney(playerid, -2);
  7945. BizInfo[biz][bTill] += 2;
  7946. BizInfo[biz][bProducts] -= 1;
  7947. }
  7948. else if(strcmp(inputtext, "2", true) == 0) //Koolaid
  7949. {
  7950. if(GetMoney(playerid) < 1)
  7951. {
  7952. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  7953. }
  7954. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  7955. 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
  7956. GiveMoney(playerid, -1);
  7957. BizInfo[biz][bTill] += 2;
  7958. BizInfo[biz][bProducts] -= 1;
  7959. }
  7960. else if(strcmp(inputtext, "3", true) == 0) //Largo Combo
  7961. {
  7962. if(boughtFoodTimer[playerid])
  7963. {
  7964. return SendClientMessage(playerid, COLOR_GREY, "You must wait 1 minute before buying another Meal.");
  7965. }
  7966. if(GetMoney(playerid) < 25)
  7967. {
  7968. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  7969. }
  7970. if(hasFoodTray[playerid])
  7971. {
  7972. return SendClientMessage(playerid, COLOR_GREY, "You are already holding a meal, type /preparefood then type /eat to eat it.");
  7973. }
  7974. format(str, sizeof(str), "* %s has bought a Cluckin' Huge Meal.", PlayerICName(playerid));
  7975. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7976. 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
  7977. hasFoodTray[playerid] = 2; //chicken
  7978. givePlayerFoodTray(playerid, hasFoodTray[playerid]);
  7979. GiveMoney(playerid, -25);
  7980. BizInfo[biz][bTill] += 2;
  7981. BizInfo[biz][bProducts] -= 1;
  7982. SetTimerEx("boughtFood", 60 *1000, 0, "i", playerid); //1 minute
  7983. boughtFoodTimer[playerid] = true;
  7984. }
  7985. else if(strcmp(inputtext, "4", true) == 0) //Medium Combo
  7986. {
  7987. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  7988. }
  7989. else if(strcmp(inputtext, "5", true) == 0) //Small Combo
  7990. {
  7991. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  7992. }
  7993. else if(strcmp(inputtext, "6", true) == 0) //Salad Meal
  7994. {
  7995. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  7996. }
  7997. if(BizInfo[biz][bProducts] <= 0)
  7998. {
  7999. SetNoProductsDate(biz);
  8000. }
  8001. }
  8002. }
  8003. return 1;
  8004. }
  8005. if(dialogid == 72) //pizza stack
  8006. {
  8007. if(response)
  8008. {
  8009. new biz = GetPlayerVirtualWorld(playerid);
  8010. if(strlen(inputtext))
  8011. {
  8012. if(!IsNumeric(inputtext))
  8013. {
  8014. return SendClientMessage(playerid, COLOR_GREY, "You must type a number.");
  8015. }
  8016. if(strcmp(inputtext, "1", true) == 0) //Sprunk
  8017. {
  8018. if(GetMoney(playerid) < 2)
  8019. {
  8020. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  8021. }
  8022. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  8023. 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
  8024. GiveMoney(playerid, -2);
  8025. BizInfo[biz][bTill] += 2;
  8026. BizInfo[biz][bProducts] -= 1;
  8027. }
  8028. else if(strcmp(inputtext, "2", true) == 0) //Lemonade
  8029. {
  8030. if(GetMoney(playerid) < 1)
  8031. {
  8032. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  8033. }
  8034. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  8035. 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
  8036. GiveMoney(playerid, -1);
  8037. BizInfo[biz][bTill] += 2;
  8038. BizInfo[biz][bProducts] -= 1;
  8039. }
  8040. else if(strcmp(inputtext, "3", true) == 0) //Pizza Take Out
  8041. {
  8042. if(boughtFoodTimer[playerid])
  8043. {
  8044. return SendClientMessage(playerid, COLOR_GREY, "You must wait 1 minute before buying another Meal.");
  8045. }
  8046. if(GetMoney(playerid) < 100)
  8047. {
  8048. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  8049. }
  8050. if(hasFoodTray[playerid])
  8051. {
  8052. return SendClientMessage(playerid, COLOR_GREY, "You are already holding a meal, type /preparefood then type /eat to eat it.");
  8053. }
  8054. format(str, sizeof(str), "* %s has bought a Pizza Take Out Meal.", PlayerICName(playerid));
  8055. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  8056. 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
  8057. hasFoodTray[playerid] = 1; //pizza
  8058. givePlayerFoodTray(playerid, hasFoodTray[playerid]);
  8059. GiveMoney(playerid, -100);
  8060. BizInfo[biz][bTill] += 2;
  8061. BizInfo[biz][bProducts] -= 1;
  8062. SetTimerEx("boughtFood", 60 *1000, 0, "i", playerid); //1 minute
  8063. boughtFoodTimer[playerid] = true;
  8064. }
  8065. else if(strcmp(inputtext, "4", true) == 0) //Full Rack
  8066. {
  8067. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  8068. }
  8069. else if(strcmp(inputtext, "5", true) == 0) //Double D-Luxe
  8070. {
  8071. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  8072. }
  8073. else if(strcmp(inputtext, "6", true) == 0) //Buster
  8074. {
  8075. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  8076. }
  8077. else if(strcmp(inputtext, "7", true) == 0) //Salad Meal
  8078. {
  8079. return SendClientMessage(playerid, COLOR_GREY, "This meal will be available soon.");
  8080. }
  8081. if(BizInfo[biz][bProducts] <= 0)
  8082. {
  8083. SetNoProductsDate(biz);
  8084. }
  8085. }
  8086. }
  8087. return 1;
  8088. }
  8089. if(dialogid == 75) // Product Dealer
  8090. {
  8091. if(response)
  8092. {
  8093. DisplayDialogForPlayer(playerid, 74);
  8094. return 1;
  8095. }
  8096. return 1;
  8097. }
  8098. if(dialogid == 74) // Product Dealer
  8099. {
  8100. if(response)
  8101. {
  8102. DisplayDialogForPlayer(playerid, 75);
  8103. return 1;
  8104. }
  8105. return 1;
  8106. }
  8107. if(dialogid == 76) //sex shop
  8108. {
  8109. if(response)
  8110. {
  8111. new biz = GetPlayerVirtualWorld(playerid);
  8112. if(BizInfo[biz][bProducts] <= 0)
  8113. return SendClientMessage(playerid, COLOR_GREY, "This business doesn't have any products left.");
  8114. if(listitem == 0) //nitestick
  8115. {
  8116. if(PlayerInfo[playerid][pCash] >= 7000)
  8117. {
  8118. GiveMoney(playerid, -7000);
  8119. BizInfo[biz][bTill] += 7000;
  8120. BizInfo[biz][bProducts] -= 1;
  8121. GivePlayerGun(playerid, 3);
  8122. format(str, sizeof(str), "~r~-$%d", 7000);
  8123. GameTextForPlayer(playerid, str, 5000, 1);
  8124. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8125. displayCenterHUDInfo(playerid, "~r~Nitestick~w~ purchased!~n~enjoy.", 8); //display for 8 seconds
  8126. }
  8127. else
  8128. {
  8129. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8130. }
  8131. }
  8132. if(listitem == 1) //condom
  8133. {
  8134. if(PlayerInfo[playerid][pCash] > 25)
  8135. {
  8136. GiveMoney(playerid, -25);
  8137. BizInfo[biz][bTill] += 25;
  8138. BizInfo[biz][bProducts] -= 1;
  8139. Condom[playerid] ++;
  8140. format(str, sizeof(str), "~r~-$%d", 25);
  8141. GameTextForPlayer(playerid, str, 5000, 1);
  8142. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8143. displayCenterHUDInfo(playerid, "~r~Condom~w~ purchased!~n~~y~Condoms~w~ will automatically be used when you have sex.", 8); //display for 8 seconds
  8144. }
  8145. else
  8146. {
  8147. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8148. }
  8149. }
  8150. if(listitem == 2) //dildo
  8151. {
  8152. if(PlayerInfo[playerid][pCash] >= 1000)
  8153. {
  8154. GiveMoney(playerid, -1000);
  8155. BizInfo[biz][bTill] += 1000;
  8156. BizInfo[biz][bProducts] -= 1;
  8157. GivePlayerGun(playerid, 10);
  8158. format(str, sizeof(str), "~r~-$%d", 1000);
  8159. GameTextForPlayer(playerid, str, 5000, 1);
  8160. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8161. displayCenterHUDInfo(playerid, "~r~Purple Dildo~w~ purchased!~n~enjoy.", 8); //display for 8 seconds
  8162. }
  8163. else
  8164. {
  8165. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8166. }
  8167. }
  8168. if(listitem == 3) //vibrator
  8169. {
  8170. if(PlayerInfo[playerid][pCash] >= 3000)
  8171. {
  8172. GiveMoney(playerid, -3000);
  8173. BizInfo[biz][bTill] += 3000;
  8174. BizInfo[biz][bProducts] -= 1;
  8175. GivePlayerGun(playerid, 13);
  8176. format(str, sizeof(str), "~r~-$%d", 3000);
  8177. GameTextForPlayer(playerid, str, 5000, 1);
  8178. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8179. displayCenterHUDInfo(playerid, "~r~Vibrator~w~ purchased!~n~enjoy.", 8); //display for 8 seconds
  8180. }
  8181. else
  8182. {
  8183. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8184. }
  8185. }
  8186. if(listitem == 4) //small white vibrator
  8187. {
  8188. if(PlayerInfo[playerid][pCash] >= 5000)
  8189. {
  8190. GiveMoney(playerid, -5000);
  8191. BizInfo[biz][bTill] += 5000;
  8192. BizInfo[biz][bProducts] -= 1;
  8193. GivePlayerGun(playerid, 11);
  8194. format(str, sizeof(str), "~r~-$%d", 5000);
  8195. GameTextForPlayer(playerid, str, 5000, 1);
  8196. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8197. displayCenterHUDInfo(playerid, "~r~Small White Vibrator~w~ purchased!~n~enjoy.", 8); //display for 8 seconds
  8198. }
  8199. else
  8200. {
  8201. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8202. }
  8203. }
  8204. if(listitem == 5) //large white vibrator
  8205. {
  8206. if(PlayerInfo[playerid][pCash] >= 7500)
  8207. {
  8208. GiveMoney(playerid, -7500);
  8209. BizInfo[biz][bTill] += 7500;
  8210. BizInfo[biz][bProducts] -= 1;
  8211. GivePlayerGun(playerid, 12);
  8212. format(str, sizeof(str), "~r~-$%d", 7500);
  8213. GameTextForPlayer(playerid, str, 5000, 1);
  8214. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8215. displayCenterHUDInfo(playerid, "~r~Large White Vibrator~w~ purchased!~n~enjoy.", 8); //display for 8 seconds
  8216. }
  8217. else
  8218. {
  8219. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8220. }
  8221. }
  8222. if(listitem == 6) //camera
  8223. {
  8224. if(PlayerInfo[playerid][pCash] >= 10000)
  8225. {
  8226. GiveMoney(playerid, -10000);
  8227. BizInfo[biz][bTill] += 10000;
  8228. BizInfo[biz][bProducts] -= 1;
  8229. GivePlayerGun(playerid, 43);
  8230. format(str, sizeof(str), "~r~-$%d", 10000);
  8231. GameTextForPlayer(playerid, str, 5000, 1);
  8232. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8233. displayCenterHUDInfo(playerid, "~r~Camera~w~ purchased!~n~enjoy.", 8); //display for 8 seconds
  8234. }
  8235. else
  8236. {
  8237. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8238. }
  8239. }
  8240. if(listitem == 7) //gag
  8241. {
  8242. if(PlayerInfo[playerid][pGag] >= 3)
  8243. return SendClientMessage(playerid, COLOR_GREY, "You already have 3 gags.");
  8244. if(PlayerInfo[playerid][pCash] >= 15000)
  8245. {
  8246. GiveMoney(playerid, -15000);
  8247. BizInfo[biz][bTill] += 15000;
  8248. BizInfo[biz][bProducts] -= 1;
  8249. format(str, sizeof(str), "~r~-$%d", 15000);
  8250. GameTextForPlayer(playerid, str, 5000, 1);
  8251. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8252. displayCenterHUDInfo(playerid, "~r~Gag~w~ purchased!~n~enjoy.", 8); //display for 8 seconds
  8253. PlayerInfo[playerid][pGag]++;
  8254. }
  8255. else
  8256. {
  8257. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  8258. }
  8259. }
  8260. if(BizInfo[biz][bProducts] <= 0) SetNoProductsDate(biz);
  8261. }
  8262. return 1;
  8263. }
  8264. if(dialogid == 77) //buy clothes
  8265. {
  8266. if(response)
  8267. {
  8268. if(!IsAtClothShop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not at a clothes shop.");
  8269. new biz = GetPlayerVirtualWorld(playerid);
  8270. if(!IsNumeric(inputtext))
  8271. {
  8272. SendClientMessage(playerid, COLOR_GREY, "You must enter a number for the skin ID.");
  8273. return 1;
  8274. }
  8275. if((strval(inputtext) == 294 && PlayerInfo[playerid][pDonateRank] == 0) ||
  8276. (strval(inputtext) == 295 && PlayerInfo[playerid][pDonateRank] == 0) ||
  8277. (strval(inputtext) == 167) ||
  8278. (strval(inputtext) == 0) ||
  8279. (strval(inputtext) >= 265 && strval(inputtext) <= 267) ||
  8280. (strval(inputtext) == 165) ||
  8281. (strval(inputtext) == 166) ||
  8282. (strval(inputtext) >= 280 && strval(inputtext) <= 288) ||
  8283. (strval(inputtext) >= 274 && strval(inputtext) <= 279) ||
  8284. (strval(inputtext) >= 163 && strval(inputtext) <= 166) ||
  8285. (strval(inputtext) >= 268 && strval(inputtext) <= 271) ||
  8286. (strval(inputtext) == 296) ||
  8287. (strval(inputtext) == 71)) return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this skin.");
  8288. new skin = strval(inputtext);
  8289. if(skin < 0 || skin > 311) return SendClientMessage(playerid, COLOR_GREY, "Skin can't be below 0 or above 311.");
  8290. PlayerTextDrawDestroy(playerid, pModel_t[playerid]);
  8291. pModelState[playerid] = 999;
  8292. pModel_t[playerid] = CreatePlayerTextDraw(playerid, 220.0, 250.0, "_");
  8293. PlayerTextDrawFont(playerid, pModel_t[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
  8294. PlayerTextDrawTextSize(playerid, pModel_t[playerid], 200.0, 200.0);
  8295. PlayerTextDrawSetPreviewModel(playerid, pModel_t[playerid], skin);
  8296. PlayerTextDrawUseBox(playerid, pModel_t[playerid], 0);
  8297. PlayerTextDrawBackgroundColor(playerid, pModel_t[playerid], 0x00000000);
  8298. PlayerTextDrawShow(playerid, pModel_t[playerid]);
  8299. pModelState[playerid] = 2;
  8300. pModelRot[playerid][0] = 0;
  8301. pModelRot[playerid][1] = 0;
  8302. pModelRot[playerid][2] = 0;
  8303. pModelTimer[playerid] = SetTimerEx("UpdatePreviewModel", 1000, 1, "i", playerid);
  8304. 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");
  8305. SetPVarInt(playerid, "buyskinbincobiz", biz);
  8306. SetPVarInt(playerid, "buyskinbinco", skin);
  8307. return 1;
  8308. }
  8309. return 1;
  8310. }
  8311. if(dialogid == 771)
  8312. {
  8313. new skin = GetPVarInt(playerid, "buyskinbinco");
  8314. if(isRestrictedModel(skin))
  8315. {
  8316. SendClientMessage(playerid, COLOR_GREY, "* You have been caught attempting to exploit.");
  8317. SendClientMessage(playerid, COLOR_GREY, "* Exploiting is against the server rules, please don't do it.");
  8318. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has attempted to buy a restricted skin.", PlayerName(playerid));
  8319. ABroadCast(COLOR_WHITE, str, 1);
  8320. return 1;
  8321. }
  8322. new biz = GetPVarInt(playerid, "buyskinbincobiz");
  8323. PlayerTextDrawDestroy(playerid, pModel_t[playerid]);
  8324. pModelState[playerid] = 999;
  8325. if(!response)
  8326. {
  8327. DeletePVar(playerid, "buyskinbinco");
  8328. DeletePVar(playerid, "buyskinbincobiz");
  8329. return 1;
  8330. }
  8331. else
  8332. {
  8333. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You bought a new set of clothes for $1000.");
  8334. GiveMoney(playerid, -1000);
  8335. BizInfo[biz][bTill] += 1000;
  8336. BizInfo[biz][bProducts] -= 1;
  8337. SetPlayerSkin(playerid, skin);
  8338. PlayerInfo[playerid][pClothes] = 0;
  8339. PlayerInfo[playerid][pModel] = skin;
  8340. DeletePVar(playerid, "buyskinbinco");
  8341. DeletePVar(playerid, "buyskinbincobiz");
  8342. }
  8343. if(BizInfo[biz][bProducts] <= 0)
  8344. {
  8345. SetNoProductsDate(biz);
  8346. }
  8347. return 1;
  8348. }
  8349. if(dialogid == 78) //admin authorization
  8350. {
  8351. if(gAdminAuthorized[playerid] == 1)
  8352. {
  8353. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Your admin account has already been authorized.");
  8354. return 1;
  8355. }
  8356. if(response)
  8357. {
  8358. if(!strlen(inputtext))
  8359. {
  8360. DisplayDialogForPlayer(playerid, 78); //admin authorization
  8361. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You must enter your security code.");
  8362. return 1;
  8363. }
  8364. if(strlen(inputtext) >= 50)
  8365. {
  8366. DisplayDialogForPlayer(playerid, 78); //admin authorization
  8367. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Security code is too long.");
  8368. return 0;
  8369. }
  8370. if(PlayerInfo[playerid][pSecKey] != strval(inputtext))
  8371. {
  8372. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Security Key does not match. You have been kicked as a result.");
  8373. KickEx(playerid);
  8374. return 1;
  8375. }
  8376. else
  8377. {
  8378. gAdminAuthorized[playerid] = 1;
  8379. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Your admin account has successfully been authorized.");
  8380. if(!strmatch(adminMOTD, "None"))
  8381. {
  8382. format(str, sizeof(str), "Admin MOTD: %s", adminMOTD);
  8383. SendClientMessage(playerid, COLOR_YELLOW, str);
  8384. }
  8385. }
  8386. }
  8387. else
  8388. {
  8389. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You have left the server.");
  8390. KickEx(playerid);
  8391. }
  8392. return 1;
  8393. }
  8394. if(dialogid == 79) // Help
  8395. {
  8396. if(response)
  8397. {
  8398. if(listitem == 0) // Account
  8399. {
  8400. new hstr[1024];
  8401. format(hstr, sizeof(hstr), "{007BD0}Account Help:{B4B5B7}\n", hstr);
  8402. format(hstr, sizeof(hstr), "%sThe following commands are related to your player account:\n", hstr);
  8403. format(hstr, sizeof(hstr), "%s\n{007BD0}/stats{B4B5B7} - Displays your player statistics, such as your level/money/job/faction.", hstr);
  8404. 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);
  8405. format(hstr, sizeof(hstr), "%s\n{007BD0}/buylevel{B4B5B7} - Upgrades your main level, leveling up means higher paychecks and offers many perks.", hstr);
  8406. format(hstr, sizeof(hstr), "%s\n{007BD0}/upgrade{B4B5B7} - Gives your account special perks such as higher spawn health/armor.", hstr);
  8407. format(hstr, sizeof(hstr), "%s\n{007BD0}/changepass{B4B5B7} - Changes your login password, do not to use the same password on other servers.", hstr);
  8408. ShowPlayerDialog(playerid, 80, DIALOG_STYLE_MSGBOX, "Account", hstr, "Ok", "Back");
  8409. return 1;
  8410. }
  8411. if(listitem == 1) // General
  8412. {
  8413. new hstr[4000];
  8414. format(hstr, sizeof(hstr), "{007BD0}General Help:{B4B5B7}\n", hstr);
  8415. format(hstr, sizeof(hstr), "%sThe following commands are general commands:\n", hstr);
  8416. format(hstr, sizeof(hstr), "%s\n{007BD0}/pay{B4B5B7} - Pay money to another player.", hstr);
  8417. format(hstr, sizeof(hstr), "%s\n{007BD0}/wiretransfer{B4B5B7} - Transfer money to another players bank account.", hstr);
  8418. format(hstr, sizeof(hstr), "%s\n{007BD0}/(ad)vertise{B4B5B7} - Creates an advertisment for the whole server (useful for buying or selling something).", hstr);
  8419. format(hstr, sizeof(hstr), "%s\n{007BD0}/give{B4B5B7} - Gives something to another player.", hstr);
  8420. format(hstr, sizeof(hstr), "%s\n{007BD0}/drop{B4B5B7} - Lets you drop things, such as weapons, drugs.", hstr);
  8421. format(hstr, sizeof(hstr), "%s\n{007BD0}/get{B4B5B7} - Lets you pickup things which have been dropped.", hstr);
  8422. //format(hstr, sizeof(hstr), "%s\n{007BD0}/pickpocket{B4B5B7} - Steal things from other players, useful if you are roleplaying a thief.", hstr);
  8423. 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);
  8424. format(hstr, sizeof(hstr), "%s\n{007BD0}/untie{B4B5B7} - Unties a player, a player will automatically untie after 5 minutes of using /tie.", hstr);
  8425. format(hstr, sizeof(hstr), "%s\n{007BD0}/blindfold{B4B5B7} - Lets you blindfold another player, preventing them from seeing anything.", hstr);
  8426. format(hstr, sizeof(hstr), "%s\n{007BD0}/unblindfold{B4B5B7} - Removes a blindfold from a player.", hstr);
  8427. format(hstr, sizeof(hstr), "%s\n{007BD0}/frisk{B4B5B7} - Frisks a player to show you what they are carrying.", hstr);
  8428. 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);
  8429. format(hstr, sizeof(hstr), "%s\n{007BD0}/eat{B4B5B7} - Eats from a foodtray.", hstr);
  8430. format(hstr, sizeof(hstr), "%s\n{007BD0}/animlist{B4B5B7} - Displays a list of animations (useful for roleplaying).", hstr);
  8431. 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);
  8432. format(hstr, sizeof(hstr), "%s\n{007BD0}/flipcoin{B4B5B7} - Flips a coin.", hstr);
  8433. format(hstr, sizeof(hstr), "%s\n{007BD0}/rules{B4B5B7} - Shows the rules of the server.", hstr);
  8434. format(hstr, sizeof(hstr), "%s\n{007BD0}/breakin{B4B5B7} - Used to break in to houses, businesses and player owned vehicles.", hstr);
  8435. format(hstr, sizeof(hstr), "%s\n{007BD0}/id{B4B5B7} - Displays a players id, name, ping.", hstr);
  8436. 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);
  8437. format(hstr, sizeof(hstr), "%s\n{007BD0}/kill{B4B5B7} - Sends you on a trip to hospital.", hstr);
  8438. format(hstr, sizeof(hstr), "%s\n{007BD0}/eject{B4B5B7} - Ejects a player from your vehicle if you are the driver.", hstr);
  8439. format(hstr, sizeof(hstr), "%s\n{007BD0}/carradio{B4B5B7} - Changes the car radio.", hstr);
  8440. format(hstr, sizeof(hstr), "%s\n{007BD0}/hood{B4B5B7} - Open/close the hood of a vehicle.", hstr);
  8441. format(hstr, sizeof(hstr), "%s\n{007BD0}/trunk{B4B5B7} - Open/close the trunk of a vehicle.", hstr);
  8442. format(hstr, sizeof(hstr), "%s\n{007BD0}/lights{B4B5B7} - Turns the lights off/on on any vehicle.", hstr);
  8443. format(hstr, sizeof(hstr), "%s\n{007BD0}/admins{B4B5B7} - Displays a list of admins online.", hstr);
  8444. format(hstr, sizeof(hstr), "%s\n{007BD0}/report{B4B5B7} - Sends a message to any admins.", hstr);
  8445. format(hstr, sizeof(hstr), "%s\n{007BD0}/helpers{B4B5B7} - Displays a list of helpers online.", hstr);
  8446. format(hstr, sizeof(hstr), "%s\n{007BD0}/helpme{B4B5B7} - Sends a message to any helpers.", hstr);
  8447. format(hstr, sizeof(hstr), "%s\n{007BD0}/clearmychat{B4B5B7} - Clear your own chat.", hstr);
  8448. format(hstr, sizeof(hstr), "%s\n{007BD0}/usedrug{B4B5B7} - Uses the specified drug..", hstr);
  8449. format(hstr, sizeof(hstr), "%s\n{007BD0}/sex{B4B5B7} - Offer to have sex with another player.", hstr);
  8450. format(hstr, sizeof(hstr), "%s\n{007BD0}/service{B4B5B7} - Contact the local services (EMS, Mechanic, Police)", hstr);
  8451. 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);
  8452. format(hstr, sizeof(hstr), "%s\n{007BD0}/families{B4B5B7} - Displays a list of gangs online.", hstr);
  8453. format(hstr, sizeof(hstr), "%s\n{007BD0}/pickweed{B4B5B7} - Pick from a weed plant.", hstr);
  8454. format(hstr, sizeof(hstr), "%s\n{007BD0}/checkweed{B4B5B7} - Shows how much weed a weed plant has produced.", hstr);
  8455. format(hstr, sizeof(hstr), "%s\n{007BD0}/getdrink{B4B5B7} - Allows you to purchase a drink.", hstr);
  8456. format(hstr, sizeof(hstr), "%s\n{007BD0}/requestnewbieunmute{B4B5B7} - Request an unmute from the newbie chat channel.", hstr);
  8457. format(hstr, sizeof(hstr), "%s\n{007BD0}/requestadunmute{B4B5B7} - Request an unmute from the advertisement system.", hstr);
  8458. //format(hstr, sizeof(hstr), "%s\n{007BD0}/cancelreport{B4B5B7} - Cancel your current active report.", hstr);
  8459. format(hstr, sizeof(hstr), "%s\n{007BD0}/inmates{B4B5B7} - Check who is in the IC prison.", hstr);
  8460. format(hstr, sizeof(hstr), "%s\n{007BD0}/blocknumber{B4B5B7} - Block a number from calling/SMS'ing you.", hstr);
  8461. format(hstr, sizeof(hstr), "%s\n{007BD0}/unblocknumber{B4B5B7} - Unblock a number you have previously stopped from calling/SMS'ing you.", hstr);
  8462. format(hstr, sizeof(hstr), "%s\n{007BD0}/blocklist{B4B5B7} - View a list of all number you have blocked.", hstr);
  8463. format(hstr, sizeof(hstr), "%s\n{007BD0}/factions{B4B5B7} - View a list of all factions, and how many members are online.", hstr);
  8464. format(hstr, sizeof(hstr), "%s\n{007BD0}/lightfire{B4B5B7} - Light a camp fire.", hstr);
  8465. format(hstr, sizeof(hstr), "%s\n{007BD0}/putoutfire{B4B5B7} - Put out your camp fire.", hstr);
  8466. format(hstr, sizeof(hstr), "%s\n{007BD0}/removebug{B4B5B7} - Removes a surveillance bug from another player.", hstr);
  8467. ShowPlayerDialog(playerid, 81, DIALOG_STYLE_MSGBOX, "General", hstr, "Ok", "Back");
  8468. return 1;
  8469. }
  8470. if(listitem == 2) // Chat
  8471. {
  8472. new hstr[1024];
  8473. format(hstr, sizeof(hstr), "{007BD0}Chat Help:{B4B5B7}\n", hstr);
  8474. format(hstr, sizeof(hstr), "%sThe following commands are related to interaction or chat:\n", hstr);
  8475. format(hstr, sizeof(hstr), "%s\n{007BD0}/me{B4B5B7} - For performing actions in character.", hstr);
  8476. format(hstr, sizeof(hstr), "%s\n{007BD0}/do{B4B5B7} - For performing actions in character.", hstr);
  8477. format(hstr, sizeof(hstr), "%s\n{007BD0}/whisper{B4B5B7} - Whispers to other players in range.", hstr);
  8478. format(hstr, sizeof(hstr), "%s\n{007BD0}(/o)oc{B4B5B7} - Speaks in the global out of character chat channel.", hstr);
  8479. format(hstr, sizeof(hstr), "%s\n{007BD0}(/s)hout{B4B5B7} - Speaks at a bigger range.", hstr);
  8480. format(hstr, sizeof(hstr), "%s\n{007BD0}(/l)ow{B4B5B7} - Speaks at a smaller range.", hstr);
  8481. format(hstr, sizeof(hstr), "%s\n{007BD0}/b{B4B5B7} - This is for speaking out of character locally.", hstr);
  8482. format(hstr, sizeof(hstr), "%s\n{007BD0}/intercom{B4B5B7} - Speaks to passengers if you are using a vehicle with an intercom (shamal/cargobob).", hstr);
  8483. format(hstr, sizeof(hstr), "%s\n{007BD0}/speakerphone{B4B5B7} - Allows you to turn on the phones speaker while taking a call.", hstr);
  8484. ShowPlayerDialog(playerid, 82, DIALOG_STYLE_MSGBOX, "Chat", hstr, "Ok", "Back");
  8485. return 1;
  8486. }
  8487. if(listitem == 3) // Toggle
  8488. {
  8489. new hstr[1024];
  8490. format(hstr, sizeof(hstr), "{007BD0}Toggle Help:{B4B5B7}\n", hstr);
  8491. format(hstr, sizeof(hstr), "%sThe following commands are for toggling things on or off:\n", hstr);
  8492. format(hstr, sizeof(hstr), "%s\n{007BD0}/togooc{B4B5B7} - Toggles on/off the global out of character chat.", hstr);
  8493. format(hstr, sizeof(hstr), "%s\n{007BD0}/tognewbie{B4B5B7} - Toggles on/off the newbie chat.", hstr);
  8494. format(hstr, sizeof(hstr), "%s\n{007BD0}/togfam{B4B5B7} - Toggles on/off the family chat.", hstr);
  8495. format(hstr, sizeof(hstr), "%s\n{007BD0}/togwhisper{B4B5B7} - Toggles on/off whisper chat.", hstr);
  8496. format(hstr, sizeof(hstr), "%s\n{007BD0}/togphone{B4B5B7} - Toggles on/off your cellphone.", hstr);
  8497. format(hstr, sizeof(hstr), "%s\n{007BD0}/togwt{B4B5B7} - Toggles on/off walkie talkie chat.", hstr);
  8498. format(hstr, sizeof(hstr), "%s\n{007BD0}/toghelper{B4B5B7} - Toggles on/off helper chat.", hstr);
  8499. format(hstr, sizeof(hstr), "%s\n{007BD0}/togfl{B4B5B7} - Toggles on/off faction leader chat.", hstr);
  8500. format(hstr, sizeof(hstr), "%s\n{007BD0}/togtester{B4B5B7} - Toggles on/off the beta tester chat.", hstr);
  8501. format(hstr, sizeof(hstr), "%s\n{007BD0}/togautochat{B4B5B7} - Toggles on/off automatic chat animations when typing on foot or in vehicles.", hstr);
  8502. format(hstr, sizeof(hstr), "%s\n{007BD0}/tognames{B4B5B7} - Toggles on/off nametags.", hstr);
  8503. format(hstr, sizeof(hstr), "%s\n{007BD0}/togradios{B4B5B7} - Toggles on/off radio streams from boomboxes and car radios.", hstr);
  8504. format(hstr, sizeof(hstr), "%s\n{007BD0}/togfuelhud{B4B5B7} - Toggles on/off the vehicle fuel hud.", hstr);
  8505. format(hstr, sizeof(hstr), "%s\n{007BD0}/togspeedhud{B4B5B7} - Toggles on/off the vehicle speed hud.", hstr);
  8506. format(hstr, sizeof(hstr), "%s\n{007BD0}/togvhealthhud{B4B5B7} - Toggles on/off the vehicle health hud.", hstr);
  8507. format(hstr, sizeof(hstr), "%s\n{007BD0}/togdept{B4B5B7} - Toggles on/off the department radio chat.", hstr);
  8508. format(hstr, sizeof(hstr), "%s\n{007BD0}/togradio{B4B5B7} - Toggles on/off the faction radio chat.", hstr);
  8509. ShowPlayerDialog(playerid, 83, DIALOG_STYLE_MSGBOX, "Toggle", hstr, "Ok", "Back");
  8510. return 1;
  8511. }
  8512. if(listitem == 4) // Bank
  8513. {
  8514. new hstr[1024];
  8515. format(hstr, sizeof(hstr), "{007BD0}Bank Help:{B4B5B7}\n", hstr);
  8516. format(hstr, sizeof(hstr), "%sThe following commands are for banking:\n", hstr);
  8517. format(hstr, sizeof(hstr), "%s\n{007BD0}/withdraw{B4B5B7} - Withdraws money from your bank account.", hstr);
  8518. format(hstr, sizeof(hstr), "%s\n{007BD0}/deposit{B4B5B7} - Deposits money to your bank account.", hstr);
  8519. format(hstr, sizeof(hstr), "%s\n{007BD0}/atm{B4B5B7} - Lets you withdraw money from atm machines.", hstr);
  8520. format(hstr, sizeof(hstr), "%s\n{007BD0}/wiretransfer{B4B5B7} - Transfers money to another persons bank account.", hstr);
  8521. ShowPlayerDialog(playerid, 84, DIALOG_STYLE_MSGBOX, "Bank", hstr, "Ok", "Back");
  8522. return 1;
  8523. }
  8524. if(listitem == 5) // Job
  8525. {
  8526. 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");
  8527. return 1;
  8528. }
  8529. if(listitem == 6) // Faction
  8530. {
  8531. if(PlayerInfo[playerid][pMember] == 0)
  8532. {
  8533. ShowHelpDialog(playerid);
  8534. SendClientMessage(playerid, COLOR_GREY, "You are not a member of a Faction.");
  8535. return 1;
  8536. }
  8537. if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) // SAPD
  8538. {
  8539. new hstr[2800];
  8540. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8541. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8542. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8543. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8544. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/m)egaphone{B4B5B7} - Types a message in the megaphone.", hstr);
  8545. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/su)spect{B4B5B7} - Make a player a suspect.", hstr);
  8546. format(hstr, sizeof(hstr), "%s\n{007BD0}/SAPD{B4B5B7} - Used to go on duty.", hstr);
  8547. format(hstr, sizeof(hstr), "%s\n{007BD0}/cuff{B4B5B7} - Cuffs a player.", hstr);
  8548. format(hstr, sizeof(hstr), "%s\n{007BD0}/badge{B4B5B7} - Hide or show your badge.", hstr);
  8549. format(hstr, sizeof(hstr), "%s\n{007BD0}/detain{B4B5B7} - Detains a player.", hstr);
  8550. format(hstr, sizeof(hstr), "%s\n{007BD0}/sdtazer{B4B5B7} - Equips tazer gun.", hstr);
  8551. format(hstr, sizeof(hstr), "%s\n{007BD0}/handtazer{B4B5B7} - Equips stun weapon.", hstr);
  8552. format(hstr, sizeof(hstr), "%s\n{007BD0}/showbadge{B4B5B7} - Shows your badge to another player.", hstr);
  8553. format(hstr, sizeof(hstr), "%s\n{007BD0}/take{B4B5B7} - Takes things from another player.", hstr);
  8554. format(hstr, sizeof(hstr), "%s\n{007BD0}/ticket{B4B5B7} - Offers another player a ticket.", hstr);
  8555. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/gov)ernment{B4B5B7} - Displays a government message to the server.", hstr);
  8556. format(hstr, sizeof(hstr), "%s\n{007BD0}/deliver{B4B5B7} - Delivers a player to prison.", hstr);
  8557. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8558. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8559. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8560. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8561. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployspikes{B4B5B7} - Deploys road spikes.", hstr);
  8562. format(hstr, sizeof(hstr), "%s\n{007BD0}/deletespike(s){B4B5B7} - Deletes road spikes.", hstr);
  8563. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployroadblock{B4B5B7} - Deploys roadblock.", hstr);
  8564. format(hstr, sizeof(hstr), "%s\n{007BD0}/deleteroadblock(s){B4B5B7} - Deletes roadblocks.", hstr);
  8565. format(hstr, sizeof(hstr), "%s\n{007BD0}/opencell{B4B5B7} - Opens nearby jail cells.", hstr);
  8566. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8567. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8568. format(hstr, sizeof(hstr), "%s\n{007BD0}/pdcalls{B4B5B7} - Show a list of 911 calls that have occurred.", hstr);
  8569. format(hstr, sizeof(hstr), "%s\n{007BD0}/flashlight{B4B5B7} - Give functionality for the flashlight system.", hstr);
  8570. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8571. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8572. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Done", "Back");
  8573. return 1;
  8574. }
  8575. if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) //fbi
  8576. {
  8577. new hstr[2500];
  8578. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8579. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8580. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8581. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8582. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/m)egaphone{B4B5B7} - Types a message in the megaphone.", hstr);
  8583. format(hstr, sizeof(hstr), "%s\n{007BD0}/fbi{B4B5B7} - Used to go on duty.", hstr);
  8584. format(hstr, sizeof(hstr), "%s\n{007BD0}/fbiuc{B4B5B7} - Request a new undercover identity.", hstr);
  8585. format(hstr, sizeof(hstr), "%s\n{007BD0}/cuff{B4B5B7} - Cuffs a player.", hstr);
  8586. format(hstr, sizeof(hstr), "%s\n{007BD0}/detain{B4B5B7} - Detains a player.", hstr);
  8587. format(hstr, sizeof(hstr), "%s\n{007BD0}/sdtazer{B4B5B7} - Equips tazer gun.", hstr);
  8588. format(hstr, sizeof(hstr), "%s\n{007BD0}/handtazer{B4B5B7} - Equips stun weapon.", hstr);
  8589. format(hstr, sizeof(hstr), "%s\n{007BD0}/showbadge{B4B5B7} - Shows your badge to another player.", hstr);
  8590. format(hstr, sizeof(hstr), "%s\n{007BD0}/take{B4B5B7} - Takes things from another player.", hstr);
  8591. format(hstr, sizeof(hstr), "%s\n{007BD0}/ticket{B4B5B7} - Offers another player a ticket.", hstr);
  8592. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/gov)ernment{B4B5B7} - Displays a government message to the server.", hstr);
  8593. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8594. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8595. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8596. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8597. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployspikes{B4B5B7} - Deploys road spikes.", hstr);
  8598. format(hstr, sizeof(hstr), "%s\n{007BD0}/deletespike(s){B4B5B7} - Deletes road spikes.", hstr);
  8599. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployroadblock{B4B5B7} - Deploys roadblock.", hstr);
  8600. format(hstr, sizeof(hstr), "%s\n{007BD0}/deleteroadblock(s){B4B5B7} - Deletes roadblocks.", hstr);
  8601. format(hstr, sizeof(hstr), "%s\n{007BD0}/sate{B4B5B7} - Enables satellite mode while in a surveillance van.", hstr);
  8602. format(hstr, sizeof(hstr), "%s\n{007BD0}/badge{B4B5B7} - Hide or show your badge.", hstr);
  8603. format(hstr, sizeof(hstr), "%s\n{007BD0}/seizebiz{B4B5B7} - Shuts down a business.", hstr);
  8604. format(hstr, sizeof(hstr), "%s\n{007BD0}/opencell{B4B5B7} - Opens nearby jail cells.", hstr);
  8605. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8606. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8607. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8608. format(hstr, sizeof(hstr), "%s\n{007BD0}/plantbug{B4B5B7} - Plants a bug on a player.", hstr);
  8609. format(hstr, sizeof(hstr), "%s\n{007BD0}/removebug{B4B5B7} - Removes a surveillance bug from another player.", hstr);
  8610. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8611. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8612. return 1;
  8613. }
  8614. if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) //SASD
  8615. {
  8616. new hstr[1800];
  8617. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8618. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8619. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8620. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8621. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/m)egaphone{B4B5B7} - Types a message in the megaphone.", hstr);
  8622. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/su)spect{B4B5B7} - Make a player a suspect.", hstr);
  8623. format(hstr, sizeof(hstr), "%s\n{007BD0}/sasd{B4B5B7} - Used to go on duty.", hstr);
  8624. format(hstr, sizeof(hstr), "%s\n{007BD0}/cuff{B4B5B7} - Cuffs a player.", hstr);
  8625. format(hstr, sizeof(hstr), "%s\n{007BD0}/detain{B4B5B7} - Detains a player.", hstr);
  8626. format(hstr, sizeof(hstr), "%s\n{007BD0}/sdtazer{B4B5B7} - Equips tazer gun.", hstr);
  8627. format(hstr, sizeof(hstr), "%s\n{007BD0}/handtazer{B4B5B7} - Equips stun weapon.", hstr);
  8628. format(hstr, sizeof(hstr), "%s\n{007BD0}/showbadge{B4B5B7} - Shows your badge to another player.", hstr);
  8629. format(hstr, sizeof(hstr), "%s\n{007BD0}/take{B4B5B7} - Takes things from another player.", hstr);
  8630. format(hstr, sizeof(hstr), "%s\n{007BD0}/ticket{B4B5B7} - Offers another player a ticket.", hstr);
  8631. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/gov)ernment{B4B5B7} - Displays a government message to the server.", hstr);
  8632. format(hstr, sizeof(hstr), "%s\n{007BD0}/deliver{B4B5B7} - Delivers a player to prison.", hstr);
  8633. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8634. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8635. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8636. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8637. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployspikes{B4B5B7} - Deploys road spikes.", hstr);
  8638. format(hstr, sizeof(hstr), "%s\n{007BD0}/deletespike(s){B4B5B7} - Deletes road spikes.", hstr);
  8639. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployroadblock{B4B5B7} - Deploys roadblock.", hstr);
  8640. format(hstr, sizeof(hstr), "%s\n{007BD0}/deleteroadblock(s){B4B5B7} - Deletes roadblocks.", hstr);
  8641. format(hstr, sizeof(hstr), "%s\n{007BD0}/opencell{B4B5B7} - Opens nearby jail cells.", hstr);
  8642. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8643. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8644. format(hstr, sizeof(hstr), "%s\n{007BD0}/pdcalls{B4B5B7} - Show a list of 911 calls that have occurred.", hstr);
  8645. format(hstr, sizeof(hstr), "%s\n{007BD0}/flashlight{B4B5B7} - Give functionality for the flashlight system.", hstr);
  8646. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8647. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8648. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8649. return 1;
  8650. }
  8651. if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) // LSFMD
  8652. {
  8653. new hstr[1500];
  8654. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8655. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8656. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8657. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8658. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/m)egaphone{B4B5B7} - Types a message in the megaphone.", hstr);
  8659. format(hstr, sizeof(hstr), "%s\n{007BD0}/SAFMD{B4B5B7} - Used to go on duty.", hstr);
  8660. format(hstr, sizeof(hstr), "%s\n{007BD0}/EMScalls{B4B5B7} - Lists all injured people.", hstr);
  8661. if(!FMD_RRK_DISABLED) {
  8662. format(hstr, sizeof(hstr), "%s\n{007BD0}/getrrk{B4B5B7} - Gets a rapid response kit.", hstr);
  8663. format(hstr, sizeof(hstr), "%s\n{007BD0}/droprrk{B4B5B7} - Drops a rapid response kit.", hstr);
  8664. format(hstr, sizeof(hstr), "%s\n{007BD0}/pickrrk{B4B5B7} - Picks up a rapid response kit.", hstr);
  8665. format(hstr, sizeof(hstr), "%s\n{007BD0}/userrk{B4B5B7} - Uses a rapid response kit.", hstr);
  8666. format(hstr, sizeof(hstr), "%s\n{007BD0}/placerrk{B4B5B7} - Places a rapid response kit.", hstr);
  8667. format(hstr, sizeof(hstr), "%s\n{007BD0}/usetemprrk{B4B5B7} - Uses a temporary RRK on a person (must have one first)", hstr);
  8668. }
  8669. else {
  8670. format(hstr, sizeof(hstr), "%s\n{007BD0}/transferpatient{B4B5B7} - Transfers a patient into the hospital.", hstr);
  8671. format(hstr, sizeof(hstr), "%s\n{007BD0}/releasepatient{B4B5B7} - Releases a patient from the hospital.", hstr);
  8672. format(hstr, sizeof(hstr), "%s\n{007BD0}/morphine{B4B5B7} - Injects morphine into a patient.", hstr);
  8673. format(hstr, sizeof(hstr), "%s\n{007BD0}/checkpatient{B4B5B7} - Checks the pulse of a patient.", hstr);
  8674. }
  8675. format(hstr, sizeof(hstr), "%s\n{007BD0}/stretcher{B4B5B7} - Places a person on a stretcher.", hstr);
  8676. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8677. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8678. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8679. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", 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}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8682. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8683. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8684. format(hstr, sizeof(hstr), "%s\n{007BD0}/gml{B4B5B7} - Issue a marijuana license.", hstr);
  8685. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8686. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8687. return 1;
  8688. }
  8689. if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14) // SANG
  8690. {
  8691. new hstr[1800];
  8692. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8693. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8694. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8695. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8696. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/m)egaphone{B4B5B7} - Types a message in the megaphone.", hstr);
  8697. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/gov)ernment{B4B5B7} - Displays a government message to the server.", hstr);
  8698. format(hstr, sizeof(hstr), "%s\n{007BD0}/sang{B4B5B7} - SANG lockers.", hstr);
  8699. format(hstr, sizeof(hstr), "%s\n{007BD0}/cuff{B4B5B7} - Cuffs a player.", hstr);
  8700. format(hstr, sizeof(hstr), "%s\n{007BD0}/detain{B4B5B7} - Detains a player.", hstr);
  8701. format(hstr, sizeof(hstr), "%s\n{007BD0}/sdtazer{B4B5B7} - Equips tazer gun.", hstr);
  8702. format(hstr, sizeof(hstr), "%s\n{007BD0}/handtazer{B4B5B7} - Equips stun weapon.", hstr);
  8703. format(hstr, sizeof(hstr), "%s\n{007BD0}/showbadge{B4B5B7} - Shows your badge to another player.", hstr);
  8704. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8705. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8706. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8707. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployspikes{B4B5B7} - Deploys road spikes.", hstr);
  8708. format(hstr, sizeof(hstr), "%s\n{007BD0}/deletespike(s){B4B5B7} - Deletes road spikes.", hstr);
  8709. format(hstr, sizeof(hstr), "%s\n{007BD0}/deployroadblock{B4B5B7} - Deploys roadblock.", hstr);
  8710. format(hstr, sizeof(hstr), "%s\n{007BD0}/deleteroadblock(s){B4B5B7} - Deletes roadblocks.", hstr);
  8711. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8712. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8713. format(hstr, sizeof(hstr), "%s\n{007BD0}/registerprisoner{B4B5B7} - Register prisoner.", hstr);
  8714. format(hstr, sizeof(hstr), "%s\n{007BD0}/prisonlist{B4B5B7} - List prisoner.", hstr);
  8715. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8716. return 1;
  8717. }
  8718. if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6) //Senate
  8719. {
  8720. new hstr[1536];
  8721. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8722. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8723. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/gov)ernment{B4B5B7} - Public Service Announcement.", hstr);
  8724. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8725. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8726. format(hstr, sizeof(hstr), "%s\n{007BD0}/setbadgenumber{B4B5B7} - Setup your badge number.", hstr);
  8727. format(hstr, sizeof(hstr), "%s\n{007BD0}/govlocker{B4B5B7} - Used to go on duty.", hstr);
  8728. format(hstr, sizeof(hstr), "%s\n{007BD0}/settax{B4B5B7} - Sets the income tax.", hstr);
  8729. format(hstr, sizeof(hstr), "%s\n{007BD0}/taxwithdraw{B4B5B7} - Withdraws money from the treasury.", hstr);
  8730. format(hstr, sizeof(hstr), "%s\n{007BD0}/facdeposit{B4B5B7} - Deposits money into faction bank accounts.", hstr);
  8731. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8732. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8733. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8734. format(hstr, sizeof(hstr), "%s\n{007BD0}/showbadge{B4B5B7} - Shows your badge to another player.", hstr);
  8735. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8736. format(hstr, sizeof(hstr), "%s\n{007BD0}/l(ocal)r(adio){B4B5B7} - Speak on the faction's local radio.", hstr);
  8737. format(hstr, sizeof(hstr), "%s\n{007BD0}/seizebiz{B4B5B7} - Seize down a business.", hstr);
  8738. format(hstr, sizeof(hstr), "%s\n{007BD0}/(g)ive(w)eapon(l)icense.", hstr);
  8739. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8740. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8741. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8742. return 1;
  8743. }
  8744. if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7) //High Court
  8745. {
  8746. new hstr[2000];
  8747. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8748. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8749. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8750. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8751. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8752. format(hstr, sizeof(hstr), "%s\n{007BD0}/invite{B4B5B7} - Invites a member into your faction.", hstr);
  8753. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8754. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8755. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8756. format(hstr, sizeof(hstr), "%s\n{007BD0}/jd{B4B5B7} - Judicial Department locker.", hstr);
  8757. format(hstr, sizeof(hstr), "%s\n{007BD0}/cuff{B4B5B7} - Cuffs a player.", hstr);
  8758. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8759. format(hstr, sizeof(hstr), "%s\n{007BD0}/gavel{B4B5B7} - Bang the gavel on the bench (in courtroom).", hstr);
  8760. format(hstr, sizeof(hstr), "%s\n{007BD0}/seizebiz{B4B5B7} - Seize a business.", hstr);
  8761. format(hstr, sizeof(hstr), "%s\n{007BD0}/seizefunds{B4B5B7} - Seizes funds from a person's bank account.", hstr);
  8762. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8763. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Cancel");
  8764. return 1;
  8765. }
  8766. if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //News Agency
  8767. {
  8768. new hstr[3048];
  8769. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8770. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8771. format(hstr, sizeof(hstr), "%s\n{007BD0}/san{B4B5B7} - Used to go on duty.", hstr);
  8772. format(hstr, sizeof(hstr), "%s\n{007BD0}/news{B4B5B7} - Reports the news.", hstr);
  8773. format(hstr, sizeof(hstr), "%s\n{007BD0}/live{B4B5B7} - Starts a live interview with another player.", hstr);
  8774. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8775. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8776. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8777. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8778. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8779. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8780. format(hstr, sizeof(hstr), "%s\n{007BD0}/sanhotline{B4B5B7} - Toggle off the ability for others to use the hotline.", hstr);
  8781. format(hstr, sizeof(hstr), "%s\n{007BD0}/showp(ress)card{B4B5B7} - Show your SAN press card to someone.", hstr);
  8782. format(hstr, sizeof(hstr), "%s\n{007BD0}/blacklistad{B4B5B7} - Blacklist someone from using advertisements.", hstr);
  8783. format(hstr, sizeof(hstr), "%s\n{007BD0}/unblacklistad{B4B5B7} - Unblackist someone from using advertisements.", hstr);
  8784. format(hstr, sizeof(hstr), "%s\n{007BD0}/sanjingle{B4B5B7} - Play the SAN Jingle.", hstr);
  8785. format(hstr, sizeof(hstr), "%s\n{007BD0}/placecamera{B4B5B7} - Place the SAN camera.", hstr);
  8786. format(hstr, sizeof(hstr), "%s\n{007BD0}/startbroadcast{B4B5B7} - Start the broadcast for live news (camera must be present).", hstr);
  8787. format(hstr, sizeof(hstr), "%s\n{007BD0}/endbroadcast{B4B5B7} - End the broadcast for live news (camera must be present).", hstr);
  8788. format(hstr, sizeof(hstr), "%s\n{007BD0}/pickupcamera{B4B5B7} - Pick up the SAN camera.", hstr);
  8789. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8790. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8791. return 1;
  8792. }
  8793. if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) //San Andreas Taxi Company
  8794. {
  8795. new hstr[1024];
  8796. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8797. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8798. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8799. format(hstr, sizeof(hstr), "%s\n{007BD0}/fare{B4B5B7} - Sets your fare.", hstr);
  8800. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8801. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8802. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8803. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8804. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8805. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8806. format(hstr, sizeof(hstr), "%s\n{007BD0}/taxisign{B4B5B7} - Puts a taxi sign on a vehicle.", hstr);
  8807. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8808. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8809. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8810. return 1;
  8811. }
  8812. if(PlayerInfo[playerid][pGroup] == GROUP_S9) // Sector 9
  8813. {
  8814. new hstr[1024];
  8815. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8816. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8817. format(hstr, sizeof(hstr), "%s\n{007BD0}/disguise{B4B5B7} - Used to change clothes.", hstr);
  8818. format(hstr, sizeof(hstr), "%s\n{007BD0}/mask{B4B5B7} - Used to hide your name.", hstr);
  8819. format(hstr, sizeof(hstr), "%s\n{007BD0}/sate{B4B5B7} - Only works in an S9 or FBI vehicle. Satellite.", hstr);
  8820. format(hstr, sizeof(hstr), "%s\n{007BD0}/changefreq{B4B5B7} - Used to listen in to faction radios.", hstr);
  8821. format(hstr, sizeof(hstr), "%s\n{007BD0}/profile{B4B5B7} - Used to view a player's profile.", hstr);
  8822. format(hstr, sizeof(hstr), "%s\n{007BD0}/s9{B4B5B7} - Used to access S9 lockers at the HQ.", hstr);
  8823. format(hstr, sizeof(hstr), "%s\n{007BD0}/shows9badge{B4B5B7} - Shows your S9 badge. Use with caution.", hstr);
  8824. 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);
  8825. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - (Un)invites a member of your faction.", hstr);
  8826. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8827. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8828. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8829. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8830. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8831. format(hstr, sizeof(hstr), "%s\n{007BD0}/placejammer{B4B5B7} - Places a jammer on the ground.");
  8832. format(hstr, sizeof(hstr), "%s\n{007BD0}/removejammer{B4B5B7} - Picks up a jammer from the ground.");
  8833. format(hstr, sizeof(hstr), "%s\n{007BD0}/crushjammer{B4B5B7} - Crushes a jammer from the ground.");
  8834. format(hstr, sizeof(hstr), "%s\n{007BD0}/removejammer{B4B5B7} - Picks up a jammer from the ground.");
  8835. format(hstr, sizeof(hstr), "%s\n{007BD0}/jammer{B4B5B7} - Checks if a jammer is around you..");
  8836. format(hstr, sizeof(hstr), "%s\n{007BD0}/s9uc{B4B5B7} - Hides your crimes and tickets from the MDC.");
  8837. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8838. return 1;
  8839. }
  8840. if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15) //Drug Lords
  8841. {
  8842. new hstr[1024];
  8843. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8844. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8845. format(hstr, sizeof(hstr), "%s\n{007BD0}/sas{B4B5B7} - Used to access your lockers.", hstr);
  8846. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8847. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8848. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8849. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8850. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8851. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8852. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8853. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8854. return 1;
  8855. }
  8856. if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12) //DEA
  8857. {
  8858. new hstr[1800];
  8859. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8860. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8861. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8862. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8863. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/m)egaphone{B4B5B7} - Types a message in the megaphone.", hstr);
  8864. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/su)spect{B4B5B7} - Make a player a suspect.", hstr);
  8865. format(hstr, sizeof(hstr), "%s\n{007BD0}/dea{B4B5B7} - Used to go on duty.", hstr);
  8866. format(hstr, sizeof(hstr), "%s\n{007BD0}/cuff{B4B5B7} - Cuffs a player.", hstr);
  8867. format(hstr, sizeof(hstr), "%s\n{007BD0}/detain{B4B5B7} - Detains a player.", hstr);
  8868. format(hstr, sizeof(hstr), "%s\n{007BD0}/sdtazer{B4B5B7} - Equips tazer gun.", hstr);
  8869. format(hstr, sizeof(hstr), "%s\n{007BD0}/handtazer{B4B5B7} - Equips stun weapon.", hstr);
  8870. format(hstr, sizeof(hstr), "%s\n{007BD0}/showbadge{B4B5B7} - Shows your badge to another player.", hstr);
  8871. format(hstr, sizeof(hstr), "%s\n{007BD0}/take{B4B5B7} - Takes things from another player.", hstr);
  8872. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/gov)ernment{B4B5B7} - Displays a government message to the server.", hstr);
  8873. format(hstr, sizeof(hstr), "%s\n{007BD0}/deliver{B4B5B7} - Delivers a player to prison.", hstr);
  8874. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8875. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8876. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8877. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8878. format(hstr, sizeof(hstr), "%s\n{007BD0}/sate{B4B5B7} - Enables satellite mode while in a surveillance van.", hstr);
  8879. format(hstr, sizeof(hstr), "%s\n{007BD0}/opencell{B4B5B7} - Opens nearby jail cells.", hstr);
  8880. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8881. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8882. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8883. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8884. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8885. return 1;
  8886. }
  8887. if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13) //ATF
  8888. {
  8889. new hstr[1800];
  8890. format(hstr, sizeof(hstr), "{007BD0}Faction Help:{B4B5B7}\n", hstr);
  8891. format(hstr, sizeof(hstr), "%sThe following commands are specific to your faction:\n", hstr);
  8892. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/r)adio{B4B5B7} - Types a message in radio chat.", hstr);
  8893. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/d)epartments{B4B5B7} - Types a message in departments chat.", hstr);
  8894. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/m)egaphone{B4B5B7} - Types a message in the megaphone.", hstr);
  8895. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/su)spect{B4B5B7} - Make a player a suspect.", hstr);
  8896. format(hstr, sizeof(hstr), "%s\n{007BD0}/atf{B4B5B7} - Used to go on duty.", hstr);
  8897. format(hstr, sizeof(hstr), "%s\n{007BD0}/cuff{B4B5B7} - Cuffs a player.", hstr);
  8898. format(hstr, sizeof(hstr), "%s\n{007BD0}/detain{B4B5B7} - Detains a player.", hstr);
  8899. format(hstr, sizeof(hstr), "%s\n{007BD0}/sdtazer{B4B5B7} - Equips tazer gun.", hstr);
  8900. format(hstr, sizeof(hstr), "%s\n{007BD0}/handtazer{B4B5B7} - Equips stun weapon.", hstr);
  8901. format(hstr, sizeof(hstr), "%s\n{007BD0}/showbadge{B4B5B7} - Shows your badge to another player.", hstr);
  8902. format(hstr, sizeof(hstr), "%s\n{007BD0}/take{B4B5B7} - Takes things from another player.", hstr);
  8903. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/gov)ernment{B4B5B7} - Displays a government message to the server.", hstr);
  8904. format(hstr, sizeof(hstr), "%s\n{007BD0}/deliver{B4B5B7} - Delivers a player to prison.", hstr);
  8905. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8906. format(hstr, sizeof(hstr), "%s\n{007BD0}/(un)invite{B4B5B7} - Uninvites a member of your faction.", hstr);
  8907. format(hstr, sizeof(hstr), "%s\n{007BD0}/ouninvite{B4B5B7} - Uninvites a member of your faction that is offline.", hstr);
  8908. format(hstr, sizeof(hstr), "%s\n{007BD0}/giverank{B4B5B7} - Sets the rank of a member of your faction.", hstr);
  8909. format(hstr, sizeof(hstr), "%s\n{007BD0}/sate{B4B5B7} - Enables satellite mode while in a surveillance van.", hstr);
  8910. format(hstr, sizeof(hstr), "%s\n{007BD0}/opencell{B4B5B7} - Opens nearby jail cells.", hstr);
  8911. format(hstr, sizeof(hstr), "%s\n{007BD0}/(f)action(l)eaders{B4B5B7} - Communicate to other leaders and faction moderators.", hstr);
  8912. format(hstr, sizeof(hstr), "%s\n{007BD0}/facwithdraw{B4B5B7} - Withdraws money from your factions bank account.", hstr);
  8913. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8914. format(hstr, sizeof(hstr), "%s\n{007BD0}/towcars{B4B5B7} - Respawns all faction vehicles.", hstr);
  8915. ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "Faction", hstr, "Ok", "Back");
  8916. return 1;
  8917. }
  8918. return 1;
  8919. }
  8920. if(listitem == 7) // Family
  8921. {
  8922. if(PlayerInfo[playerid][pFMember] == 255)
  8923. {
  8924. ShowHelpDialog(playerid);
  8925. SendClientMessage(playerid, COLOR_GREY, "You are not a member of a Family.");
  8926. return 1;
  8927. }
  8928. new hstr[1400];
  8929. format(hstr, sizeof(hstr), "{007BD0}Family Help:{B4B5B7}\n", hstr);
  8930. format(hstr, sizeof(hstr), "%sThe following commands are specific to your family:\n", hstr);
  8931. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/f)amily{B4B5B7} - Displays a message in family chat.", hstr);
  8932. format(hstr, sizeof(hstr), "%s\n{007BD0}/fwithdraw{B4B5B7} - Withdraws money from your family bank account.", hstr);
  8933. format(hstr, sizeof(hstr), "%s\n{007BD0}/famdeposit{B4B5B7} - Deposits money into your families bank account.", hstr);
  8934. format(hstr, sizeof(hstr), "%s\n{007BD0}/fsafe{B4B5B7} - Allows you to access your family safe.", hstr);
  8935. format(hstr, sizeof(hstr), "%s\n{007BD0}/fstats{B4B5B7} - Displays the contents of your families safe.", hstr);
  8936. format(hstr, sizeof(hstr), "%s\n{007BD0}/clothes{B4B5B7} - Used to change clothes.", hstr);
  8937. format(hstr, sizeof(hstr), "%s\n{007BD0}/togfam{B4B5B7} - Used to toggle the family chat for yourself.", hstr);
  8938. format(hstr, sizeof(hstr), "%s\n{007BD0}/dlock{B4B5B7} - Lock a dynamic vehicle with a lock enabled.", hstr);
  8939. format(hstr, sizeof(hstr), "%s\n{007BD0}/createtag{B4B5B7} - Create a graffiti tag.", hstr);
  8940. format(hstr, sizeof(hstr), "%s\n{007BD0}/removetag{B4B5B7} - remove a graffiti tag.", hstr);
  8941. if(PlayerInfo[playerid][pRank] >= 5)
  8942. {
  8943. format(hstr, sizeof(hstr), "%s\n{007BD0}/fmute{B4B5B7} - Used to mute a player from the (/f) chat.", hstr);
  8944. format(hstr, sizeof(hstr), "%s\n{007BD0}/funmute{B4B5B7} - Used to unmute a player from the (/f) chat.", hstr);
  8945. format(hstr, sizeof(hstr), "%s\n{007BD0}/togfamchat{B4B5B7} - Used to toggle the family chat for all members.", hstr);
  8946. format(hstr, sizeof(hstr), "%s\n{007BD0}/adjust{B4B5B7} - Used to adjust multiple things regarding your family.", hstr);
  8947. format(hstr, sizeof(hstr), "%s\n{007BD0}/tags{B4B5B7} - Used to display your current family's tags.", hstr);
  8948. }
  8949. ShowPlayerDialog(playerid, 86, DIALOG_STYLE_MSGBOX, "Other", hstr, "Ok", "Back");
  8950. return 1;
  8951. }
  8952. if(listitem == 8) // Other
  8953. {
  8954. new hstr[1024];
  8955. format(hstr, sizeof(hstr), "{007BD0}Other Help:{B4B5B7}\n", hstr);
  8956. format(hstr, sizeof(hstr), "%sThe following commands are miscellaneous:\n", hstr);
  8957. format(hstr, sizeof(hstr), "%s\n{007BD0}/cellphonehelp(s){B4B5B7} - Displays the cellphone commands.", hstr);
  8958. format(hstr, sizeof(hstr), "%s\n{007BD0}/househelp{B4B5B7} - Displays the house commands.", hstr);
  8959. format(hstr, sizeof(hstr), "%s\n{007BD0}/fishhelp{B4B5B7} - Displays the fishing commands.", hstr);
  8960. format(hstr, sizeof(hstr), "%s\n{007BD0}/irchelp{B4B5B7} - Displays the irc commands.", hstr);
  8961. format(hstr, sizeof(hstr), "%s\n{007BD0}/carhelp{B4B5B7} - Displays the car commands.", hstr);
  8962. format(hstr, sizeof(hstr), "%s\n{007BD0}/radiohelp{B4B5B7} - Displays the radio station commands.", hstr);
  8963. format(hstr, sizeof(hstr), "%s\n{007BD0}/grouphelp{B4B5B7} - Displays the group commands.", hstr);
  8964. ShowPlayerDialog(playerid, 88, DIALOG_STYLE_MSGBOX, "Other", hstr, "Ok", "Back");
  8965. return 1;
  8966. }
  8967. if(listitem == 9) // Business
  8968. {
  8969. new hstr[1024];
  8970. format(hstr, sizeof(hstr), "{007BD0}Business Help:{B4B5B7}\n", hstr);
  8971. format(hstr, sizeof(hstr), "%sThe following commands are for businesses owners:\n", hstr);
  8972. format(hstr, sizeof(hstr), "%s\n{007BD0}/sellbiz(s){B4B5B7} - Sells a business.", hstr);
  8973. format(hstr, sizeof(hstr), "%s\n{007BD0}/sellbiztomarket{B4B5B7} - Sells a business to the market.", hstr);
  8974. format(hstr, sizeof(hstr), "%s\n{007BD0}/biz{B4B5B7} - Allows you to set properties of your business.", hstr);
  8975. format(hstr, sizeof(hstr), "%s\n{007BD0}/buybiz{B4B5B7} - Buys a business.", hstr);
  8976. ShowPlayerDialog(playerid, 89, DIALOG_STYLE_MSGBOX, "Gambling", hstr, "Ok", "Back");
  8977. return 1;
  8978. }
  8979. if(listitem == 10) // Gambling
  8980. {
  8981. new hstr[1024];
  8982. format(hstr, sizeof(hstr), "{007BD0}Gambling Help:{B4B5B7}\n", hstr);
  8983. format(hstr, sizeof(hstr), "%sThe following commands are for gambling:\n", hstr);
  8984. format(hstr, sizeof(hstr), "%s\n{007BD0}/showcard(s){B4B5B7} - Shows card to another player.", hstr);
  8985. format(hstr, sizeof(hstr), "%s\n{007BD0}/cards{B4B5B7} - Shows you a list of your cards.", hstr);
  8986. format(hstr, sizeof(hstr), "%s\n{007BD0}/discard{B4B5B7} - Discards a card.", hstr);
  8987. format(hstr, sizeof(hstr), "%s\n{007BD0}/dealcards{B4B5B7} - Deals cards to another player.", hstr);
  8988. format(hstr, sizeof(hstr), "%s\n{007BD0}/shuffle{B4B5B7} - Shuffles your deck of cards.", hstr);
  8989. ShowPlayerDialog(playerid, 90, DIALOG_STYLE_MSGBOX, "Gambling", hstr, "Ok", "Back");
  8990. return 1;
  8991. }
  8992. if(listitem == 11) // Admin
  8993. {
  8994. if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to view this.");
  8995. new hstr[1024];
  8996. format(hstr, sizeof(hstr), "{007BD0}Admin Help:{B4B5B7}\n", hstr);
  8997. format(hstr, sizeof(hstr), "%sThe following commands are for admins:\n", hstr);
  8998. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/a)dmin{B4B5B7} - Displays a message in the admin chat.", hstr);
  8999. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/ah)elp{B4B5B7} - Displays a list of admins commands.", hstr);
  9000. format(hstr, sizeof(hstr), "%s\n{007BD0}/ahousehelp{B4B5B7} - Displays the admin house commands.", hstr);
  9001. format(hstr, sizeof(hstr), "%s\n{007BD0}/apropertyhelp{B4B5B7} - Displays the admin property commands.", hstr);
  9002. format(hstr, sizeof(hstr), "%s\n{007BD0}/agaragehelp{B4B5B7} - Displays the admin garage commands.", hstr);
  9003. format(hstr, sizeof(hstr), "%s\n{007BD0}/agatehelp{B4B5B7} - Displays the admin gate commands.", hstr);
  9004. format(hstr, sizeof(hstr), "%s\n{007BD0}/nametag{B4B5B7} - Set a colored nametag above your name.", hstr);
  9005. format(hstr, sizeof(hstr), "%s\n{007BD0}/newbietag{B4B5B7} - Set your tag in the newbie chat.", hstr);
  9006. ShowPlayerDialog(playerid, 87, DIALOG_STYLE_MSGBOX, "Admin", hstr, "Ok", "Back");
  9007. return 1;
  9008. }
  9009. if(listitem == 12) // Helper
  9010. {
  9011. if(PlayerInfo[playerid][pHelper] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to view this.");
  9012. new hstr[1024];
  9013. format(hstr, sizeof(hstr), "{007BD0}Helper Help:{B4B5B7}\n", hstr);
  9014. format(hstr, sizeof(hstr), "%sThe following commands are for helpers:\n", hstr);
  9015. format(hstr, sizeof(hstr), "%s\n{007BD0}/helpers{B4B5B7} - Lists all helpers and their helper score.", hstr);
  9016. format(hstr, sizeof(hstr), "%s\n{007BD0}/newbies{B4B5B7} - Lists all newbies.", hstr);
  9017. format(hstr, sizeof(hstr), "%s\n{007BD0}/gotonewbie{B4B5B7} - Teleports to a newbie to see if they need help.", hstr);
  9018. format(hstr, sizeof(hstr), "%s\n{007BD0}/hgoto{B4B5B7} - Teleports to areas.", hstr);
  9019. format(hstr, sizeof(hstr), "%s\n{007BD0}/nmute{B4B5B7} - Mutes a player from the newbie chat.", hstr);
  9020. format(hstr, sizeof(hstr), "%s\n{007BD0}/(/h)helper(c)hat{B4B5B7} - Displays a message in the helper chat.", hstr);
  9021. format(hstr, sizeof(hstr), "%s\n{007BD0}/nwarn{B4B5B7} - Newbie chat warns a player.", hstr);
  9022. format(hstr, sizeof(hstr), "%s\n{007BD0}/ncheck{B4B5B7} - Checks a players newbie warnings.", hstr);
  9023. format(hstr, sizeof(hstr), "%s\n{007BD0}/(n)(r)emove(w)arnings{B4B5B7} - Removes a players newbie warnings.", hstr);
  9024. format(hstr, sizeof(hstr), "%s\n{007BD0}/nonewbie{B4B5B7} - Enables or disables the newbie chat.", hstr);
  9025. format(hstr, sizeof(hstr), "%s\n{007BD0}/makehelper{B4B5B7} - Makes a player a helper.", hstr);
  9026. format(hstr, sizeof(hstr), "%s\n{007BD0}/omakehelper{B4B5B7} - Makes a player a helper.", hstr);
  9027. format(hstr, sizeof(hstr), "%s\n{007BD0}/helperhelp{B4B5B7} - Displays all the helper commands.", hstr);
  9028. format(hstr, sizeof(hstr), "%s\n{007BD0}/nametag{B4B5B7} - Set a colored nametag above your name.", hstr);
  9029. format(hstr, sizeof(hstr), "%s\n{007BD0}/newbietag{B4B5B7} - Set your tag in the newbie chat.", hstr);
  9030. ShowPlayerDialog(playerid, 87, DIALOG_STYLE_MSGBOX, "Helper", hstr, "Ok", "Back");
  9031. return 1;
  9032. }
  9033. if(listitem == 13) // Developer
  9034. {
  9035. if(PlayerInfo[playerid][pDev] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to view this.");
  9036. new hstr[1024];
  9037. format(hstr, sizeof(hstr), "{007BD0}Developer Help:{B4B5B7}\n", hstr);
  9038. format(hstr, sizeof(hstr), "%sThe following commands are for developers:\n", hstr);
  9039. format(hstr, sizeof(hstr), "%s\n{007BD0}/(d)ev(c)hat{B4B5B7} - Displays a message in the developer chat.", hstr);
  9040. format(hstr, sizeof(hstr), "%s\n{007BD0}/viewhouseint{B4B5B7} - View house interiors.", hstr);
  9041. format(hstr, sizeof(hstr), "%s\n{007BD0}/devs{B4B5B7} - Lists all developers.", hstr);
  9042. format(hstr, sizeof(hstr), "%s\n{007BD0}/makedev{B4B5B7} - Makes a player a developer.", hstr);
  9043. format(hstr, sizeof(hstr), "%s\n{007BD0}/devhelp{B4B5B7} - Displays all the developer commands.", hstr);
  9044. format(hstr, sizeof(hstr), "%s\n{007BD0}/nametag{B4B5B7} - Set a colored nametag above your name.", hstr);
  9045. format(hstr, sizeof(hstr), "%s\n{007BD0}/newbietag{B4B5B7} - Set your tag in the newbie chat.", hstr);
  9046. ShowPlayerDialog(playerid, 87, DIALOG_STYLE_MSGBOX, "Developer", hstr, "Ok", "Back");
  9047. return 1;
  9048. }
  9049. if(listitem == 14) // Beta Tester
  9050. {
  9051. if(PlayerInfo[playerid][pTester] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to view this.");
  9052. new hstr[1024];
  9053. format(hstr, sizeof(hstr), "{007BD0}Beta Tester Help:{B4B5B7}\n", hstr);
  9054. format(hstr, sizeof(hstr), "%sThe following commands are for beta testers:\n", hstr);
  9055. format(hstr, sizeof(hstr), "%s\n{007BD0}/(t)est(c)hat{B4B5B7} - Displays a message in the beta tester chat.", hstr);
  9056. format(hstr, sizeof(hstr), "%s\n{007BD0}/testers{B4B5B7} - Lists all beta testers.", hstr);
  9057. format(hstr, sizeof(hstr), "%s\n{007BD0}/togtester{B4B5B7} - Enables or disables the beta tester chat.", hstr);
  9058. format(hstr, sizeof(hstr), "%s\n{007BD0}/acceptbug{B4B5B7} - Accepts a bug report.", hstr);
  9059. format(hstr, sizeof(hstr), "%s\n{007BD0}/treturn{B4B5B7} - Returns you to your original position.", hstr);
  9060. format(hstr, sizeof(hstr), "%s\n{007BD0}/bugmute{B4B5B7} - Mutes a player from reporting bugs.", hstr);
  9061. format(hstr, sizeof(hstr), "%s\n{007BD0}/maketester{B4B5B7} - Makes a player a beta tester.", hstr);
  9062. format(hstr, sizeof(hstr), "%s\n{007BD0}/nametag{B4B5B7} - Set a colored nametag above your name.", hstr);
  9063. format(hstr, sizeof(hstr), "%s\n{007BD0}/newbietag{B4B5B7} - Set your tag in the newbie chat.", hstr);
  9064. ShowPlayerDialog(playerid, 87, DIALOG_STYLE_MSGBOX, "Beta Tester", hstr, "Ok", "Back");
  9065. return 1;
  9066. }
  9067. if(listitem == 15) // VIP
  9068. {
  9069. if(PlayerInfo[playerid][pDonateRank] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to view this.");
  9070. new hstr[1024];
  9071. format(hstr, sizeof(hstr), "{007BD0}VIP Help:{B4B5B7}\n", hstr);
  9072. format(hstr, sizeof(hstr), "%sThe following commands are for vips:\n", hstr);
  9073. format(hstr, sizeof(hstr), "%s\n{007BD0}/purchase{B4B5B7} - Purchase Items from the VIP Club or Blackmarket.", hstr);
  9074. format(hstr, sizeof(hstr), "%s\n{007BD0}/getgift{B4B5B7} - Gets a random gift from the VIP Club.", hstr);
  9075. format(hstr, sizeof(hstr), "%s\n{007BD0}/(v)ip(c)hat{B4B5B7} - Displays a message in the VIP chat.", hstr);
  9076. format(hstr, sizeof(hstr), "%s\n{007BD0}/togvc{B4B5B7} - Hides or shows the VIP chat.", hstr);
  9077. format(hstr, sizeof(hstr), "%s\n{007BD0}/viptime{B4B5B7} - Displays your VIP join or expiry date.", hstr);
  9078. format(hstr, sizeof(hstr), "%s\n{007BD0}/vip{B4B5B7} - Set VIP nametag and other things.", hstr);
  9079. format(hstr, sizeof(hstr), "%s\n{007BD0}/nametag{B4B5B7} - Set a colored nametag above your name.", hstr);
  9080. format(hstr, sizeof(hstr), "%s\n{007BD0}/newbietag{B4B5B7} - Set your tag in the newbie chat.", hstr);
  9081. ShowPlayerDialog(playerid, 87, DIALOG_STYLE_MSGBOX, "VIP", hstr, "Ok", "Back");
  9082. return 1;
  9083. }
  9084. if(listitem == 16) // Character
  9085. {
  9086. new hstr[1024];
  9087. format(hstr, sizeof(hstr), "{007BD0}Character Help{B4B5B7}\n", hstr);
  9088. format(hstr, sizeof(hstr), "%s\n{007BD0}/appearance{B4B5B7} - sets and displays your own/others set appearances.", hstr);
  9089. format(hstr, sizeof(hstr), "%s\n{007BD0}/walkstyle{B4B5B7} - sets your character's walk style.", hstr);
  9090. format(hstr, sizeof(hstr), "%s\n{007BD0}/namechange{B4B5B7} - inside the city hall, this allows you to change your name.", hstr);
  9091. format(hstr, sizeof(hstr), "%s\n{007BD0}/inventory{B4B5B7} - displays inventory items.", hstr);
  9092. format(hstr, sizeof(hstr), "%s\n{007BD0}/animlist{B4B5B7} - displays all available animations.", hstr);
  9093. format(hstr, sizeof(hstr), "%s\n{007BD0}/licenses{B4B5B7} - displays your licenses.", hstr);
  9094. format(hstr, sizeof(hstr), "%s\n{007BD0}/showlicenses{B4B5B7} - lets you show your licenses to another player", hstr);
  9095. format(hstr, sizeof(hstr), "%s\n{007BD0}/gear{B4B5B7} - allows you to manage your character's gear, remember to /buygear first.", hstr);
  9096. ShowPlayerDialog(playerid, 393, DIALOG_STYLE_MSGBOX, "Character", hstr, "Ok", "Back");
  9097. return 1;
  9098. }
  9099. if(listitem == 17){
  9100. new hstr[1024];
  9101. format(hstr, sizeof(hstr), "{007BD0}Global Chat Commands:{B4B5B7}\n", hstr);
  9102. format(hstr, sizeof(hstr), "%s\n{007DB0}/gc{B4B5B7} - used for chatting with other players in global chat.", hstr);
  9103. format(hstr, sizeof(hstr), "%s\n{007DB0}/togglobal{B4B5B7} - used for toggling on/off global chat.", hstr);
  9104. format(hstr, sizeof(hstr), "%s\n{007DB0}/requestglobalunmute{B4B5B7} - used for appealing for an unmute from global chat.", hstr);
  9105. ShowPlayerDialog(playerid, 393, DIALOG_STYLE_MSGBOX, "Global Chat", hstr, "Ok", "Back");
  9106. return 1;
  9107. }
  9108. /*if(listitem == 17) // drugs
  9109. {
  9110. new hstr[1024];
  9111. format(hstr, sizeof(hstr), "{007BD0}Drug Help{B4B5B7}\n", hstr);
  9112. format(hstr, sizeof(hstr), "%s\n{007BD0}/inv{B4B5B7} - List all the drugs in your inventory.", hstr);
  9113. format(hstr, sizeof(hstr), "%s\n{007BD0}/dropdrug{B4B5B7} - Allows you to drop drugs on the floor.", hstr);
  9114. format(hstr, sizeof(hstr), "%s\n{007BD0}/takedrug{B4B5B7} - Picks up nearby drugs off of the floor.", hstr);
  9115. format(hstr, sizeof(hstr), "%s\n{007BD0}/givedrug{B4B5B7} - Gives a drug to a specified player.", hstr);
  9116. format(hstr, sizeof(hstr), "%s\n{007BD0}/usedrug{B4B5B7} - Uses a specific drug.", hstr);
  9117. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Drugs", hstr, "Ok", "Close");
  9118. }
  9119. if(listitem == 18) // insurance
  9120. {
  9121. new hstr[1024];
  9122. format(hstr, sizeof(hstr), "{007BD0}Insurance Help{B4B5B7}\n", hstr);
  9123. format(hstr, sizeof(hstr), "%s\n{007BD0}/buyinsurance{B4B5B7} - Buy insurance (must be used in the All Saints Hospital)", hstr);
  9124. format(hstr, sizeof(hstr), "%s\n{007BD0}/myinsurance{B4B5B7} - Displays your insurance uses.", hstr);
  9125. 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);
  9126. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Insurance", hstr, "Ok", "Close");
  9127. }*/
  9128. }
  9129. return 1;
  9130. }
  9131. if(dialogid == 80) //Account
  9132. {
  9133. if(!response)
  9134. ShowHelpDialog(playerid);
  9135. return 1;
  9136. }
  9137. if(dialogid == 81) //General
  9138. {
  9139. if(!response)
  9140. ShowHelpDialog(playerid);
  9141. return 1;
  9142. }
  9143. if(dialogid == 82) //Chat
  9144. {
  9145. if(!response)
  9146. ShowHelpDialog(playerid);
  9147. return 1;
  9148. }
  9149. if(dialogid == 83) //Toggles
  9150. {
  9151. if(!response)
  9152. ShowHelpDialog(playerid);
  9153. return 1;
  9154. }
  9155. if(dialogid == 84) //Bank
  9156. {
  9157. if(!response)
  9158. ShowHelpDialog(playerid);
  9159. return 1;
  9160. }
  9161. if(dialogid == 85) //Faction
  9162. {
  9163. if(!response)
  9164. ShowHelpDialog(playerid);
  9165. return 1;
  9166. }
  9167. if(dialogid == 86) //Family
  9168. {
  9169. if(!response)
  9170. ShowHelpDialog(playerid);
  9171. return 1;
  9172. }
  9173. if(dialogid == 87) //Other
  9174. {
  9175. if(!response)
  9176. ShowHelpDialog(playerid);
  9177. return 1;
  9178. }
  9179. if(dialogid == 88) //Biz
  9180. {
  9181. if(!response)
  9182. ShowHelpDialog(playerid);
  9183. return 1;
  9184. }
  9185. if(dialogid == 89) //Gambling
  9186. {
  9187. if(!response)
  9188. ShowHelpDialog(playerid);
  9189. return 1;
  9190. }
  9191. if(dialogid == 90) //Admin
  9192. {
  9193. if(!response)
  9194. ShowHelpDialog(playerid);
  9195. return 1;
  9196. }
  9197. if(dialogid == 393) //Character
  9198. {
  9199. if(!response)
  9200. ShowHelpDialog(playerid);
  9201. return 1;
  9202. }
  9203. //guide
  9204. if(dialogid == DIALOGID_GUIDE_MAIN) //main guide screen
  9205. {
  9206. if(response)
  9207. {
  9208. if(listitem == 0) // How to make money
  9209. {
  9210. new hstr[2048];
  9211. format(hstr, sizeof(hstr), "%s{007BD0}Jobs{FFFFFF}\n", hstr);
  9212. 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);
  9213. 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);
  9214. 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);
  9215. 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);
  9216. format(hstr, sizeof(hstr), "%sYou can get a job by going to the job location and typing /getjob.\n", hstr);
  9217. format(hstr, sizeof(hstr), "%sTo see a list of jobs and their locations, type {FFFF91}/jobhelp{FFFFFF}.\n\n", hstr);
  9218. format(hstr, sizeof(hstr), "%s{007BD0}Activities & Missions{FFFFFF}\n", hstr);
  9219. 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);
  9220. 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);
  9221. format(hstr, sizeof(hstr), "%sTo sell cars at the crane type {FFFF91}/dropcar{FFFFFF}.\n", hstr);
  9222. format(hstr, sizeof(hstr), "%s{007BD0}Paycheck{FFFFFF}\n", hstr);
  9223. 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);
  9224. 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);
  9225. format(hstr, sizeof(hstr), "%sWhen you have enough money to {FFFF91}/buylevel{FFFFFF} your paycheck money will increase.", hstr);
  9226. ShowPlayerDialog(playerid, DIALOGID_GUIDE_MONEY, DIALOG_STYLE_MSGBOX, "How to make money", hstr, "Ok", "Back");
  9227. return 1;
  9228. }
  9229. if(listitem == 1) // Getting guns
  9230. {
  9231. new hstr[512];
  9232. format(hstr, sizeof(hstr), "%s{007BD0}Getting guns{FFFFFF}\n", hstr);
  9233. 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);
  9234. 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);
  9235. format(hstr, sizeof(hstr), "%syourself or players. You must be at least level 2 before buying legal from an Ammunation.", hstr);
  9236. ShowPlayerDialog(playerid, DIALOGID_GUIDE_GUNS, DIALOG_STYLE_MSGBOX, "Getting guns", hstr, "Ok", "Back");
  9237. return 1;
  9238. }
  9239. if(listitem == 2) // Joining a faction or gang
  9240. {
  9241. new hstr[512];
  9242. format(hstr, sizeof(hstr), "{007BD0}Joining a faction or gang:{FFFFFF}\n", hstr);
  9243. 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);
  9244. format(hstr, sizeof(hstr), "%sGrove Street and Ballas are both public gangs and are good if you want to quickly join one.\n", hstr);
  9245. format(hstr, sizeof(hstr), "%sYou can display a list of gangs by typing {FFFF91}/families{FFFFFF}.", hstr);
  9246. format(hstr, sizeof(hstr), "%s\nJoining factions requires filling out an application on the forums at {8D8DFF}p-rp.xyz.", hstr);
  9247. ShowPlayerDialog(playerid, DIALOGID_GUIDE_FACTION, DIALOG_STYLE_MSGBOX, "Joining a faction or gang", hstr, "Ok", "Back");
  9248. return 1;
  9249. }
  9250. if(listitem == 3) // How to roleplay
  9251. {
  9252. new hstr[612];
  9253. format(hstr, sizeof(hstr), "{007BD0}How to roleplay:{FFFFFF}\n", hstr);
  9254. format(hstr, sizeof(hstr), "%sThe fastest way to learn how to roleplay is to watch other people doing it.\n", hstr);
  9255. 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);
  9256. format(hstr, sizeof(hstr), "%sThere are commands which can help improve your roleplay skills quickly that you should familiarize yourself with.\n", hstr);
  9257. 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);
  9258. format(hstr, sizeof(hstr), "%s{FFFF91}/do{FFFFFF} - For describing the situation. (example: /do The stick is brown.\n", hstr);
  9259. format(hstr, sizeof(hstr), "%s{FFFF91}/animhelp{FFFFFF} - displays a list of animations.", hstr);
  9260. ShowPlayerDialog(playerid, DIALOGID_GUIDE_ROLEPLAY, DIALOG_STYLE_MSGBOX, "How to roleplay", hstr, "Ok", "Back");
  9261. return 1;
  9262. }
  9263. if(listitem == 4) // How to level up
  9264. {
  9265. new hstr[812];
  9266. format(hstr, sizeof(hstr), "{007BD0}How to level up:{FFFFFF}\n", hstr);
  9267. 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);
  9268. 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);
  9269. 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);
  9270. format(hstr, sizeof(hstr), "%sThe ability to buy weapons from Ammunations. (Level 2)\n", hstr);
  9271. 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);
  9272. format(hstr, sizeof(hstr), "%sprice if they are killed by a hitman).\n", hstr);
  9273. format(hstr, sizeof(hstr), "%sUnlock more commands ({FFFF91}/wiretransfer{FFFFFF} etc).", hstr);
  9274. 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);
  9275. ShowPlayerDialog(playerid, DIALOGID_GUIDE_LEVEL, DIALOG_STYLE_MSGBOX, "How to level up", hstr, "Ok", "Back");
  9276. return 1;
  9277. }
  9278. }
  9279. viewingGuide[playerid] = 0;
  9280. return 1;
  9281. }
  9282. if(dialogid == DIALOGID_GUIDE_MONEY)
  9283. {
  9284. if(!response)
  9285. {
  9286. 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");
  9287. return 1;
  9288. }
  9289. 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.");
  9290. viewingGuide[playerid] = 0;
  9291. }
  9292. if(dialogid == DIALOGID_GUIDE_GUNS)
  9293. {
  9294. if(!response)
  9295. {
  9296. 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");
  9297. return 1;
  9298. }
  9299. 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.");
  9300. viewingGuide[playerid] = 0;
  9301. }
  9302. if(dialogid == DIALOGID_GUIDE_FACTION)
  9303. {
  9304. if(!response)
  9305. {
  9306. 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");
  9307. return 1;
  9308. }
  9309. 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.");
  9310. viewingGuide[playerid] = 0;
  9311. }
  9312. if(dialogid == DIALOGID_GUIDE_ROLEPLAY)
  9313. {
  9314. if(!response)
  9315. {
  9316. 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");
  9317. return 1;
  9318. }
  9319. 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.");
  9320. viewingGuide[playerid] = 0;
  9321. }
  9322. if(dialogid == DIALOGID_GUIDE_LEVEL)
  9323. {
  9324. if(!response)
  9325. {
  9326. 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");
  9327. return 1;
  9328. }
  9329. 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.");
  9330. viewingGuide[playerid] = 0;
  9331. }
  9332. if(dialogid == DIALOG_SENATE_MAIN) //Senate
  9333. {
  9334. if(response)
  9335. {
  9336. if(listitem == 0)
  9337. {
  9338. if(PlayerInfo[playerid][pOnDuty] == 0) //if player is off duty, set them them on
  9339. {
  9340. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9341. format(str, sizeof(str), "* %s retrieves his equipment from his locker and equips his badge & body camera.", sendername);
  9342. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  9343. SetPlayerColor(playerid, TCOLOR_SENATE);
  9344. if(PlayerInfo[playerid][pMember] == 11) FakeFaction[playerid] = 6;
  9345. GivePlayerGun(playerid, 24);
  9346. SetPlayerArmour(playerid, 100.0);
  9347. PlayerInfo[playerid][pOnDuty] = 1;
  9348. TogglePlayerControllable(playerid, true);
  9349. if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] != FACTION_GOV)
  9350. {
  9351. SetPlayerSkin(playerid, 165);
  9352. PlayerInfo[playerid][pModel] = 165;
  9353. PlayerInfo[playerid][pOnDuty] = 1;
  9354. PlayerInfo[playerid][pMember] = FACTION_GOV;
  9355. PlayerInfo[playerid][pRank] = 1;
  9356. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have been given a badge automatically (GOV Security)");
  9357. }
  9358. }
  9359. else if(PlayerInfo[playerid][pOnDuty] == 1) //if player is on duty, set them off
  9360. {
  9361. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9362. format(str, sizeof(str), "* %s places his equipment inside his locker and removes his badge & body camera.", sendername);
  9363. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  9364. SetPlayerColor(playerid, TCOLOR_WHITE);
  9365. PlayerInfo[playerid][pGun2] = 0;
  9366. ResetPlayerWeapons(playerid);
  9367. ClearGuns(playerid);
  9368. SetPlayerArmour(playerid, 0.0);
  9369. PlayerInfo[playerid][pOnDuty] = 0;
  9370. TogglePlayerControllable(playerid, true);
  9371. // Shows civilian skin selector
  9372. ShowSkinShop(playerid, true, false, false, false, false);
  9373. }
  9374. }
  9375. if(listitem == 1)
  9376. {
  9377. // Shows faction skin selector
  9378. ShowSkinShop(playerid, false, true, false, false, true);
  9379. }
  9380. if(listitem == 2)
  9381. {
  9382. 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
  9383. }
  9384. }
  9385. return 1;
  9386. }
  9387. if(dialogid == DIALOG_SENATE_ARMORY)
  9388. {
  9389. if(response)
  9390. {
  9391. if(listitem == 0) // Deagle
  9392. {
  9393. if(PlayerInfo[playerid][pCash] < 500)
  9394. {
  9395. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9396. TogglePlayerControllable(playerid, true);
  9397. return 1;
  9398. }
  9399. else
  9400. {
  9401. GiveMoney(playerid, -500);
  9402. GivePlayerGun(playerid, 24);
  9403. TogglePlayerControllable(playerid, true);
  9404. }
  9405. }
  9406. if(listitem == 1) //M4
  9407. {
  9408. if(PlayerInfo[playerid][pRank] < 2) return SendClientMessage(playerid, -1, "Only R2+ have access to this locker");
  9409. if(PlayerInfo[playerid][pCash] < 6000)
  9410. {
  9411. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9412. TogglePlayerControllable(playerid, true);
  9413. return 1;
  9414. }
  9415. else
  9416. {
  9417. GiveMoney(playerid, -6000);
  9418. GivePlayerGun(playerid, 31);
  9419. TogglePlayerControllable(playerid, true);
  9420. }
  9421. }
  9422. if(listitem == 2) //kevlar
  9423. {
  9424. if(PlayerInfo[playerid][pCash] < 150)
  9425. {
  9426. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9427. TogglePlayerControllable(playerid, true);
  9428. return 1;
  9429. }
  9430. else
  9431. {
  9432. SetPlayerArmour(playerid, 100);
  9433. GiveMoney(playerid, -150);
  9434. TogglePlayerControllable(playerid, true);
  9435. }
  9436. }
  9437. if(listitem == 3)
  9438. {
  9439. if(PlayerInfo[playerid][pCash] < 200)
  9440. {
  9441. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9442. TogglePlayerControllable(playerid, true);
  9443. return 1;
  9444. }
  9445. else
  9446. {
  9447. SetPlayerHealth(playerid, 100);
  9448. GiveMoney(playerid, -200);
  9449. TogglePlayerControllable(playerid, true);
  9450. }
  9451. }
  9452. }
  9453. else
  9454. {
  9455. ShowPlayerDialog(playerid, DIALOG_SENATE_MAIN, DIALOG_STYLE_LIST, "Government", "Duty\nChange Uniform\nArmory", "Select", "Cancel"); // Senate Locker
  9456. }
  9457. return 1;
  9458. }
  9459. if(dialogid == DIALOG_HC_MAIN) //High Court
  9460. {
  9461. if(response)
  9462. {
  9463. if(listitem == 0)
  9464. {
  9465. if(PlayerInfo[playerid][pOnDuty] == 0) //if player is off duty, set them them on
  9466. {
  9467. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9468. format(str, sizeof(str), "* %s takes their equipment from the locker.", sendername);
  9469. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  9470. SetPlayerColor(playerid, TCOLOR_HIGHCOURT);
  9471. SetPlayerArmour(playerid, 100.0);
  9472. PlayerInfo[playerid][pOnDuty] = 1;
  9473. TogglePlayerControllable(playerid, true);
  9474. }
  9475. else if(PlayerInfo[playerid][pOnDuty] == 1) //if player is on duty, set them off
  9476. {
  9477. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9478. format(str, sizeof(str), "* %s places their equipment in the locker.", sendername);
  9479. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  9480. SetPlayerColor(playerid, TCOLOR_WHITE);
  9481. ResetPlayerWeapons(playerid);
  9482. ClearGuns(playerid);
  9483. SetPlayerArmour(playerid, 0.0);
  9484. PlayerInfo[playerid][pOnDuty] = 0;
  9485. TogglePlayerControllable(playerid, true);
  9486. }
  9487. }
  9488. if(listitem == 1)
  9489. {
  9490. ShowSkinShop(playerid, false, true, false, false, true);
  9491. }
  9492. if(listitem == 2)
  9493. {
  9494. 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
  9495. }
  9496. }
  9497. return 1;
  9498. }
  9499. if(dialogid == DIALOG_HC_ARMORY)
  9500. {
  9501. if(response)
  9502. {
  9503. if(listitem == 0) // HP
  9504. {
  9505. SetPlayerHealth(playerid, 100);
  9506. }
  9507. if(listitem == 1) // Kevlar
  9508. {
  9509. if(PlayerInfo[playerid][pCash] < 1000)
  9510. {
  9511. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9512. TogglePlayerControllable(playerid, true);
  9513. return 1;
  9514. }
  9515. else
  9516. {
  9517. SetPlayerArmour(playerid, 100);
  9518. GiveMoney(playerid, -1000);
  9519. }
  9520. }
  9521. if(listitem == 2) //Deagle
  9522. {
  9523. GivePlayerGun(playerid, 24);
  9524. TogglePlayerControllable(playerid, true);
  9525. }
  9526. if(listitem == 3) //MP5
  9527. {
  9528. if(PlayerInfo[playerid][pCash] < 1000)
  9529. {
  9530. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9531. TogglePlayerControllable(playerid, true);
  9532. return 1;
  9533. }
  9534. else
  9535. {
  9536. GiveMoney(playerid, -1000);
  9537. GivePlayerGun(playerid, 29);
  9538. TogglePlayerControllable(playerid, true);
  9539. }
  9540. }
  9541. if(listitem == 4) //Shotgun
  9542. {
  9543. if(PlayerInfo[playerid][pCash] < 1000)
  9544. {
  9545. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9546. TogglePlayerControllable(playerid, true);
  9547. return 1;
  9548. }
  9549. else
  9550. {
  9551. GiveMoney(playerid, -1000);
  9552. GivePlayerGun(playerid, 25);
  9553. TogglePlayerControllable(playerid, true);
  9554. }
  9555. }
  9556. if(listitem == 5) //Mace
  9557. {
  9558. if(PlayerInfo[playerid][pCash] < 25)
  9559. {
  9560. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9561. TogglePlayerControllable(playerid, true);
  9562. return 1;
  9563. }
  9564. else
  9565. {
  9566. GiveMoney(playerid, -25);
  9567. GivePlayerGun(playerid, 41);
  9568. TogglePlayerControllable(playerid, true);
  9569. }
  9570. }
  9571. if(listitem == 6) // portable mdc
  9572. {
  9573. PlayerInfo[playerid][pPortMDC] = 1;
  9574. SendClientMessage(playerid, COLOR_ORANGE, "You take a portable MDC unit from the locker.");
  9575. SendClientMessage(playerid, COLOR_ORANGE, "(( This will be lost upon death. ))");
  9576. }
  9577. }
  9578. else
  9579. {
  9580. ShowPlayerDialog(playerid, DIALOG_HC_MAIN, DIALOG_STYLE_LIST, "Judicial Department", "Duty\nChange Uniform\nArmory", "Select", "Cancel"); // HC Locker
  9581. }
  9582. return 1;
  9583. }
  9584. if(dialogid == 93) //Tiki Exchange
  9585. {
  9586. if(response)
  9587. {
  9588. if(listitem == 0) // SD Pistol
  9589. {
  9590. if(PlayerInfo[playerid][pConnectTime] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this exchange.");
  9591. if(PlayerInfo[playerid][pTikis] < 1) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9592. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9593. PlayerInfo[playerid][pTikis] -= 1;
  9594. GivePlayerGun(playerid, 23);
  9595. SendClientMessage(playerid, COLOR_GREY, "You exchanged 1 tiki for a Silenced Pistol.");
  9596. return 1;
  9597. }
  9598. if(listitem == 1) // Full Armor
  9599. {
  9600. if(PlayerInfo[playerid][pTikis] < 3) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9601. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9602. PlayerInfo[playerid][pTikis] -= 3;
  9603. SetPlayerArmour(playerid, 100);
  9604. SendClientMessage(playerid, COLOR_GREY, "You exchanged 3 tikis for Full Armor.");
  9605. return 1;
  9606. }
  9607. if(listitem == 2) // 25 Pot
  9608. {
  9609. SendClientMessage(playerid, COLOR_GREY, "This has been disabled.");
  9610. return 1;
  9611. }
  9612. if(listitem == 3) // 25 Crack
  9613. {
  9614. SendClientMessage(playerid, COLOR_GREY, "This has been disabled.");
  9615. return 1;
  9616. }
  9617. if(listitem == 4) // 10,000 materials
  9618. {
  9619. if(PlayerInfo[playerid][pTikis] < 10) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9620. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9621. PlayerInfo[playerid][pTikis] -= 10;
  9622. PlayerInfo[playerid][pMats] += 10000;
  9623. SendClientMessage(playerid, COLOR_GREY, "You exchanged 10 tikis for 10,000 Materials.");
  9624. return 1;
  9625. }
  9626. if(listitem == 5) // $100,000
  9627. {
  9628. if(PlayerInfo[playerid][pTikis] < 12) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9629. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9630. PlayerInfo[playerid][pTikis] -= 12;
  9631. GiveMoney(playerid, 100000);
  9632. SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for $100,000.");
  9633. return 1;
  9634. }
  9635. if(listitem == 6) // Gamble
  9636. {
  9637. if(PlayerInfo[playerid][pTikis] < 12) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9638. new rand = 0 + random(14);
  9639. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9640. PlayerInfo[playerid][pTikis] -= 12;
  9641. if(rand == 0)
  9642. {
  9643. GivePlayerGun(playerid, 28);
  9644. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a Micro SMG.");
  9645. }
  9646. else if(rand == 1)
  9647. {
  9648. GivePlayerGun(playerid, 26);
  9649. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a Sawnoff Shotgun.");
  9650. }
  9651. else if(rand == 2)
  9652. {
  9653. PlayerInfo[playerid][pCash] += 115000;
  9654. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for $115,000.");
  9655. }
  9656. else if(rand == 3)
  9657. {
  9658. PlayerInfo[playerid][pTikis] += 25;
  9659. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for 25 Tikis.");
  9660. }
  9661. else if(rand == 4)
  9662. {
  9663. /*PlayerInfo[playerid][pSHealth] = 100;
  9664. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for Full Armor on spawn.");*/
  9665. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for nothing! Try again, sorry for your luck.");
  9666. }
  9667. else if(rand == 5)
  9668. {
  9669. GivePlayerGun(playerid, 26);
  9670. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a Sawnoff Shotgun.");
  9671. }
  9672. else if(rand == 6)
  9673. {
  9674. GivePlayerGun(playerid, 26);
  9675. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a Sawnoff Shotgun.");
  9676. }
  9677. else if(rand == 7)
  9678. {
  9679. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for nothing! Try again, sorry for your luck.");
  9680. }
  9681. else if(rand == 8)
  9682. {
  9683. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for nothing! Try again, sorry for your luck.");
  9684. }
  9685. else if(rand == 9)
  9686. {
  9687. GivePlayerGun(playerid, 26);
  9688. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a Sawnoff Shotgun.");
  9689. }
  9690. else if(rand == 10)
  9691. {
  9692. GivePlayerGun(playerid, 32);
  9693. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a Tec 9.");
  9694. }
  9695. else if(rand == 11)
  9696. {
  9697. PlayerInfo[playerid][gTicket] = 5;
  9698. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for 5 Gear Tickets.");
  9699. }
  9700. else if(rand == 12)
  9701. {
  9702. PlayerInfo[playerid][pMats] += 50000;
  9703. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for 50,000 Materials.");
  9704. }
  9705. else if(rand == 13)
  9706. {
  9707. PlayerInfo[playerid][pSHP] = 100;
  9708. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for Full Health on spawn.");
  9709. }
  9710. else
  9711. {
  9712. PlayerInfo[playerid][pSHP] = 100;
  9713. return SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for Full Health on spawn.");
  9714. }
  9715. }
  9716. if(listitem == 7) // Mace
  9717. {
  9718. if(PlayerInfo[playerid][pTikis] < 12) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9719. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9720. PlayerInfo[playerid][pTikis] -= 12;
  9721. GivePlayerGun(playerid, 41);
  9722. SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a mace.");
  9723. return 1;
  9724. }
  9725. if(listitem == 8) // Voodoo Magic
  9726. {
  9727. if(PlayerInfo[playerid][pTikis] < 25) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9728. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9729. PlayerInfo[playerid][pTikis] -= 25;
  9730. VoodooSpell[playerid] = 1;
  9731. SendClientMessage(playerid, COLOR_GREY, "You exchanged 25 tikis for Voodoo Magic (/vsetweather).");
  9732. return 1;
  9733. }
  9734. if(listitem == 9) // C4
  9735. {
  9736. SendClientMessage(playerid, COLOR_GREY, "This has been disabled.");
  9737. return 1;
  9738. }
  9739. if(listitem == 10) // Gear Ticket
  9740. {
  9741. if(PlayerInfo[playerid][pTikis] < 6) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9742. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9743. PlayerInfo[playerid][pTikis] -= 6;
  9744. PlayerInfo[playerid][gTicket] += 1;
  9745. SendClientMessage(playerid, COLOR_GREY, "You exchanged 6 tikis for a Gear Ticket.");
  9746. return 1;
  9747. }
  9748. if(listitem == 11) // Large Boombox
  9749. {
  9750. if(PlayerInfo[playerid][pTikis] < 6) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9751. if(PlayerInfo[playerid][pStereo]) return SendClientMessage(playerid, COLOR_GREY, "You already have a Large Boombox.");
  9752. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9753. PlayerInfo[playerid][pTikis] -= 6;
  9754. PlayerInfo[playerid][pStereo] = 4;
  9755. SendClientMessage(playerid, COLOR_GREY, "You exchanged 6 tikis for a Large Boombox.");
  9756. return 1;
  9757. }
  9758. if(listitem == 12) // TEC 9
  9759. {
  9760. if(PlayerInfo[playerid][pConnectTime] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this exchange.");
  9761. if(PlayerInfo[playerid][pTikis] < 12) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9762. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9763. PlayerInfo[playerid][pTikis] -= 12;
  9764. GivePlayerGun(playerid, 28);
  9765. SendClientMessage(playerid, COLOR_GREY, "You exchanged 12 tikis for a TEC 9.");
  9766. return 1;
  9767. }
  9768. if(listitem == 13) // Grenade
  9769. {
  9770. return SendClientMessage(playerid, COLOR_GREY, "Grenades are currently disabled!");
  9771. }
  9772. if(listitem == 14) // RPG
  9773. {
  9774. return SendClientMessage(playerid, COLOR_GREY, "RPG is currently disabled!");
  9775. }
  9776. if(listitem == 15) // Silver VIP
  9777. {
  9778. if(PlayerInfo[playerid][pTikis] < 40) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9779. //give vip
  9780. new Year, Month, Day;
  9781. getdate(Year, Month, Day);
  9782. if(Month == 1 && Day >= 29) return SendClientMessage(playerid, COLOR_GREY, "You cannot get Silver VIP today.");
  9783. //take tikis
  9784. PlayerInfo[playerid][pTikis] -= 40;
  9785. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9786. SendClientMessage(playerid, COLOR_GREY, "You exchanged 40 tikis for Silver VIP.");
  9787. PlayerInfo[playerid][pDonateRank] = 2;
  9788. PlayerInfo[playerid][pTag] = NTAG_SVIP;
  9789. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has purchased silver VIP from the Tiki Store.", PlayerName(playerid));
  9790. ABroadCast(COLOR_WHITE, str, 1);
  9791. format(str, 32, "%02d/%02d/%d", Month, Day, Year);
  9792. strmid(PlayerInfo[playerid][pVIPJoinDate], str, 0, strlen(str), 255);
  9793. format(str, 32, "%02d/%02d/%d", Month +1, Day, Year);
  9794. strmid(PlayerInfo[playerid][pVIPExpDate], str, 0, strlen(str), 255);
  9795. if(Month == 12)
  9796. {
  9797. format(PlayerInfo[playerid][pVIPExpDate], 32, "%02d/%02d/%d", 1, Day, Year +1);
  9798. }
  9799. format(str, sizeof(str), "Join Date: %s, Expire Date: %s", PlayerInfo[playerid][pVIPJoinDate], PlayerInfo[playerid][pVIPExpDate]);
  9800. SendClientMessage(playerid, COLOR_GRAD2, str);
  9801. return 1;
  9802. }
  9803. if(listitem == 16) // Knife
  9804. {
  9805. if(PlayerInfo[playerid][pConnectTime] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this exchange.");
  9806. if(PlayerInfo[playerid][pTikis] < 15) return SendClientMessage(playerid, COLOR_GREY, "You do not have enough tikis.");
  9807. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  9808. PlayerInfo[playerid][pTikis] -= 15;
  9809. GivePlayerGun(playerid, 4);
  9810. SendClientMessage(playerid, COLOR_GREY, "You exchanged 15 tikis for a Knife.");
  9811. return 1;
  9812. }
  9813. }
  9814. return 1;
  9815. }
  9816. if(dialogid == 94) //Pickpocket
  9817. {
  9818. if(response)
  9819. {
  9820. new giveplayerid = Robbing[playerid];
  9821. if(IsPlayerConnected(giveplayerid) && BeingRobbed[giveplayerid] == playerid)
  9822. {
  9823. if(IsPlayerInRangeOfPlayer(1.0, playerid, giveplayerid))
  9824. {
  9825. if(listitem == 0) // Cash
  9826. {
  9827. if(PlayerInfo[giveplayerid][pCash] > 0)
  9828. {
  9829. new lvl = convertToLevel(JOBID_THIEF, PlayerInfo[playerid][pThieveSkill]);
  9830. new randmoney = lvl * random(PlayerInfo[giveplayerid][pCash] / 20);
  9831. if(randmoney < 0 || randmoney > 500000)
  9832. {
  9833. SendClientMessage(playerid, COLOR_GREY, "That dropped the money.");
  9834. Robbing[playerid] = 999;
  9835. BeingRobbed[giveplayerid] = 999;
  9836. return 1;
  9837. }
  9838. format(str, sizeof(str), "~w~Robbed %s~n~~g~$%d stolen.", PlayerICName(giveplayerid), randmoney);
  9839. displayCenterHUDInfo(playerid, str, 8);
  9840. format(str, sizeof(str), "~w~Robbed by %s~n~~r~$%d lost.", PlayerICName(playerid), randmoney);
  9841. displayCenterHUDInfo(giveplayerid, str, 8);
  9842. GiveMoney(playerid, randmoney);
  9843. GiveMoney(giveplayerid, -randmoney);
  9844. }
  9845. else
  9846. {
  9847. DisplayDialogForPlayer(playerid, 94);
  9848. return SendClientMessage(playerid, COLOR_GREY, "That player does not have any money on them.");
  9849. }
  9850. }
  9851. if(listitem == 1) // Crack
  9852. {
  9853. if(PlayerInfo[giveplayerid][pCocaine] > 0)
  9854. {
  9855. new lvl = convertToLevel(JOBID_THIEF, PlayerInfo[playerid][pThieveSkill]);
  9856. new randcrack = lvl * random(PlayerInfo[giveplayerid][pCocaine] / 5);
  9857. if(randcrack < 0 || randcrack > 500000)
  9858. {
  9859. SendClientMessage(playerid, COLOR_GREY, "That dropped the crack.");
  9860. Robbing[playerid] = 999;
  9861. BeingRobbed[giveplayerid] = 999;
  9862. return 1;
  9863. }
  9864. format(str, sizeof(str), "~w~Robbed %s~n~~g~%d grams of crack stolen.", PlayerICName(giveplayerid), randcrack);
  9865. displayCenterHUDInfo(playerid, str, 8);
  9866. format(str, sizeof(str), "~w~Robbed by %s~n~~r~%d grams of crak lost.", PlayerICName(playerid), randcrack);
  9867. displayCenterHUDInfo(giveplayerid, str, 8);
  9868. PlayerInfo[playerid][pCocaine] -= randcrack;
  9869. PlayerInfo[giveplayerid][pCocaine] += randcrack;
  9870. }
  9871. else
  9872. {
  9873. DisplayDialogForPlayer(playerid, 94);
  9874. return SendClientMessage(playerid, COLOR_GREY, "That player does not have any crack on them.");
  9875. }
  9876. }
  9877. if(listitem == 2) // Pot
  9878. {
  9879. if(PlayerInfo[giveplayerid][pCannabis] > 0)
  9880. {
  9881. new lvl = convertToLevel(JOBID_THIEF, PlayerInfo[playerid][pThieveSkill]);
  9882. new randpot = lvl * random(PlayerInfo[giveplayerid][pCannabis] / 5);
  9883. if(randpot < 0 || randpot > 500000)
  9884. {
  9885. SendClientMessage(playerid, COLOR_GREY, "That dropped the pot.");
  9886. Robbing[playerid] = 999;
  9887. BeingRobbed[giveplayerid] = 999;
  9888. return 1;
  9889. }
  9890. format(str, sizeof(str), "~w~Robbed %s~n~~g~%d grams of pot stolen.", PlayerICName(giveplayerid), randpot);
  9891. displayCenterHUDInfo(playerid, str, 8);
  9892. format(str, sizeof(str), "~w~Robbed by %s~n~~r~%d grams of pot lost.", PlayerICName(playerid), randpot);
  9893. displayCenterHUDInfo(giveplayerid, str, 8);
  9894. PlayerInfo[playerid][pCannabis] -= randpot;
  9895. PlayerInfo[giveplayerid][pCannabis] += randpot;
  9896. }
  9897. else
  9898. {
  9899. DisplayDialogForPlayer(playerid, 94);
  9900. return SendClientMessage(playerid, COLOR_GREY, "That player does not have any pot on them.");
  9901. }
  9902. }
  9903. if(listitem == 3) // Materials
  9904. {
  9905. if(PlayerInfo[giveplayerid][pMats] > 0)
  9906. {
  9907. new lvl = convertToLevel(JOBID_THIEF, PlayerInfo[playerid][pThieveSkill]);
  9908. new randmats = lvl * random(PlayerInfo[giveplayerid][pMats] / 20);
  9909. if(randmats < 0 || randmats > 500000)
  9910. {
  9911. SendClientMessage(playerid, COLOR_GREY, "That dropped the materials.");
  9912. Robbing[playerid] = 999;
  9913. BeingRobbed[giveplayerid] = 999;
  9914. return 1;
  9915. }
  9916. format(str, sizeof(str), "~w~Robbed %s~n~~g~%d materials stolen.", PlayerICName(giveplayerid), randmats);
  9917. displayCenterHUDInfo(playerid, str, 8);
  9918. format(str, sizeof(str), "~w~Robbed by %s~n~~r~%d materials lost.", PlayerICName(playerid), randmats);
  9919. displayCenterHUDInfo(giveplayerid, str, 8);
  9920. PlayerInfo[playerid][pMats] -= randmats;
  9921. PlayerInfo[giveplayerid][pMats] += randmats;
  9922. }
  9923. else
  9924. {
  9925. DisplayDialogForPlayer(playerid, 94);
  9926. return SendClientMessage(playerid, COLOR_GREY, "That player does not have any materials on them.");
  9927. }
  9928. }
  9929. Robbing[playerid] = 999;
  9930. BeingRobbed[giveplayerid] = 999;
  9931. PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
  9932. PlayerPlaySound(giveplayerid, 1145, 0.0, 0.0, 0.0);
  9933. PlayerInfo[playerid][pThieveSkill] ++;
  9934. if(PlayerInfo[playerid][pThieveSkill] == 50)
  9935. {
  9936. SendClientMessage(playerid, COLOR_YELLOW, "* Your Pick Pocket Skill is now Level 2, you will now earn more when stealing.");
  9937. }
  9938. else if(PlayerInfo[playerid][pThieveSkill] == 250)
  9939. {
  9940. SendClientMessage(playerid, COLOR_YELLOW, "* Your Pick Pocket Skill is now Level 3, you will now earn more when stealing.");
  9941. }
  9942. else if(PlayerInfo[playerid][pThieveSkill] == 500)
  9943. {
  9944. SendClientMessage(playerid, COLOR_YELLOW, "* Your Pick Pocket Skill is now Level 4, you will now earn more when stealing.");
  9945. }
  9946. else if(PlayerInfo[playerid][pThieveSkill] == 1000)
  9947. {
  9948. SendClientMessage(playerid, COLOR_YELLOW, "* Your Pick Pocket Skill is now Level 5, you will now earn more when stealing.");
  9949. }
  9950. }
  9951. else
  9952. {
  9953. Robbing[playerid] = 999;
  9954. BeingRobbed[giveplayerid] = 999;
  9955. RobbingX[playerid] = 0.0;
  9956. RobbingY[playerid] = 0.0;
  9957. RobbingZ[playerid] = 0.0;
  9958. SendClientMessage(playerid, COLOR_GREY, "That player is not in range.");
  9959. return 1;
  9960. }
  9961. }
  9962. }
  9963. else
  9964. {
  9965. Robbing[playerid] = 999;
  9966. RobbingX[playerid] = 0.0;
  9967. RobbingY[playerid] = 0.0;
  9968. RobbingZ[playerid] = 0.0;
  9969. }
  9970. return 1;
  9971. }
  9972. if(dialogid == DIALOG_STATS1) //inv dialog
  9973. {
  9974. if(response)
  9975. {
  9976. return 0;
  9977. }
  9978. new rod[20], bait[20], baita, line[20], line1[1000], line2[1000], line3[1000];
  9979. format(rod, sizeof(rod), "%s", GetFishingRodName(PlayerInfo[playerid][pFishRod]));
  9980. format(bait, sizeof(bait), "%s", GetFishingBaitName(PlayerInfo[playerid][pBait]));
  9981. format(line, sizeof(line), "%s", GetFishingLineName(PlayerInfo[playerid][pLine]));
  9982. baita = PlayerInfo[playerid][pBaitAmount];
  9983. if(baita == 0)
  9984. bait = "None";
  9985. new packages = Packages[playerid];
  9986. new crates = Crates[playerid];
  9987. 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]);
  9988. 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]);
  9989. 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]);
  9990. SendClientMessage(playerid, COLOR_WHITE, line1);
  9991. SendClientMessage(playerid, COLOR_WHITE, line2);
  9992. SendClientMessage(playerid, COLOR_WHITE, line3);
  9993. return 1;
  9994. }
  9995. if(dialogid == DIALOG_STATS) //stats dialog
  9996. {
  9997. if(response)
  9998. {
  9999. return 0;
  10000. }
  10001. ShowStats(playerid, viewingStatsOf[playerid], true);
  10002. return 1;
  10003. }
  10004. if(dialogid == DIALOG_SKILLS) //skills dialog
  10005. {
  10006. if(response)
  10007. {
  10008. return 0;
  10009. }
  10010. return 1;
  10011. }
  10012. if(dialogid == 99)
  10013. {
  10014. if(response)
  10015. {
  10016. SetTimerEx("Timer_UseBM", 30000, 0, "i", playerid);
  10017. SendClientMessage(playerid, COLOR_GREY, "You must wait 30 seconds before purchasing another weapon.");
  10018. UseBMTimer[playerid] = 1;
  10019. if(listitem == 0) // Deagle
  10020. {
  10021. if(PlayerInfo[playerid][pCash] < 80000)
  10022. {
  10023. TogglePlayerControllable(playerid, true);
  10024. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10025. }
  10026. else
  10027. {
  10028. GiveMoney(playerid, -80000);
  10029. GivePlayerGun(playerid, 24);
  10030. TogglePlayerControllable(playerid, true);
  10031. }
  10032. }
  10033. if(listitem == 1) // AK
  10034. {
  10035. if(PlayerInfo[playerid][pCash] < 150000)
  10036. {
  10037. TogglePlayerControllable(playerid, true);
  10038. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10039. }
  10040. else
  10041. {
  10042. GiveMoney(playerid, -150000);
  10043. GivePlayerGun(playerid, 30);
  10044. TogglePlayerControllable(playerid, true);
  10045. }
  10046. }
  10047. if(listitem == 2) //TEC9
  10048. {
  10049. if(PlayerInfo[playerid][pCash] < 100000)
  10050. {
  10051. TogglePlayerControllable(playerid, true);
  10052. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10053. }
  10054. else
  10055. {
  10056. GiveMoney(playerid, -100000);
  10057. GivePlayerGun(playerid, 32);
  10058. TogglePlayerControllable(playerid, true);
  10059. }
  10060. }
  10061. if(listitem == 3) //UZI
  10062. {
  10063. if(PlayerInfo[playerid][pCash] < 100000)
  10064. {
  10065. TogglePlayerControllable(playerid, true);
  10066. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10067. }
  10068. else
  10069. {
  10070. GiveMoney(playerid, -100000);
  10071. GivePlayerGun(playerid, 28);
  10072. TogglePlayerControllable(playerid, true);
  10073. }
  10074. }
  10075. }
  10076. return 1;
  10077. }
  10078. if(dialogid == 100)
  10079. {
  10080. if(response)
  10081. {
  10082. BMPurchased[playerid] += 1;
  10083. if(BMPurchased[playerid] == 2)
  10084. {
  10085. SetTimerEx("Timer_UseBM", 30000, 0, "i", playerid);
  10086. UseBMTimer[playerid] = 1;
  10087. SendClientMessage(playerid, COLOR_GREY, "You must wait 30 seconds before purchasing another weapon.");
  10088. }
  10089. if(listitem == 0) // Deagle
  10090. {
  10091. if(PlayerInfo[playerid][pCash] < 60000)
  10092. {
  10093. TogglePlayerControllable(playerid, true);
  10094. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10095. }
  10096. else
  10097. {
  10098. GiveMoney(playerid, -60000);
  10099. GivePlayerGun(playerid, 24);
  10100. TogglePlayerControllable(playerid, true);
  10101. }
  10102. }
  10103. if(listitem == 1) // Knife
  10104. {
  10105. if(PlayerInfo[playerid][pCash] < 1000000)
  10106. {
  10107. TogglePlayerControllable(playerid, true);
  10108. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10109. }
  10110. else
  10111. {
  10112. GiveMoney(playerid, -1000000);
  10113. GivePlayerGun(playerid, 4);
  10114. TogglePlayerControllable(playerid, true);
  10115. }
  10116. }
  10117. if(listitem == 2) // AK
  10118. {
  10119. if(PlayerInfo[playerid][pCash] < 100000)
  10120. {
  10121. TogglePlayerControllable(playerid, true);
  10122. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10123. }
  10124. else
  10125. {
  10126. GiveMoney(playerid, -100000);
  10127. GivePlayerGun(playerid, 30);
  10128. TogglePlayerControllable(playerid, true);
  10129. }
  10130. }
  10131. if(listitem == 3) //TEC9
  10132. {
  10133. if(PlayerInfo[playerid][pCash] < 50000)
  10134. {
  10135. TogglePlayerControllable(playerid, true);
  10136. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10137. }
  10138. else
  10139. {
  10140. GiveMoney(playerid, -50000);
  10141. GivePlayerGun(playerid, 32);
  10142. TogglePlayerControllable(playerid, true);
  10143. }
  10144. }
  10145. if(listitem == 4) //UZI
  10146. {
  10147. if(PlayerInfo[playerid][pCash] < 50000)
  10148. {
  10149. TogglePlayerControllable(playerid, true);
  10150. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10151. }
  10152. else
  10153. {
  10154. GiveMoney(playerid, -50000);
  10155. GivePlayerGun(playerid, 28);
  10156. TogglePlayerControllable(playerid, true);
  10157. }
  10158. }
  10159. }
  10160. return 1;
  10161. }
  10162. if(dialogid == 3325)
  10163. {
  10164. if(response)
  10165. {
  10166. BMPurchased[playerid] += 1;
  10167. if(BMPurchased[playerid] == 2)
  10168. {
  10169. SetTimerEx("Timer_UseBM", 30000, 0, "i", playerid);
  10170. UseBMTimer[playerid] = 1;
  10171. SendClientMessage(playerid, COLOR_GREY, "You must wait 30 seconds before purchasing another weapon.");
  10172. }
  10173. if(listitem == 0) // Deagle
  10174. {
  10175. if(PlayerInfo[playerid][pCash] < 30000)
  10176. {
  10177. TogglePlayerControllable(playerid, true);
  10178. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10179. }
  10180. else
  10181. {
  10182. GiveMoney(playerid, -30000);
  10183. GivePlayerGun(playerid, 24);
  10184. TogglePlayerControllable(playerid, true);
  10185. }
  10186. }
  10187. if(listitem == 1) // Knife
  10188. {
  10189. if(PlayerInfo[playerid][pCash] < 600000)
  10190. {
  10191. TogglePlayerControllable(playerid, true);
  10192. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10193. }
  10194. else
  10195. {
  10196. GiveMoney(playerid, -600000);
  10197. GivePlayerGun(playerid, 4);
  10198. TogglePlayerControllable(playerid, true);
  10199. }
  10200. }
  10201. if(listitem == 2) // AK
  10202. {
  10203. if(PlayerInfo[playerid][pCash] < 60000)
  10204. {
  10205. TogglePlayerControllable(playerid, true);
  10206. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10207. }
  10208. else
  10209. {
  10210. GiveMoney(playerid, -60000);
  10211. GivePlayerGun(playerid, 30);
  10212. TogglePlayerControllable(playerid, true);
  10213. }
  10214. }
  10215. if(listitem == 3) //TEC9
  10216. {
  10217. if(PlayerInfo[playerid][pCash] < 25000)
  10218. {
  10219. TogglePlayerControllable(playerid, true);
  10220. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10221. }
  10222. else
  10223. {
  10224. GiveMoney(playerid, -25000);
  10225. GivePlayerGun(playerid, 32);
  10226. TogglePlayerControllable(playerid, true);
  10227. }
  10228. }
  10229. if(listitem == 4) //UZI
  10230. {
  10231. if(PlayerInfo[playerid][pCash] < 50000)
  10232. {
  10233. TogglePlayerControllable(playerid, true);
  10234. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10235. }
  10236. else
  10237. {
  10238. GiveMoney(playerid, -25000);
  10239. GivePlayerGun(playerid, 28);
  10240. TogglePlayerControllable(playerid, true);
  10241. }
  10242. }
  10243. if(listitem == 5) //Sniper
  10244. {
  10245. if(PlayerInfo[playerid][pCash] < 80000)
  10246. {
  10247. TogglePlayerControllable(playerid, true);
  10248. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10249. }
  10250. else
  10251. {
  10252. GiveMoney(playerid, -80000);
  10253. GivePlayerGun(playerid, 34);
  10254. TogglePlayerControllable(playerid, true);
  10255. }
  10256. }
  10257. }
  10258. return 1;
  10259. }
  10260. if(dialogid == 101)
  10261. {
  10262. if(response)
  10263. Dialog_NeonResponse(playerid, listitem);
  10264. return 1;
  10265. }
  10266. if(dialogid == 102)
  10267. {
  10268. if(response)
  10269. {
  10270. switch(listitem)
  10271. {
  10272. case 0: // Fishing Rod
  10273. {
  10274. DisplayDialogForPlayer(playerid, 103);
  10275. }
  10276. case 1: // Fishing Bait
  10277. {
  10278. DisplayDialogForPlayer(playerid, 104);
  10279. }
  10280. case 2: // Fishing Line
  10281. {
  10282. DisplayDialogForPlayer(playerid, 105);
  10283. }
  10284. }
  10285. }
  10286. return 1;
  10287. }
  10288. if(dialogid == 103)
  10289. {
  10290. if(response)
  10291. {
  10292. switch(listitem)
  10293. {
  10294. case 0: // Old Rod
  10295. {
  10296. if(PlayerInfo[playerid][pCash] < 200)
  10297. {
  10298. TogglePlayerControllable(playerid, true);
  10299. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10300. }
  10301. else
  10302. {
  10303. GiveMoney(playerid, -200);
  10304. PlayerInfo[playerid][pFishRod] = 1;
  10305. TogglePlayerControllable(playerid, true);
  10306. SendClientMessage(playerid, COLOR_GREY, "You purchased an old rod.");
  10307. }
  10308. }
  10309. case 1: // Beginners Rod
  10310. {
  10311. if(PlayerInfo[playerid][pCash] < 1000)
  10312. {
  10313. TogglePlayerControllable(playerid, true);
  10314. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10315. }
  10316. else
  10317. {
  10318. GiveMoney(playerid, -1000);
  10319. PlayerInfo[playerid][pFishRod] = 2;
  10320. TogglePlayerControllable(playerid, true);
  10321. SendClientMessage(playerid, COLOR_GREY, "You purchased a beginners rod.");
  10322. }
  10323. }
  10324. case 2: // Fisherman's Rod
  10325. {
  10326. if(PlayerInfo[playerid][pCash] < 5000)
  10327. {
  10328. TogglePlayerControllable(playerid, true);
  10329. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10330. }
  10331. else
  10332. {
  10333. GiveMoney(playerid, -5000);
  10334. PlayerInfo[playerid][pFishRod] = 3;
  10335. TogglePlayerControllable(playerid, true);
  10336. SendClientMessage(playerid, COLOR_GREY, "You purchased a fishermans rod.");
  10337. }
  10338. }
  10339. case 3: // Elite Rod
  10340. {
  10341. if(PlayerInfo[playerid][pCash] < 15000)
  10342. {
  10343. TogglePlayerControllable(playerid, true);
  10344. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10345. }
  10346. else
  10347. {
  10348. GiveMoney(playerid, -15000);
  10349. PlayerInfo[playerid][pFishRod] = 4;
  10350. TogglePlayerControllable(playerid, true);
  10351. SendClientMessage(playerid, COLOR_GREY, "You purchased an elite rod.");
  10352. }
  10353. }
  10354. }
  10355. }
  10356. return 1;
  10357. }
  10358. if(dialogid == 104)
  10359. {
  10360. if(response)
  10361. {
  10362. switch(listitem)
  10363. {
  10364. case 0: // Weak Bait
  10365. {
  10366. if(PlayerInfo[playerid][pCash] < 150)
  10367. {
  10368. TogglePlayerControllable(playerid, true);
  10369. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10370. }
  10371. else
  10372. {
  10373. GiveMoney(playerid, -150);
  10374. PlayerInfo[playerid][pBait] = 1;
  10375. TogglePlayerControllable(playerid, true);
  10376. SendClientMessage(playerid, COLOR_GREY, "You purchased 10 pieces of weak bait.");
  10377. PlayerInfo[playerid][pBaitAmount] = 10;
  10378. }
  10379. }
  10380. case 1: // Regular Bait
  10381. {
  10382. if(PlayerInfo[playerid][pCash] < 500)
  10383. {
  10384. TogglePlayerControllable(playerid, true);
  10385. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10386. }
  10387. else
  10388. {
  10389. GiveMoney(playerid, -500);
  10390. PlayerInfo[playerid][pBait] = 2;
  10391. TogglePlayerControllable(playerid, true);
  10392. SendClientMessage(playerid, COLOR_GREY, "You purchased 10 pieces of regular bait.");
  10393. PlayerInfo[playerid][pBaitAmount] = 10;
  10394. }
  10395. }
  10396. case 2: // Strong Bait
  10397. {
  10398. if(PlayerInfo[playerid][pCash] < 1500)
  10399. {
  10400. TogglePlayerControllable(playerid, true);
  10401. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10402. }
  10403. else
  10404. {
  10405. GiveMoney(playerid, -1500);
  10406. PlayerInfo[playerid][pBait] = 3;
  10407. TogglePlayerControllable(playerid, true);
  10408. SendClientMessage(playerid, COLOR_GREY, "You purchased 10 pieces of strong bait.");
  10409. PlayerInfo[playerid][pBaitAmount] = 10;
  10410. }
  10411. }
  10412. case 3: // Elite Bait
  10413. {
  10414. if(PlayerInfo[playerid][pCash] < 2500)
  10415. {
  10416. TogglePlayerControllable(playerid, true);
  10417. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10418. }
  10419. else
  10420. {
  10421. GiveMoney(playerid, -2500);
  10422. PlayerInfo[playerid][pBait] = 4;
  10423. TogglePlayerControllable(playerid, true);
  10424. SendClientMessage(playerid, COLOR_GREY, "You purchased 10 pieces of elite bait.");
  10425. PlayerInfo[playerid][pBaitAmount] = 10;
  10426. }
  10427. }
  10428. }
  10429. }
  10430. return 1;
  10431. }
  10432. if(dialogid == 105)
  10433. {
  10434. if(response)
  10435. {
  10436. switch(listitem)
  10437. {
  10438. case 0: // Fishing Line
  10439. {
  10440. if(PlayerInfo[playerid][pCash] < 1000)
  10441. {
  10442. TogglePlayerControllable(playerid, true);
  10443. return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10444. }
  10445. else
  10446. {
  10447. GiveMoney(playerid, -1000);
  10448. PlayerInfo[playerid][pLine] = 1;
  10449. TogglePlayerControllable(playerid, true);
  10450. SendClientMessage(playerid, COLOR_GREY, "You purchased a fishing line.");
  10451. }
  10452. }
  10453. }
  10454. }
  10455. return 1;
  10456. }
  10457. if(dialogid == 107) //donut store
  10458. {
  10459. if(response)
  10460. {
  10461. new biz = GetPlayerVirtualWorld(playerid);
  10462. if(strlen(inputtext))
  10463. {
  10464. if(!IsNumeric(inputtext))
  10465. {
  10466. return SendClientMessage(playerid, COLOR_GREY, "You must type a number.");
  10467. }
  10468. if(strcmp(inputtext, "1", true) == 0) //Sprunk
  10469. {
  10470. if(GetMoney(playerid) < 2)
  10471. {
  10472. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  10473. }
  10474. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  10475. 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
  10476. GiveMoney(playerid, -2);
  10477. BizInfo[biz][bTill] += 2;
  10478. BizInfo[biz][bProducts] -= 1;
  10479. }
  10480. else if(strcmp(inputtext, "2", true) == 0) //Coffee
  10481. {
  10482. if(GetMoney(playerid) < 5)
  10483. {
  10484. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  10485. }
  10486. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  10487. 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
  10488. GiveMoney(playerid, -1);
  10489. BizInfo[biz][bTill] += 2;
  10490. BizInfo[biz][bProducts] -= 1;
  10491. }
  10492. else if(strcmp(inputtext, "3", true) == 0) //Donut Tray
  10493. {
  10494. if(boughtFoodTimer[playerid])
  10495. {
  10496. return SendClientMessage(playerid, COLOR_GREY, "You must wait 1 minute before buying another Meal.");
  10497. }
  10498. if(GetMoney(playerid) < 100)
  10499. {
  10500. return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
  10501. }
  10502. if(hasFoodTray[playerid])
  10503. {
  10504. return SendClientMessage(playerid, COLOR_GREY, "You are already holding a meal, type /preparefood then type /eat to eat it.");
  10505. }
  10506. if(IsACop(playerid))
  10507. {
  10508. 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
  10509. format(str, sizeof(str), "* %s has bought a Donut Tray.", PlayerICName(playerid));
  10510. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  10511. GiveMoney(playerid, -70);
  10512. }
  10513. else
  10514. {
  10515. 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
  10516. format(str, sizeof(str), "* %s has bought a Donut Tray.", PlayerICName(playerid));
  10517. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  10518. GiveMoney(playerid, -100);
  10519. }
  10520. hasFoodTray[playerid] = 4; //donuts
  10521. givePlayerFoodTray(playerid, hasFoodTray[playerid]);
  10522. BizInfo[biz][bTill] += 2;
  10523. BizInfo[biz][bProducts] -= 1;
  10524. SetTimerEx("boughtFood", 60 *1000, 0, "i", playerid); //1 minute
  10525. boughtFoodTimer[playerid] = true;
  10526. }
  10527. if(BizInfo[biz][bProducts] <= 0) SetNoProductsDate(biz);
  10528. }
  10529. }
  10530. return 1;
  10531. }
  10532. //radio stuff
  10533. if(dialogid == 108)
  10534. {
  10535. if(response)
  10536. {
  10537. if(listitem == 0)
  10538. {
  10539. //di.fm
  10540. DisplayDialogForPlayer(playerid, 109);
  10541. }
  10542. else if(listitem == 1)
  10543. {
  10544. //soma.fm
  10545. DisplayDialogForPlayer(playerid, 110);
  10546. }
  10547. else if(listitem == 2)
  10548. {
  10549. //etn.fm
  10550. DisplayDialogForPlayer(playerid, 111);
  10551. }
  10552. else if(listitem == 3)
  10553. {
  10554. //infowars radio
  10555. DisplayDialogForPlayer(playerid, 112);
  10556. }
  10557. else if(listitem == 4)
  10558. {
  10559. // custom
  10560. DisplayDialogForPlayer(playerid, 113);
  10561. }
  10562. else if(listitem == 5)
  10563. {
  10564. // turn off
  10565. usingRadio[playerid] = 0;
  10566. StopAudioStreamForPlayer(playerid);
  10567. }
  10568. }
  10569. return 1;
  10570. }
  10571. if(dialogid == 109)
  10572. {
  10573. //di.fm
  10574. if(response)
  10575. {
  10576. switch(listitem)
  10577. {
  10578. case 0:
  10579. {
  10580. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/classicvocaltrance.pls");
  10581. usingRadio[playerid] = 1;
  10582. }
  10583. case 1:
  10584. {
  10585. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/ukgarage.pls");
  10586. usingRadio[playerid] = 1;
  10587. }
  10588. case 2:
  10589. {
  10590. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/trance.pls");
  10591. usingRadio[playerid] = 1;
  10592. }
  10593. case 3:
  10594. {
  10595. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/vocaltrance.pls");
  10596. usingRadio[playerid] = 1;
  10597. }
  10598. case 4:
  10599. {
  10600. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/techhouse.pls");
  10601. usingRadio[playerid] = 1;
  10602. }
  10603. case 5:
  10604. {
  10605. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/psychill.pls");
  10606. usingRadio[playerid] = 1;
  10607. }
  10608. case 6:
  10609. {
  10610. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/chilloutdreams.pls");
  10611. usingRadio[playerid] = 1;
  10612. }
  10613. case 7:
  10614. {
  10615. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/classictrance.pls");
  10616. usingRadio[playerid] = 1;
  10617. }
  10618. case 8:
  10619. {
  10620. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/eurodance.pls");
  10621. usingRadio[playerid] = 1;
  10622. }
  10623. case 9:
  10624. {
  10625. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/club.pls");
  10626. usingRadio[playerid] = 1;
  10627. }
  10628. case 10:
  10629. {
  10630. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/discohouse.pls");
  10631. usingRadio[playerid] = 1;
  10632. }
  10633. case 11:
  10634. {
  10635. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/dubstep.pls");
  10636. usingRadio[playerid] = 1;
  10637. }
  10638. case 12:
  10639. {
  10640. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/electro.pls");
  10641. usingRadio[playerid] = 1;
  10642. }
  10643. case 13:
  10644. {
  10645. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/chillout.pls");
  10646. usingRadio[playerid] = 1;
  10647. }
  10648. case 14:
  10649. {
  10650. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/classiceurodance.pls");
  10651. usingRadio[playerid] = 1;
  10652. }
  10653. case 15:
  10654. {
  10655. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/house.pls");
  10656. usingRadio[playerid] = 1;
  10657. }
  10658. case 16:
  10659. {
  10660. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/soulfulhouse.pls");
  10661. usingRadio[playerid] = 1;
  10662. }
  10663. case 17:
  10664. {
  10665. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/funkyhouse.pls");
  10666. usingRadio[playerid] = 1;
  10667. }
  10668. case 18:
  10669. {
  10670. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/tribalhouse.pls");
  10671. usingRadio[playerid] = 1;
  10672. }
  10673. case 19:
  10674. {
  10675. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/harddance.pls");
  10676. usingRadio[playerid] = 1;
  10677. }
  10678. case 20:
  10679. {
  10680. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/minimal.pls");
  10681. usingRadio[playerid] = 1;
  10682. }
  10683. case 21:
  10684. {
  10685. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/techno.pls");
  10686. usingRadio[playerid] = 1;
  10687. }
  10688. case 22:
  10689. {
  10690. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/progressive.pls");
  10691. usingRadio[playerid] = 1;
  10692. }
  10693. case 23:
  10694. {
  10695. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/goapsy.pls");
  10696. usingRadio[playerid] = 1;
  10697. }
  10698. case 24:
  10699. {
  10700. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/hardstyle.pls");
  10701. usingRadio[playerid] = 1;
  10702. }
  10703. case 25:
  10704. {
  10705. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/hardcore.pls");
  10706. usingRadio[playerid] = 1;
  10707. }
  10708. case 26:
  10709. {
  10710. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/lounge.pls");
  10711. usingRadio[playerid] = 1;
  10712. }
  10713. case 27:
  10714. {
  10715. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/exposurenyc.pls");
  10716. usingRadio[playerid] = 1;
  10717. }
  10718. case 28:
  10719. {
  10720. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/djmixes.pls");
  10721. usingRadio[playerid] = 1;
  10722. }
  10723. case 29:
  10724. {
  10725. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/drumandbass.pls");
  10726. usingRadio[playerid] = 1;
  10727. }
  10728. case 30:
  10729. {
  10730. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/liquiddnb.pls");
  10731. usingRadio[playerid] = 1;
  10732. }
  10733. case 31:
  10734. {
  10735. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/classictechno.pls");
  10736. usingRadio[playerid] = 1;
  10737. }
  10738. case 32:
  10739. {
  10740. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/breaks.pls");
  10741. usingRadio[playerid] = 1;
  10742. }
  10743. case 33:
  10744. {
  10745. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/ambient.pls");
  10746. usingRadio[playerid] = 1;
  10747. }
  10748. case 34:
  10749. {
  10750. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/spacemusic.pls");
  10751. usingRadio[playerid] = 1;
  10752. }
  10753. case 35:
  10754. {
  10755. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/futuresynthpop.pls");
  10756. usingRadio[playerid] = 1;
  10757. }
  10758. case 36:
  10759. {
  10760. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/oldschoolhouse.pls");
  10761. usingRadio[playerid] = 1;
  10762. }
  10763. case 37:
  10764. {
  10765. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/chiptunes.pls");
  10766. usingRadio[playerid] = 1;
  10767. }
  10768. case 38:
  10769. {
  10770. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/gabber.pls");
  10771. usingRadio[playerid] = 1;
  10772. }
  10773. case 39:
  10774. {
  10775. PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public3/latinhouse.pls");
  10776. usingRadio[playerid] = 1;
  10777. }
  10778. }
  10779. }
  10780. else
  10781. {
  10782. DisplayDialogForPlayer(playerid, 108); //radio main
  10783. }
  10784. return 1;
  10785. }
  10786. // Trunk start
  10787. if(dialogid == TRUNK_PUT_STUFF) //Trunk put stuff
  10788. {
  10789. if(response)
  10790. {
  10791. if(listitem == 0) //Put gun
  10792. {
  10793. 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
  10794. 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.");
  10795. ShowPlayerDialog(playerid, TRUNKPUTGUN, DIALOG_STYLE_LIST, "Put a gun in this trunk", "Slot 1\nSlot 2", "Put", "Cancel"); //Trunk put gun
  10796. return 1;
  10797. }
  10798. if(listitem == 1) //Put armor
  10799. {
  10800. 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.");
  10801. new counter = 0;
  10802. new vid;
  10803. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10804. for(new i; i != MAX_VEHICLES; i++)
  10805. {
  10806. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  10807. if(dist)
  10808. {
  10809. vid = i;
  10810. counter++;
  10811. }
  10812. }
  10813. switch(counter)
  10814. {
  10815. case 0:
  10816. {
  10817. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  10818. return 1;
  10819. }
  10820. case 1:
  10821. {
  10822. if(IsPlayerInAnyVehicle(playerid))
  10823. {
  10824. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  10825. return 1;
  10826. }
  10827. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  10828. {
  10829. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  10830. return 1;
  10831. }
  10832. if(TrunkInfo[vid][cTrunkOpened] != 1)
  10833. {
  10834. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  10835. return 1;
  10836. }
  10837. GetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
  10838. if(PlayerInfo[playerid][pArmor] != 0)
  10839. {
  10840. TrunkInfo[vid][cArmor] = PlayerInfo[playerid][pArmor];
  10841. SetPlayerArmour(playerid, 0);
  10842. PlayerInfo[playerid][pArmor] = 0;
  10843. format(str, sizeof(str), "* %s puts a vest in the trunk.", PlayerICName(playerid));
  10844. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  10845. return 1;
  10846. }
  10847. else
  10848. {
  10849. SendClientMessage(playerid, COLOR_GREY, "You haven't got any armour ");
  10850. return 1;
  10851. }
  10852. }
  10853. default:
  10854. {
  10855. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  10856. return 1;
  10857. }
  10858. }
  10859. return 1;
  10860. }
  10861. if(listitem == 2) // Put cocaine
  10862. {
  10863. 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
  10864. }
  10865. if(listitem == 3) // Put cannabis
  10866. {
  10867. 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
  10868. }
  10869. if(listitem == 4) // Put meth
  10870. {
  10871. 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
  10872. }
  10873. if(listitem == 5) // Put xanax
  10874. {
  10875. 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
  10876. }
  10877. if(listitem == 6) //Put food tray
  10878. {
  10879. new counter = 0;
  10880. new vid;
  10881. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10882. for(new i; i != MAX_VEHICLES; i++)
  10883. {
  10884. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  10885. if(dist)
  10886. {
  10887. vid = i;
  10888. counter++;
  10889. }
  10890. }
  10891. switch(counter)
  10892. {
  10893. case 0:
  10894. {
  10895. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  10896. return 1;
  10897. }
  10898. case 1:
  10899. {
  10900. if(IsPlayerInAnyVehicle(playerid))
  10901. {
  10902. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car.");
  10903. return 1;
  10904. }
  10905. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  10906. {
  10907. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  10908. return 1;
  10909. }
  10910. if(TrunkInfo[vid][cTrunkOpened] != 1)
  10911. {
  10912. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first.");
  10913. return 1;
  10914. }
  10915. if(!hasFoodTray[playerid])
  10916. {
  10917. SendClientMessage(playerid, COLOR_GREY, "You are not carrying a food tray.");
  10918. return 1;
  10919. }
  10920. if(TrunkInfo[vid][cFoodtray])
  10921. {
  10922. SendClientMessage(playerid, COLOR_GREY, "There's already a food tray in the trunk.");
  10923. return 1;
  10924. }
  10925. TrunkInfo[vid][cFoodtray] = hasFoodTray[playerid];
  10926. throwAwayFoodTray(playerid);
  10927. format(str, sizeof(str), "* %s puts a food tray in the trunk.", PlayerICName(playerid));
  10928. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  10929. return 1;
  10930. }
  10931. default:
  10932. {
  10933. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range.");
  10934. return 1;
  10935. }
  10936. }
  10937. return 1;
  10938. }
  10939. }
  10940. return 1;
  10941. }
  10942. if(dialogid == TRUNKPUTGUN) //Trunk put gun
  10943. {
  10944. if(response)
  10945. {
  10946. if(listitem == 0) //Put gun 1
  10947. {
  10948. new counter = 0;
  10949. new vid;
  10950. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10951. for(new i; i != MAX_VEHICLES; i++)
  10952. {
  10953. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  10954. if(dist)
  10955. {
  10956. vid = i;
  10957. counter++;
  10958. }
  10959. }
  10960. switch(counter)
  10961. {
  10962. case 0:
  10963. {
  10964. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  10965. }
  10966. case 1:
  10967. {
  10968. if(TrunkInfo[vid][cGun1] == 0)
  10969. {
  10970. if(IsPlayerInAnyVehicle(playerid))
  10971. {
  10972. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  10973. return 1;
  10974. }
  10975. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  10976. {
  10977. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  10978. return 1;
  10979. }
  10980. if(TrunkInfo[vid][cTrunkOpened] != 1)
  10981. {
  10982. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  10983. return 1;
  10984. }
  10985. new buffer[512];
  10986. new gunname[100];
  10987. new gunID = GetPlayerWeapon(playerid);
  10988. new pgun0 = PlayerInfo[playerid][pGun0];
  10989. new pgun1 = PlayerInfo[playerid][pGun1];
  10990. new pgun2 = PlayerInfo[playerid][pGun2];
  10991. new pgun3 = PlayerInfo[playerid][pGun3];
  10992. new pgun4 = PlayerInfo[playerid][pGun4];
  10993. new pgun5 = PlayerInfo[playerid][pGun5];
  10994. new pgun6 = PlayerInfo[playerid][pGun6];
  10995. new pgun7 = PlayerInfo[playerid][pGun7];
  10996. new pgun8 = PlayerInfo[playerid][pGun8];
  10997. new pgun9 = PlayerInfo[playerid][pGun9];
  10998. new pgun10 = PlayerInfo[playerid][pGun10];
  10999. new pgun11 = PlayerInfo[playerid][pGun11];
  11000. new pgun12 = PlayerInfo[playerid][pGun12];
  11001. 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)
  11002. {
  11003. SendClientMessage(playerid, COLOR_GRAD1, "You can't place admin given weapons into a trunk.");
  11004. return 1;
  11005. }
  11006. if(gunID != 0)
  11007. {
  11008. if(gunID == 1)
  11009. {
  11010. PlayerInfo[playerid][pGun0] = 0;
  11011. }
  11012. if(gunID == 2)
  11013. {
  11014. PlayerInfo[playerid][pGun1] = 0;
  11015. }
  11016. if(gunID == 3)
  11017. {
  11018. PlayerInfo[playerid][pGun1] = 0;
  11019. }
  11020. if(gunID == 4)
  11021. {
  11022. PlayerInfo[playerid][pGun1] = 0;
  11023. }
  11024. if(gunID == 5)
  11025. {
  11026. PlayerInfo[playerid][pGun1] = 0;
  11027. }
  11028. if(gunID == 6)
  11029. {
  11030. PlayerInfo[playerid][pGun1] = 0;
  11031. }
  11032. if(gunID == 7)
  11033. {
  11034. PlayerInfo[playerid][pGun1] = 0;
  11035. }
  11036. if(gunID == 8)
  11037. {
  11038. PlayerInfo[playerid][pGun1] = 0;
  11039. }
  11040. if(gunID == 9)
  11041. {
  11042. PlayerInfo[playerid][pGun1] = 0;
  11043. }
  11044. if(gunID == 10)
  11045. {
  11046. PlayerInfo[playerid][pGun10] = 0;
  11047. }
  11048. if(gunID == 11)
  11049. {
  11050. PlayerInfo[playerid][pGun10] = 0;
  11051. }
  11052. if(gunID == 12)
  11053. {
  11054. PlayerInfo[playerid][pGun10] = 0;
  11055. }
  11056. if(gunID == 13)
  11057. {
  11058. PlayerInfo[playerid][pGun10] = 0;
  11059. }
  11060. if(gunID == 14)
  11061. {
  11062. PlayerInfo[playerid][pGun10] = 0;
  11063. }
  11064. if(gunID == 15)
  11065. {
  11066. PlayerInfo[playerid][pGun10] = 0;
  11067. }
  11068. if(gunID == 16)
  11069. {
  11070. PlayerInfo[playerid][pGun8] = 0;
  11071. }
  11072. if(gunID == 17)
  11073. {
  11074. PlayerInfo[playerid][pGun8] = 0;
  11075. }
  11076. if(gunID == 18)
  11077. {
  11078. PlayerInfo[playerid][pGun8] = 0;
  11079. }
  11080. if(gunID == 22)
  11081. {
  11082. PlayerInfo[playerid][pGun2] = 0;
  11083. }
  11084. if(gunID == 23)
  11085. {
  11086. PlayerInfo[playerid][pGun2] = 0;
  11087. }
  11088. if(gunID == 24)
  11089. {
  11090. PlayerInfo[playerid][pGun2] = 0;
  11091. }
  11092. if(gunID == 25)
  11093. {
  11094. PlayerInfo[playerid][pGun3] = 0;
  11095. }
  11096. if(gunID == 26)
  11097. {
  11098. PlayerInfo[playerid][pGun3] = 0;
  11099. }
  11100. if(gunID == 27)
  11101. {
  11102. PlayerInfo[playerid][pGun3] = 0;
  11103. }
  11104. if(gunID == 28)
  11105. {
  11106. PlayerInfo[playerid][pGun4] = 0;
  11107. }
  11108. if(gunID == 29)
  11109. {
  11110. PlayerInfo[playerid][pGun4] = 0;
  11111. }
  11112. if(gunID == 30)
  11113. {
  11114. PlayerInfo[playerid][pGun5] = 0;
  11115. }
  11116. if(gunID == 31)
  11117. {
  11118. PlayerInfo[playerid][pGun5] = 0;
  11119. }
  11120. if(gunID == 32)
  11121. {
  11122. PlayerInfo[playerid][pGun4] = 0;
  11123. }
  11124. if(gunID == 33)
  11125. {
  11126. PlayerInfo[playerid][pGun6] = 0;
  11127. }
  11128. if(gunID == 34)
  11129. {
  11130. PlayerInfo[playerid][pGun6] = 0;
  11131. }
  11132. if(gunID == 35)
  11133. {
  11134. PlayerInfo[playerid][pGun7] = 0;
  11135. }
  11136. if(gunID == 36)
  11137. {
  11138. PlayerInfo[playerid][pGun7] = 0;
  11139. }
  11140. if(gunID == 37)
  11141. {
  11142. PlayerInfo[playerid][pGun7] = 0;
  11143. }
  11144. if(gunID == 38)
  11145. {
  11146. PlayerInfo[playerid][pGun7] = 0;
  11147. }
  11148. if(gunID == 39)
  11149. {
  11150. PlayerInfo[playerid][pGun8] = 0;
  11151. }
  11152. if(gunID == 40)
  11153. {
  11154. PlayerInfo[playerid][pGun12] = 0;
  11155. }
  11156. if(gunID == 41)
  11157. {
  11158. PlayerInfo[playerid][pGun9] = 0;
  11159. }
  11160. if(gunID == 42)
  11161. {
  11162. PlayerInfo[playerid][pGun9] = 0;
  11163. }
  11164. if(gunID == 43)
  11165. {
  11166. PlayerInfo[playerid][pGun9] = 0;
  11167. }
  11168. if(gunID == 44)
  11169. {
  11170. PlayerInfo[playerid][pGun11] = 0;
  11171. }
  11172. if(gunID == 45)
  11173. {
  11174. PlayerInfo[playerid][pGun11] = 0;
  11175. }
  11176. if(gunID == 46)
  11177. {
  11178. PlayerInfo[playerid][pGun11] = 0;
  11179. }
  11180. GetWeaponName(gunID, gunname, sizeof(gunname));
  11181. TrunkInfo[vid][cGun1] = gunID;
  11182. format(buffer, sizeof(buffer), "You have put your %s in the car's trunk.", gunname);
  11183. SendClientMessage(playerid, COLOR_WHITE, buffer);
  11184. SetPlayerWeapons(playerid);
  11185. format(str, sizeof(str), "* %s puts a %s in the trunk.", PlayerICName(playerid), gunname);
  11186. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11187. return 1;
  11188. }
  11189. }
  11190. else
  11191. {
  11192. SendClientMessage(playerid, COLOR_GREY, "This slot is already taken");
  11193. return 1;
  11194. }
  11195. }
  11196. default:
  11197. {
  11198. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11199. return 1;
  11200. }
  11201. }
  11202. return 1;
  11203. }
  11204. if(listitem == 1) //Put gun 2
  11205. {
  11206. new counter = 0;
  11207. new vid;
  11208. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11209. for(new i; i != MAX_VEHICLES; i++)
  11210. {
  11211. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11212. if(dist)
  11213. {
  11214. vid = i;
  11215. counter++;
  11216. }
  11217. }
  11218. switch(counter)
  11219. {
  11220. case 0:
  11221. {
  11222. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11223. }
  11224. case 1:
  11225. {
  11226. if(TrunkInfo[vid][cGun2] == 0)
  11227. {
  11228. if(IsPlayerInAnyVehicle(playerid))
  11229. {
  11230. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  11231. return 1;
  11232. }
  11233. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11234. {
  11235. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11236. return 1;
  11237. }
  11238. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11239. {
  11240. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  11241. return 1;
  11242. }
  11243. new buffer[512];
  11244. new gunname[100];
  11245. new gunID = GetPlayerWeapon(playerid);
  11246. new pgun0 = PlayerInfo[playerid][pGun0];
  11247. new pgun1 = PlayerInfo[playerid][pGun1];
  11248. new pgun2 = PlayerInfo[playerid][pGun2];
  11249. new pgun3 = PlayerInfo[playerid][pGun3];
  11250. new pgun4 = PlayerInfo[playerid][pGun4];
  11251. new pgun5 = PlayerInfo[playerid][pGun5];
  11252. new pgun6 = PlayerInfo[playerid][pGun6];
  11253. new pgun7 = PlayerInfo[playerid][pGun7];
  11254. new pgun8 = PlayerInfo[playerid][pGun8];
  11255. new pgun9 = PlayerInfo[playerid][pGun9];
  11256. new pgun10 = PlayerInfo[playerid][pGun10];
  11257. new pgun11 = PlayerInfo[playerid][pGun11];
  11258. new pgun12 = PlayerInfo[playerid][pGun12];
  11259. 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)
  11260. {
  11261. SendClientMessage(playerid, COLOR_GRAD1, "You can't place admin given weapons into a trunk.");
  11262. return 1;
  11263. }
  11264. if(gunID != 0)
  11265. {
  11266. if(gunID == 1)
  11267. {
  11268. PlayerInfo[playerid][pGun0] = 0;
  11269. }
  11270. if(gunID == 2)
  11271. {
  11272. PlayerInfo[playerid][pGun1] = 0;
  11273. }
  11274. if(gunID == 3)
  11275. {
  11276. PlayerInfo[playerid][pGun1] = 0;
  11277. }
  11278. if(gunID == 4)
  11279. {
  11280. PlayerInfo[playerid][pGun1] = 0;
  11281. }
  11282. if(gunID == 5)
  11283. {
  11284. PlayerInfo[playerid][pGun1] = 0;
  11285. }
  11286. if(gunID == 6)
  11287. {
  11288. PlayerInfo[playerid][pGun1] = 0;
  11289. }
  11290. if(gunID == 7)
  11291. {
  11292. PlayerInfo[playerid][pGun1] = 0;
  11293. }
  11294. if(gunID == 8)
  11295. {
  11296. PlayerInfo[playerid][pGun1] = 0;
  11297. }
  11298. if(gunID == 9)
  11299. {
  11300. PlayerInfo[playerid][pGun1] = 0;
  11301. }
  11302. if(gunID == 10)
  11303. {
  11304. PlayerInfo[playerid][pGun10] = 0;
  11305. }
  11306. if(gunID == 11)
  11307. {
  11308. PlayerInfo[playerid][pGun10] = 0;
  11309. }
  11310. if(gunID == 12)
  11311. {
  11312. PlayerInfo[playerid][pGun10] = 0;
  11313. }
  11314. if(gunID == 13)
  11315. {
  11316. PlayerInfo[playerid][pGun10] = 0;
  11317. }
  11318. if(gunID == 14)
  11319. {
  11320. PlayerInfo[playerid][pGun10] = 0;
  11321. }
  11322. if(gunID == 15)
  11323. {
  11324. PlayerInfo[playerid][pGun10] = 0;
  11325. }
  11326. if(gunID == 16)
  11327. {
  11328. PlayerInfo[playerid][pGun8] = 0;
  11329. }
  11330. if(gunID == 17)
  11331. {
  11332. PlayerInfo[playerid][pGun8] = 0;
  11333. }
  11334. if(gunID == 18)
  11335. {
  11336. PlayerInfo[playerid][pGun8] = 0;
  11337. }
  11338. if(gunID == 22)
  11339. {
  11340. PlayerInfo[playerid][pGun2] = 0;
  11341. }
  11342. if(gunID == 23)
  11343. {
  11344. PlayerInfo[playerid][pGun2] = 0;
  11345. }
  11346. if(gunID == 24)
  11347. {
  11348. PlayerInfo[playerid][pGun2] = 0;
  11349. }
  11350. if(gunID == 25)
  11351. {
  11352. PlayerInfo[playerid][pGun3] = 0;
  11353. }
  11354. if(gunID == 26)
  11355. {
  11356. PlayerInfo[playerid][pGun3] = 0;
  11357. }
  11358. if(gunID == 27)
  11359. {
  11360. PlayerInfo[playerid][pGun3] = 0;
  11361. }
  11362. if(gunID == 28)
  11363. {
  11364. PlayerInfo[playerid][pGun4] = 0;
  11365. }
  11366. if(gunID == 29)
  11367. {
  11368. PlayerInfo[playerid][pGun4] = 0;
  11369. }
  11370. if(gunID == 30)
  11371. {
  11372. PlayerInfo[playerid][pGun5] = 0;
  11373. }
  11374. if(gunID == 31)
  11375. {
  11376. PlayerInfo[playerid][pGun5] = 0;
  11377. }
  11378. if(gunID == 32)
  11379. {
  11380. PlayerInfo[playerid][pGun4] = 0;
  11381. }
  11382. if(gunID == 33)
  11383. {
  11384. PlayerInfo[playerid][pGun6] = 0;
  11385. }
  11386. if(gunID == 34)
  11387. {
  11388. PlayerInfo[playerid][pGun6] = 0;
  11389. }
  11390. if(gunID == 35)
  11391. {
  11392. PlayerInfo[playerid][pGun7] = 0;
  11393. }
  11394. if(gunID == 36)
  11395. {
  11396. PlayerInfo[playerid][pGun7] = 0;
  11397. }
  11398. if(gunID == 37)
  11399. {
  11400. PlayerInfo[playerid][pGun7] = 0;
  11401. }
  11402. if(gunID == 38)
  11403. {
  11404. PlayerInfo[playerid][pGun7] = 0;
  11405. }
  11406. if(gunID == 39)
  11407. {
  11408. PlayerInfo[playerid][pGun8] = 0;
  11409. }
  11410. if(gunID == 40)
  11411. {
  11412. PlayerInfo[playerid][pGun12] = 0;
  11413. }
  11414. if(gunID == 41)
  11415. {
  11416. PlayerInfo[playerid][pGun9] = 0;
  11417. }
  11418. if(gunID == 42)
  11419. {
  11420. PlayerInfo[playerid][pGun9] = 0;
  11421. }
  11422. if(gunID == 43)
  11423. {
  11424. PlayerInfo[playerid][pGun9] = 0;
  11425. }
  11426. if(gunID == 44)
  11427. {
  11428. PlayerInfo[playerid][pGun11] = 0;
  11429. }
  11430. if(gunID == 45)
  11431. {
  11432. PlayerInfo[playerid][pGun11] = 0;
  11433. }
  11434. if(gunID == 46)
  11435. {
  11436. PlayerInfo[playerid][pGun11] = 0;
  11437. }
  11438. GetWeaponName(gunID, gunname, sizeof(gunname));
  11439. TrunkInfo[vid][cGun2] = gunID;
  11440. format(buffer, sizeof(buffer), "You have put your %s in the car's trunk.", gunname);
  11441. SendClientMessage(playerid, COLOR_WHITE, buffer);
  11442. SetPlayerWeapons(playerid);
  11443. format(str, sizeof(str), "* %s puts a %s in the trunk.", PlayerICName(playerid), gunname);
  11444. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11445. return 1;
  11446. }
  11447. }
  11448. else
  11449. {
  11450. SendClientMessage(playerid, COLOR_GREY, "This slot is already taken");
  11451. return 1;
  11452. }
  11453. }
  11454. default:
  11455. {
  11456. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11457. return 1;
  11458. }
  11459. }
  11460. return 1;
  11461. }
  11462. }
  11463. return 1;
  11464. }
  11465. if(dialogid == TRUNKTAKEGUN) //Trunk take gun
  11466. {
  11467. if(response)
  11468. {
  11469. if(listitem == 0) //Take gun 1
  11470. {
  11471. new counter = 0;
  11472. new vid;
  11473. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11474. for(new i; i != MAX_VEHICLES; i++)
  11475. {
  11476. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11477. if(dist)
  11478. {
  11479. vid = i;
  11480. counter++;
  11481. }
  11482. }
  11483. switch(counter)
  11484. {
  11485. case 0:
  11486. {
  11487. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11488. return 1;
  11489. }
  11490. case 1:
  11491. {
  11492. if(IsPlayerInAnyVehicle(playerid))
  11493. {
  11494. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  11495. return 1;
  11496. }
  11497. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11498. {
  11499. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11500. return 1;
  11501. }
  11502. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11503. {
  11504. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  11505. return 1;
  11506. }
  11507. if(TrunkInfo[vid][cGun1] != 0)
  11508. {
  11509. new buffer[512];
  11510. new gunName[100];
  11511. GivePlayerGun(playerid, TrunkInfo[vid][cGun1]);
  11512. GetWeaponName(TrunkInfo[vid][cGun1], gunName, sizeof(gunName));
  11513. format(buffer, sizeof(buffer), "You've taken a %s from the vehicle.", gunName);
  11514. SendClientMessage(playerid, COLOR_WHITE, buffer);
  11515. TrunkInfo[vid][cGun1] = 0;
  11516. format(str, sizeof(str), "* %s takes a %s from the trunk.", PlayerICName(playerid), gunName);
  11517. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11518. return 1;
  11519. }
  11520. else
  11521. {
  11522. SendClientMessage(playerid, COLOR_GREY, "This slot is empty.");
  11523. return 1;
  11524. }
  11525. }
  11526. default:
  11527. {
  11528. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11529. return 1;
  11530. }
  11531. }
  11532. return 1;
  11533. }
  11534. if(listitem == 1) //Take gun 2
  11535. {
  11536. new counter = 0;
  11537. new vid;
  11538. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11539. for(new i; i != MAX_VEHICLES; i++)
  11540. {
  11541. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11542. if(dist)
  11543. {
  11544. vid = i;
  11545. counter++;
  11546. }
  11547. }
  11548. switch(counter)
  11549. {
  11550. case 0:
  11551. {
  11552. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11553. return 1;
  11554. }
  11555. case 1:
  11556. {
  11557. if(IsPlayerInAnyVehicle(playerid))
  11558. {
  11559. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  11560. return 1;
  11561. }
  11562. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11563. {
  11564. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11565. return 1;
  11566. }
  11567. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11568. {
  11569. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  11570. return 1;
  11571. }
  11572. if(TrunkInfo[vid][cGun2] != 0)
  11573. {
  11574. new buffer[512];
  11575. new gunName[100];
  11576. GivePlayerGun(playerid, TrunkInfo[vid][cGun2]);
  11577. GetWeaponName(TrunkInfo[vid][cGun2], gunName, sizeof(gunName));
  11578. format(buffer, sizeof(buffer), "You've taken a %s from the vehicle.", gunName);
  11579. SendClientMessage(playerid, COLOR_WHITE, buffer);
  11580. TrunkInfo[vid][cGun2] = 0;
  11581. format(str, sizeof(str), "* %s takes a %s from the trunk.", PlayerICName(playerid), gunName);
  11582. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11583. return 1;
  11584. }
  11585. else
  11586. {
  11587. SendClientMessage(playerid, COLOR_GREY, "This slot is empty.");
  11588. return 1;
  11589. }
  11590. }
  11591. default:
  11592. {
  11593. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11594. return 1;
  11595. }
  11596. }
  11597. return 1;
  11598. }
  11599. }
  11600. return 1;
  11601. }
  11602. if(dialogid == TRUNK_TAKE_STUFF) //Trunk take stuff
  11603. {
  11604. if(response)
  11605. {
  11606. if(listitem == 0) //Take gun
  11607. {
  11608. if(PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon.");
  11609. ShowPlayerDialog(playerid, TRUNKTAKEGUN, DIALOG_STYLE_LIST, "Take a gun from this trunk", "Slot 1\nSlot 2", "Take", "Cancel"); //Trunk put gun
  11610. return 1;
  11611. }
  11612. if(listitem == 1) //Take armor
  11613. {
  11614. new counter = 0;
  11615. new vid;
  11616. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11617. for(new i; i != MAX_VEHICLES; i++)
  11618. {
  11619. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11620. if(dist)
  11621. {
  11622. vid = i;
  11623. counter++;
  11624. }
  11625. }
  11626. switch(counter)
  11627. {
  11628. case 0:
  11629. {
  11630. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11631. return 1;
  11632. }
  11633. case 1:
  11634. {
  11635. if(IsPlayerInAnyVehicle(playerid))
  11636. {
  11637. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car.");
  11638. return 1;
  11639. }
  11640. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11641. {
  11642. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11643. return 1;
  11644. }
  11645. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11646. {
  11647. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first.");
  11648. return 1;
  11649. }
  11650. if(TrunkInfo[vid][cArmor] != 0)
  11651. {
  11652. SetPlayerArmour(playerid, TrunkInfo[vid][cArmor]);
  11653. PlayerInfo[playerid][pArmor] = TrunkInfo[vid][cArmor];
  11654. TrunkInfo[vid][cArmor] = 0;
  11655. format(str, sizeof(str), "* %s takes a vest from the trunk.", PlayerICName(playerid));
  11656. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11657. return 1;
  11658. }
  11659. else
  11660. {
  11661. SendClientMessage(playerid, COLOR_GREY, "This trunk haven't got any vest inside ");
  11662. return 1;
  11663. }
  11664. }
  11665. default:
  11666. {
  11667. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11668. return 1;
  11669. }
  11670. }
  11671. return 1;
  11672. }
  11673. if(listitem == 2) //Take cocaine
  11674. {
  11675. 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
  11676. }
  11677. if(listitem == 3) //Take cannabis
  11678. {
  11679. 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
  11680. }
  11681. if(listitem == 4) //Take meth
  11682. {
  11683. ShowPlayerDialog(playerid, TRUNK_TAKE_METH, DIALOG_STYLE_INPUT, "Take meth", "How many grams of do you want to take?", "Take", "Cancel"); //Trunk take pot
  11684. }
  11685. if(listitem == 5) //Take xanax
  11686. {
  11687. 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
  11688. }
  11689. if(listitem == 6) //Take food tray
  11690. {
  11691. new counter = 0;
  11692. new vid;
  11693. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11694. for(new i; i != MAX_VEHICLES; i++)
  11695. {
  11696. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11697. if(dist)
  11698. {
  11699. vid = i;
  11700. counter++;
  11701. }
  11702. }
  11703. switch(counter)
  11704. {
  11705. case 0:
  11706. {
  11707. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11708. return 1;
  11709. }
  11710. case 1:
  11711. {
  11712. if(IsPlayerInAnyVehicle(playerid))
  11713. {
  11714. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car.");
  11715. return 1;
  11716. }
  11717. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11718. {
  11719. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11720. return 1;
  11721. }
  11722. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11723. {
  11724. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first.");
  11725. return 1;
  11726. }
  11727. if(hasFoodTray[playerid])
  11728. {
  11729. SendClientMessage(playerid, COLOR_GREY, "You're already holding a food tray.");
  11730. return 1;
  11731. }
  11732. if(TrunkInfo[vid][cFoodtray])
  11733. {
  11734. hasFoodTray[playerid] = TrunkInfo[vid][cFoodtray];
  11735. givePlayerFoodTray(playerid, TrunkInfo[vid][cFoodtray]);
  11736. TrunkInfo[vid][cFoodtray] = 0;
  11737. format(str, sizeof(str), "* %s takes a food tray from the trunk.", PlayerICName(playerid));
  11738. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11739. return 1;
  11740. }
  11741. else
  11742. {
  11743. SendClientMessage(playerid, COLOR_GREY, "There's no food tray in the trunk.");
  11744. return 1;
  11745. }
  11746. }
  11747. default:
  11748. {
  11749. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11750. return 1;
  11751. }
  11752. }
  11753. return 1;
  11754. }
  11755. }
  11756. return 1;
  11757. }
  11758. if(dialogid == TRUNK_TAKE_COCAINE) // Withdraw cocaine
  11759. {
  11760. if(response)
  11761. {
  11762. new counter = 0;
  11763. new vid;
  11764. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11765. new cocaine = strval(inputtext);
  11766. for(new i; i != MAX_VEHICLES; i++)
  11767. {
  11768. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11769. if(dist)
  11770. {
  11771. vid = i;
  11772. counter++;
  11773. }
  11774. }
  11775. switch(counter)
  11776. {
  11777. case 0:
  11778. {
  11779. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11780. return 1;
  11781. }
  11782. case 1:
  11783. {
  11784. if(IsPlayerInAnyVehicle(playerid))
  11785. {
  11786. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  11787. return 1;
  11788. }
  11789. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11790. {
  11791. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11792. return 1;
  11793. }
  11794. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11795. {
  11796. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  11797. return 1;
  11798. }
  11799. new pcocaine = PlayerInfo[playerid][pCocaine];
  11800. new calc = cocaine + pcocaine;
  11801. if(cocaine < 1)
  11802. {
  11803. SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  11804. return 1;
  11805. }
  11806. if(calc > 25)
  11807. {
  11808. SendClientMessage(playerid, COLOR_GREY, "You can't have that much cocaine on you");
  11809. return 1;
  11810. }
  11811. if(cocaine > TrunkInfo[vid][cCocaine])
  11812. {
  11813. SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the trunk");
  11814. return 1;
  11815. }
  11816. if(TrunkInfo[vid][cCocaine] != 0)
  11817. {
  11818. PlayerInfo[playerid][pCocaine] += cocaine;
  11819. TrunkInfo[vid][cCocaine] -= cocaine;
  11820. format(str, sizeof(str), "* %s takes some cocaine from the trunk.", PlayerICName(playerid));
  11821. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11822. return 1;
  11823. }
  11824. else
  11825. {
  11826. SendClientMessage(playerid, COLOR_GREY, "This trunk haven't got any cocaine inside ");
  11827. return 1;
  11828. }
  11829. }
  11830. default:
  11831. {
  11832. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11833. return 1;
  11834. }
  11835. }
  11836. return 1;
  11837. }
  11838. return 1;
  11839. }
  11840. if(dialogid == TRUNK_PUT_CANNABIS) // Deposit Pot
  11841. {
  11842. if(response)
  11843. {
  11844. new counter = 0;
  11845. new vid;
  11846. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11847. new cannabis = strval(inputtext);
  11848. for(new i; i != MAX_VEHICLES; i++)
  11849. {
  11850. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11851. if(dist)
  11852. {
  11853. vid = i;
  11854. counter++;
  11855. }
  11856. }
  11857. switch(counter)
  11858. {
  11859. case 0:
  11860. {
  11861. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11862. return 1;
  11863. }
  11864. case 1:
  11865. {
  11866. if(IsPlayerInAnyVehicle(playerid))
  11867. {
  11868. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  11869. return 1;
  11870. }
  11871. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11872. {
  11873. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11874. return 1;
  11875. }
  11876. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11877. {
  11878. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  11879. return 1;
  11880. }
  11881. new tCannabis = TrunkInfo[vid][cCannabis];
  11882. new calc = cannabis + tCannabis;
  11883. if(cannabis < 1)
  11884. {
  11885. SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  11886. return 1;
  11887. }
  11888. if(calc > 250)
  11889. {
  11890. SendClientMessage(playerid, COLOR_GREY, "You can't have that much cannabis in your trunk");
  11891. return 1;
  11892. }
  11893. if(cannabis > PlayerInfo[playerid][pCannabis])
  11894. {
  11895. SendClientMessage(playerid, COLOR_GREY, "You don't have that much on you");
  11896. return 1;
  11897. }
  11898. if(PlayerInfo[playerid][pCannabis] != 0)
  11899. {
  11900. PlayerInfo[playerid][pCannabis] -= cannabis;
  11901. TrunkInfo[vid][cCannabis] += cannabis;
  11902. format(str, sizeof(str), "* %s puts some cannabis in the trunk.", PlayerICName(playerid));
  11903. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11904. return 1;
  11905. }
  11906. else
  11907. {
  11908. SendClientMessage(playerid, COLOR_GREY, "You don't have any cannabis on you ");
  11909. return 1;
  11910. }
  11911. }
  11912. default:
  11913. {
  11914. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11915. return 1;
  11916. }
  11917. }
  11918. return 1;
  11919. }
  11920. return 1;
  11921. }
  11922. if(dialogid == TRUNK_PUT_METH) // Withdraw meth
  11923. {
  11924. if(response)
  11925. {
  11926. new counter = 0, vid;
  11927. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11928. new meth = strval(inputtext);
  11929. for(new i; i != MAX_VEHICLES; i++)
  11930. {
  11931. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11932. if(dist)
  11933. {
  11934. vid = i;
  11935. counter++;
  11936. }
  11937. }
  11938. switch(counter)
  11939. {
  11940. case 0:
  11941. {
  11942. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  11943. }
  11944. case 1:
  11945. {
  11946. if(IsPlayerInAnyVehicle(playerid))
  11947. return SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  11948. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  11949. return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  11950. if(TrunkInfo[vid][cTrunkOpened] != 1)
  11951. return SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  11952. new tMeth = TrunkInfo[vid][cMeth];
  11953. new calc = meth + tMeth;
  11954. if(meth < 1)
  11955. return SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  11956. if(calc > 250)
  11957. return SendClientMessage(playerid, COLOR_GREY, "You can't have that much meth in your trunk");
  11958. if(meth > PlayerInfo[playerid][pMeth])
  11959. return SendClientMessage(playerid, COLOR_GREY, "You don't have that much on you");
  11960. if(PlayerInfo[playerid][pMeth] != 0)
  11961. {
  11962. PlayerInfo[playerid][pMeth] -= meth;
  11963. TrunkInfo[vid][cMeth] += meth;
  11964. format(str, sizeof(str), "* %s puts some meth in the trunk.", PlayerICName(playerid));
  11965. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  11966. return 1;
  11967. }
  11968. else
  11969. {
  11970. SendClientMessage(playerid, COLOR_GREY, "You don't have any cannabis on you ");
  11971. return 1;
  11972. }
  11973. }
  11974. default:
  11975. {
  11976. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  11977. return 1;
  11978. }
  11979. }
  11980. }
  11981. return 1;
  11982. }
  11983. if(dialogid == TRUNK_PUT_COCAINE) //Put Crack
  11984. {
  11985. if(response)
  11986. {
  11987. new counter = 0;
  11988. new vid;
  11989. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  11990. new crack = strval(inputtext);
  11991. for(new i; i != MAX_VEHICLES; i++)
  11992. {
  11993. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  11994. if(dist)
  11995. {
  11996. vid = i;
  11997. counter++;
  11998. }
  11999. }
  12000. switch(counter)
  12001. {
  12002. case 0:
  12003. {
  12004. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  12005. return 1;
  12006. }
  12007. case 1:
  12008. {
  12009. if(IsPlayerInAnyVehicle(playerid))
  12010. {
  12011. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  12012. return 1;
  12013. }
  12014. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  12015. {
  12016. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  12017. return 1;
  12018. }
  12019. if(TrunkInfo[vid][cTrunkOpened] != 1)
  12020. {
  12021. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  12022. return 1;
  12023. }
  12024. new tcrack = TrunkInfo[vid][cCocaine];
  12025. new calc = crack +tcrack;
  12026. if(crack < 1)
  12027. {
  12028. SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  12029. return 1;
  12030. }
  12031. if(calc > 250)
  12032. {
  12033. SendClientMessage(playerid, COLOR_GREY, "You can't have that much cocaine in your trunk");
  12034. return 1;
  12035. }
  12036. if(crack > PlayerInfo[playerid][pCocaine])
  12037. {
  12038. SendClientMessage(playerid, COLOR_GREY, "You don't have that much on you");
  12039. return 1;
  12040. }
  12041. if(PlayerInfo[playerid][pCocaine] != 0)
  12042. {
  12043. PlayerInfo[playerid][pCocaine] -= crack;
  12044. TrunkInfo[vid][cCocaine] += crack;
  12045. format(str, sizeof(str), "* %s puts some cocaine in the trunk.", PlayerICName(playerid));
  12046. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12047. return 1;
  12048. }
  12049. else
  12050. {
  12051. SendClientMessage(playerid, COLOR_GREY, "You don't have any crack on you ");
  12052. return 1;
  12053. }
  12054. }
  12055. default:
  12056. {
  12057. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  12058. return 1;
  12059. }
  12060. }
  12061. return 1;
  12062. }
  12063. return 1;
  12064. }
  12065. if(dialogid == TRUNK_PUT_XANAX) //Put xanax
  12066. {
  12067. if(response)
  12068. {
  12069. new counter = 0;
  12070. new vid;
  12071. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  12072. new crack = strval(inputtext);
  12073. for(new i; i != MAX_VEHICLES; i++)
  12074. {
  12075. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  12076. if(dist)
  12077. {
  12078. vid = i;
  12079. counter++;
  12080. }
  12081. }
  12082. switch(counter)
  12083. {
  12084. case 0:
  12085. {
  12086. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  12087. return 1;
  12088. }
  12089. case 1:
  12090. {
  12091. if(IsPlayerInAnyVehicle(playerid))
  12092. {
  12093. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  12094. return 1;
  12095. }
  12096. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  12097. {
  12098. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  12099. return 1;
  12100. }
  12101. if(TrunkInfo[vid][cTrunkOpened] != 1)
  12102. {
  12103. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  12104. return 1;
  12105. }
  12106. new tcrack = TrunkInfo[vid][cXanax];
  12107. new calc = crack +tcrack;
  12108. if(crack < 1)
  12109. {
  12110. SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  12111. return 1;
  12112. }
  12113. if(calc > 250)
  12114. {
  12115. SendClientMessage(playerid, COLOR_GREY, "You can't have that much xanax in your trunk");
  12116. return 1;
  12117. }
  12118. if(crack > PlayerInfo[playerid][pXanax])
  12119. {
  12120. SendClientMessage(playerid, COLOR_GREY, "You don't have that much on you");
  12121. return 1;
  12122. }
  12123. if(PlayerInfo[playerid][pXanax] != 0)
  12124. {
  12125. PlayerInfo[playerid][pXanax] -= crack;
  12126. TrunkInfo[vid][cXanax] += crack;
  12127. format(str, sizeof(str), "* %s puts some xanax in the trunk.", PlayerICName(playerid));
  12128. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12129. return 1;
  12130. }
  12131. else
  12132. {
  12133. SendClientMessage(playerid, COLOR_GREY, "You don't have any crack on you ");
  12134. return 1;
  12135. }
  12136. }
  12137. default:
  12138. {
  12139. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  12140. return 1;
  12141. }
  12142. }
  12143. return 1;
  12144. }
  12145. return 1;
  12146. }
  12147. if(dialogid == TRUNK_TAKE_CANNABIS) //Take pot
  12148. {
  12149. if(response)
  12150. {
  12151. new counter = 0;
  12152. new vid;
  12153. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  12154. new pot = strval(inputtext);
  12155. for(new i; i != MAX_VEHICLES; i++)
  12156. {
  12157. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  12158. if(dist)
  12159. {
  12160. vid = i;
  12161. counter++;
  12162. }
  12163. }
  12164. switch(counter)
  12165. {
  12166. case 0:
  12167. {
  12168. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  12169. return 1;
  12170. }
  12171. case 1:
  12172. {
  12173. if(IsPlayerInAnyVehicle(playerid))
  12174. {
  12175. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  12176. return 1;
  12177. }
  12178. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  12179. {
  12180. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  12181. return 1;
  12182. }
  12183. if(TrunkInfo[vid][cTrunkOpened] != 1)
  12184. {
  12185. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  12186. return 1;
  12187. }
  12188. new ppot = PlayerInfo[playerid][pCannabis];
  12189. new calc = pot +ppot;
  12190. if(pot < 1)
  12191. {
  12192. SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  12193. return 1;
  12194. }
  12195. if(calc > 50)
  12196. {
  12197. SendClientMessage(playerid, COLOR_GREY, "You can't have that much cannabis on you");
  12198. return 1;
  12199. }
  12200. if(pot > TrunkInfo[vid][cCannabis])
  12201. {
  12202. SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the trunk");
  12203. return 1;
  12204. }
  12205. if(TrunkInfo[vid][cCannabis] != 0)
  12206. {
  12207. PlayerInfo[playerid][pCannabis] += pot;
  12208. TrunkInfo[vid][cCannabis] -= pot;
  12209. format(str, sizeof(str), "* %s takes some pot from the trunk.", PlayerICName(playerid));
  12210. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12211. return 1;
  12212. }
  12213. else
  12214. {
  12215. SendClientMessage(playerid, COLOR_GREY, "This trunk haven't got any pot inside ");
  12216. return 1;
  12217. }
  12218. }
  12219. default:
  12220. {
  12221. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  12222. return 1;
  12223. }
  12224. }
  12225. return 1;
  12226. }
  12227. return 1;
  12228. }
  12229. if(dialogid == TRUNK_TAKE_METH) //Take Meth
  12230. {
  12231. if(response)
  12232. {
  12233. new counter = 0;
  12234. new vid;
  12235. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  12236. new pot = strval(inputtext);
  12237. for(new i; i != MAX_VEHICLES; i++)
  12238. {
  12239. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  12240. if(dist)
  12241. {
  12242. vid = i;
  12243. counter++;
  12244. }
  12245. }
  12246. switch(counter)
  12247. {
  12248. case 0:
  12249. {
  12250. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  12251. return 1;
  12252. }
  12253. case 1:
  12254. {
  12255. if(IsPlayerInAnyVehicle(playerid))
  12256. {
  12257. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  12258. return 1;
  12259. }
  12260. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  12261. {
  12262. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  12263. return 1;
  12264. }
  12265. if(TrunkInfo[vid][cTrunkOpened] != 1)
  12266. {
  12267. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  12268. return 1;
  12269. }
  12270. new ppot = PlayerInfo[playerid][pMeth];
  12271. new calc = pot +ppot;
  12272. if(pot < 1)
  12273. {
  12274. SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  12275. return 1;
  12276. }
  12277. if(calc > 50)
  12278. {
  12279. SendClientMessage(playerid, COLOR_GREY, "You can't have that much meth on you");
  12280. return 1;
  12281. }
  12282. if(pot > TrunkInfo[vid][cMeth])
  12283. {
  12284. SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the trunk");
  12285. return 1;
  12286. }
  12287. if(TrunkInfo[vid][cMeth] != 0)
  12288. {
  12289. PlayerInfo[playerid][pMeth] += pot;
  12290. TrunkInfo[vid][cMeth] -= pot;
  12291. format(str, sizeof(str), "* %s takes some meth from the trunk.", PlayerICName(playerid));
  12292. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12293. return 1;
  12294. }
  12295. else
  12296. {
  12297. SendClientMessage(playerid, COLOR_GREY, "This trunk haven't got any meth inside ");
  12298. return 1;
  12299. }
  12300. }
  12301. default:
  12302. {
  12303. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  12304. return 1;
  12305. }
  12306. }
  12307. return 1;
  12308. }
  12309. return 1;
  12310. }
  12311. if(dialogid == TRUNK_TAKE_XANAX) //Take XANAX
  12312. {
  12313. if(response)
  12314. {
  12315. new counter = 0;
  12316. new vid;
  12317. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  12318. new pot = strval(inputtext);
  12319. for(new i; i != MAX_VEHICLES; i++)
  12320. {
  12321. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  12322. if(dist)
  12323. {
  12324. vid = i;
  12325. counter++;
  12326. }
  12327. }
  12328. switch(counter)
  12329. {
  12330. case 0:
  12331. {
  12332. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  12333. return 1;
  12334. }
  12335. case 1:
  12336. {
  12337. if(IsPlayerInAnyVehicle(playerid))
  12338. {
  12339. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  12340. return 1;
  12341. }
  12342. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  12343. {
  12344. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  12345. return 1;
  12346. }
  12347. if(TrunkInfo[vid][cTrunkOpened] != 1)
  12348. {
  12349. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  12350. return 1;
  12351. }
  12352. new ppot = PlayerInfo[playerid][pXanax];
  12353. new calc = pot +ppot;
  12354. if(pot < 1)
  12355. {
  12356. SendClientMessage(playerid, COLOR_GREY, "Invalid amount");
  12357. return 1;
  12358. }
  12359. if(calc > 50)
  12360. {
  12361. SendClientMessage(playerid, COLOR_GREY, "You can't have that much xanax on you");
  12362. return 1;
  12363. }
  12364. if(pot > TrunkInfo[vid][cXanax])
  12365. {
  12366. SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the trunk");
  12367. return 1;
  12368. }
  12369. if(TrunkInfo[vid][cXanax] != 0)
  12370. {
  12371. PlayerInfo[playerid][pXanax] += pot;
  12372. TrunkInfo[vid][cXanax] -= pot;
  12373. format(str, sizeof(str), "* %s takes some xanax from the trunk.", PlayerICName(playerid));
  12374. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12375. return 1;
  12376. }
  12377. else
  12378. {
  12379. SendClientMessage(playerid, COLOR_GREY, "This trunk haven't got any xanax inside ");
  12380. return 1;
  12381. }
  12382. }
  12383. default:
  12384. {
  12385. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  12386. return 1;
  12387. }
  12388. }
  12389. return 1;
  12390. }
  12391. return 1;
  12392. }
  12393. if(dialogid == TRUNKDIALOG) //Trunk
  12394. {
  12395. if(response)
  12396. {
  12397. if(listitem == 0) //Open / Close
  12398. {
  12399. new engine, lights, alarm, doors, bonnet, boot, objective;
  12400. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  12401. if(TrunkInfo[IsByVehTrunk[playerid]][cTrunkOpened] == 0)
  12402. {
  12403. GetVehicleParamsEx(IsByVehTrunk[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
  12404. SetVehicleParamsEx(IsByVehTrunk[playerid], engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_ON, objective);
  12405. TrunkInfo[IsByVehTrunk[playerid]][cTrunkOpened] = 1;
  12406. format(str, sizeof(str), "* %s has opened the trunk.", PlayerICName(playerid));
  12407. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12408. return 1;
  12409. }
  12410. else if(TrunkInfo[IsByVehTrunk[playerid]][cTrunkOpened] == 1)
  12411. {
  12412. GetVehicleParamsEx(IsByVehTrunk[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
  12413. SetVehicleParamsEx(IsByVehTrunk[playerid], engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_OFF, objective);
  12414. TrunkInfo[IsByVehTrunk[playerid]][cTrunkOpened] = 0;
  12415. format(str, sizeof(str), "* %s has closed the trunk.", PlayerICName(playerid));
  12416. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12417. return 1;
  12418. }
  12419. return 1;
  12420. }
  12421. if(listitem == 1) //Check
  12422. {
  12423. new counter = 0;
  12424. new vid;
  12425. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  12426. for(new i; i != MAX_VEHICLES; i++)
  12427. {
  12428. new dist = CheckPlayerDistanceToVehicle(4, playerid, i);
  12429. if(dist)
  12430. {
  12431. vid = i;
  12432. counter++;
  12433. }
  12434. }
  12435. switch(counter)
  12436. {
  12437. case 0:
  12438. {
  12439. SendClientMessage(playerid, COLOR_GREY, "No cars with trunk near you");
  12440. }
  12441. case 1:
  12442. {
  12443. if(IsPlayerInAnyVehicle(playerid))
  12444. {
  12445. SendClientMessage(playerid, COLOR_GREY, "You can't use the trunk while you're in the car");
  12446. return 1;
  12447. }
  12448. if(TrunkInfo[vid][cTrunkOpened] != 1)
  12449. {
  12450. SendClientMessage(playerid, COLOR_RED, "You need to open the trunk first");
  12451. return 1;
  12452. }
  12453. if(IsAPlane(vid) || IsABike(vid) || IsAHelicopter(vid) || IsATrain(vid) || IsABoat(vid) || IsABus(vid) || GetVehicleModel(GetPlayerVehicleID(vid)) == 523)
  12454. {
  12455. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
  12456. return 1;
  12457. }
  12458. new gunname1[64];
  12459. if(TrunkInfo[vid][cGun1] != 0)
  12460. {
  12461. GetWeaponName(TrunkInfo[vid][cGun1], gunname1, sizeof(gunname1));
  12462. }
  12463. else
  12464. {
  12465. gunname1 = "Empty";
  12466. }
  12467. new gunname2[64];
  12468. if(TrunkInfo[vid][cGun2] != 0)
  12469. {
  12470. GetWeaponName(TrunkInfo[vid][cGun2], gunname2, sizeof(gunname2));
  12471. }
  12472. else
  12473. {
  12474. gunname2 = "Empty";
  12475. }
  12476. new coordsstring[128];
  12477. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  12478. format(coordsstring, sizeof(coordsstring), "Gun Slot 1: %s", gunname1);
  12479. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12480. format(coordsstring, sizeof(coordsstring), "Gun Slot 2: %s", gunname2);
  12481. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12482. format(coordsstring, sizeof(coordsstring), "Armor: %0.2f", TrunkInfo[vid][cArmor]);
  12483. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12484. format(coordsstring, sizeof(coordsstring), "Cocaine: %d", TrunkInfo[vid][cCocaine]);
  12485. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12486. format(coordsstring, sizeof(coordsstring), "Cannabis: %d", TrunkInfo[vid][cCannabis]);
  12487. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12488. format(coordsstring, sizeof(coordsstring), "Meth: %d", TrunkInfo[vid][cMeth]);
  12489. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12490. format(coordsstring, sizeof(coordsstring), "Xanax: %d", TrunkInfo[vid][cXanax]);
  12491. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12492. format(coordsstring, sizeof(coordsstring), "Food Tray: %s", getFoodTypeById(TrunkInfo[vid][cFoodtray]));
  12493. SendClientMessage(playerid, COLOR_WHITE, coordsstring);
  12494. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  12495. format(str, sizeof(str), "* %s looks inside the trunk and checks it.", PlayerICName(playerid));
  12496. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  12497. return 1;
  12498. }
  12499. default:
  12500. {
  12501. SendClientMessage(playerid, COLOR_GREY, "Found more then one car in range");
  12502. return 1;
  12503. }
  12504. }
  12505. return 1;
  12506. }
  12507. if(listitem == 2) //Put stuff
  12508. {
  12509. 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
  12510. }
  12511. if(listitem == 3) //Take stuff
  12512. {
  12513. 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
  12514. }
  12515. }
  12516. return 1;
  12517. }
  12518. if(dialogid == 110) //somafm
  12519. {
  12520. if(response)
  12521. {
  12522. switch(listitem)
  12523. {
  12524. case 0:
  12525. {
  12526. PlayAudioStreamForPlayer(playerid, "http://somafm.com/groovesalad.pls");
  12527. usingRadio[playerid] = 1;
  12528. }
  12529. case 1:
  12530. {
  12531. PlayAudioStreamForPlayer(playerid, "http://somafm.com/dronezone.pls");
  12532. usingRadio[playerid] = 1;
  12533. }
  12534. case 2:
  12535. {
  12536. PlayAudioStreamForPlayer(playerid, "http://somafm.com/christmas.pls");
  12537. usingRadio[playerid] = 1;
  12538. }
  12539. case 3:
  12540. {
  12541. PlayAudioStreamForPlayer(playerid, "http://somafm.com/lush.pls");
  12542. usingRadio[playerid] = 1;
  12543. }
  12544. case 4:
  12545. {
  12546. PlayAudioStreamForPlayer(playerid, "http://somafm.com/indiepop.pls");
  12547. usingRadio[playerid] = 1;
  12548. }
  12549. case 5:
  12550. {
  12551. PlayAudioStreamForPlayer(playerid, "http://somafm.com/spacestation.pls");
  12552. usingRadio[playerid] = 1;
  12553. }
  12554. case 6:
  12555. {
  12556. PlayAudioStreamForPlayer(playerid, "http://somafm.com/secretagent.pls");
  12557. usingRadio[playerid] = 1;
  12558. }
  12559. case 7:
  12560. {
  12561. PlayAudioStreamForPlayer(playerid, "http://somafm.com/xmasinfrisko.pls");
  12562. usingRadio[playerid] = 1;
  12563. }
  12564. case 8:
  12565. {
  12566. PlayAudioStreamForPlayer(playerid, "http://somafm.com/beatblender.pls");
  12567. usingRadio[playerid] = 1;
  12568. }
  12569. case 9:
  12570. {
  12571. PlayAudioStreamForPlayer(playerid, "http://somafm.com/suburbsofgoa.pls");
  12572. usingRadio[playerid] = 1;
  12573. }
  12574. case 10:
  12575. {
  12576. PlayAudioStreamForPlayer(playerid, "http://somafm.com/bootliquor.pls");
  12577. usingRadio[playerid] = 1;
  12578. }
  12579. case 11:
  12580. {
  12581. PlayAudioStreamForPlayer(playerid, "http://somafm.com/u80s192.pls");
  12582. usingRadio[playerid] = 1;
  12583. }
  12584. case 12:
  12585. {
  12586. PlayAudioStreamForPlayer(playerid, "http://somafm.com/poptron.pls");
  12587. usingRadio[playerid] = 1;
  12588. }
  12589. case 13:
  12590. {
  12591. PlayAudioStreamForPlayer(playerid, "http://somafm.com/cliqhop.pls");
  12592. usingRadio[playerid] = 1;
  12593. }
  12594. case 14:
  12595. {
  12596. PlayAudioStreamForPlayer(playerid, "http://somafm.com/sonicuniverse192.pls");
  12597. usingRadio[playerid] = 1;
  12598. }
  12599. case 15:
  12600. {
  12601. PlayAudioStreamForPlayer(playerid, "http://somafm.com/missioncontrol.pls");
  12602. usingRadio[playerid] = 1;
  12603. }
  12604. case 16:
  12605. {
  12606. PlayAudioStreamForPlayer(playerid, "http://somafm.com/digitalis.pls");
  12607. usingRadio[playerid] = 1;
  12608. }
  12609. case 17:
  12610. {
  12611. PlayAudioStreamForPlayer(playerid, "http://somafm.com/illstreet.pls");
  12612. usingRadio[playerid] = 1;
  12613. }
  12614. case 18:
  12615. {
  12616. PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
  12617. usingRadio[playerid] = 1;
  12618. }
  12619. case 19:
  12620. {
  12621. PlayAudioStreamForPlayer(playerid, "http://somafm.com/doomed.pls");
  12622. usingRadio[playerid] = 1;
  12623. }
  12624. case 20:
  12625. {
  12626. PlayAudioStreamForPlayer(playerid, "http://somafm.com/covers.pls");
  12627. usingRadio[playerid] = 1;
  12628. }
  12629. case 21:
  12630. {
  12631. PlayAudioStreamForPlayer(playerid, "http://somafm.com/480min.pls");
  12632. usingRadio[playerid] = 1;
  12633. }
  12634. case 22:
  12635. {
  12636. PlayAudioStreamForPlayer(playerid, "http://somafm.com/brfm.pls");
  12637. usingRadio[playerid] = 1;
  12638. }
  12639. }
  12640. }
  12641. else
  12642. {
  12643. DisplayDialogForPlayer(playerid, 108); //radio main
  12644. }
  12645. return 1;
  12646. }
  12647. if(dialogid == 111) //etn.fm
  12648. {
  12649. if(response)
  12650. {
  12651. switch(listitem)
  12652. {
  12653. case 0:
  12654. {
  12655. PlayAudioStreamForPlayer(playerid, "http://etn.fm/playlists/etn1beta.m3u");
  12656. usingRadio[playerid] = 1;
  12657. }
  12658. case 1:
  12659. {
  12660. PlayAudioStreamForPlayer(playerid, "http://etn.fm/playlists/etn2beta.m3u");
  12661. usingRadio[playerid] = 1;
  12662. }
  12663. }
  12664. }
  12665. else
  12666. {
  12667. DisplayDialogForPlayer(playerid, 108); //radio main
  12668. }
  12669. return 1;
  12670. }
  12671. if(dialogid == 112) //talk radio
  12672. {
  12673. if(response)
  12674. {
  12675. switch(listitem)
  12676. {
  12677. case 0:
  12678. {
  12679. PlayAudioStreamForPlayer(playerid, "http://www.infowars.com/stream.pls");
  12680. usingRadio[playerid] = 1;
  12681. }
  12682. }
  12683. }
  12684. else
  12685. {
  12686. DisplayDialogForPlayer(playerid, 108); //radio main
  12687. }
  12688. return 1;
  12689. }
  12690. if(dialogid == 113)
  12691. {
  12692. //custom radio
  12693. if(response)
  12694. {
  12695. if(!strlen(inputtext))
  12696. {
  12697. SendClientMessage(playerid, COLOR_WHITE, "You must enter a stream url.");
  12698. DisplayDialogForPlayer(playerid, 113);
  12699. return 1;
  12700. }
  12701. else
  12702. {
  12703. if(strcmp(inputtext, "youtube", true) != -1) return SendClientMessage(playerid, COLOR_GRAD1, "Youtube links are disabled! Try mp3skull.com.");
  12704. PlayAudioStreamForPlayer(playerid, inputtext); // New str seemed redundant.
  12705. usingRadio[playerid] = 1;
  12706. }
  12707. }
  12708. else
  12709. {
  12710. DisplayDialogForPlayer(playerid, 108); //radio main
  12711. }
  12712. return 1;
  12713. }
  12714. if(dialogid == 919)
  12715. {
  12716. if(response == 1)
  12717. {
  12718. if(IsPlayerInRangeOfPoint(playerid, 7.0, 1545.24, -1011.07, 23.65))
  12719. {
  12720. BParkedCar[playerid] = 1;
  12721. SetDynamicObjectRot(BPLG1, 0, 0, -259);
  12722. SetTimer("Timer_BPLgateclose", 3500, false);
  12723. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Watchman: Go ahead and park your car.");
  12724. }
  12725. else if(IsPlayerInRangeOfPoint(playerid, 7.0, 1634.00, -1138.31, 23.68))
  12726. {
  12727. BParkedCar[playerid] = 1;
  12728. SetDynamicObjectRot(BPLG2, 0, 0, 0);
  12729. SetTimer("Timer_BPLgateclose", 3500, false);
  12730. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Watchman: Go ahead and park your car.");
  12731. }
  12732. }
  12733. return 1;
  12734. }
  12735. //calculator
  12736. if(dialogid == DIALOG_CALC_1)
  12737. {
  12738. if(response)
  12739. {
  12740. switch(listitem)
  12741. {
  12742. case 0:
  12743. {
  12744. Calc_Option[playerid] = 1; // Multiply
  12745. ShowPlayerDialog(playerid, DIALOG_CALC_2, DIALOG_STYLE_INPUT, "Calculator", "Please choose a number you would like to multiply.", "Times", "Cancel");
  12746. }
  12747. case 1:
  12748. {
  12749. Calc_Option[playerid] = 2; // Add
  12750. ShowPlayerDialog(playerid, DIALOG_CALC_2, DIALOG_STYLE_INPUT, "Calculator", "Please choose a number you would like to add.", "Plus", "Cancel");
  12751. }
  12752. case 2:
  12753. {
  12754. Calc_Option[playerid] = 3; // Divide
  12755. ShowPlayerDialog(playerid, DIALOG_CALC_2, DIALOG_STYLE_INPUT, "Calculator", "Please choose a number you would like to divide.", "Divided By", "Cancel");
  12756. }
  12757. case 3:
  12758. {
  12759. Calc_Option[playerid] = 4; // Substract
  12760. ShowPlayerDialog(playerid, DIALOG_CALC_2, DIALOG_STYLE_INPUT, "Calculator", "Please choose a number you would like to substract.", "Minus", "Cancel");
  12761. }
  12762. }
  12763. }
  12764. return 1;
  12765. }
  12766. if(dialogid == DIALOG_CALC_2)
  12767. {
  12768. if(IsNumeric(inputtext))
  12769. {
  12770. Calc_Numb1[playerid] = strval(inputtext);
  12771. ShowPlayerDialog(playerid, DIALOG_CALC_3, 1, "Calculator", "Please choose the second number", "Equals", "Cancel");
  12772. return 1;
  12773. }
  12774. }
  12775. if(dialogid == DIALOG_CALC_3)
  12776. {
  12777. if(IsNumeric(inputtext))
  12778. {
  12779. new sz_String[128];
  12780. Calc_Numb2[playerid] = strval(inputtext);
  12781. if(Calc_Option[playerid] == 1) // Multiply
  12782. {
  12783. Calc_Result[playerid] = Calc_Numb1[playerid] * Calc_Numb2[playerid];
  12784. format(sz_String, 128, "Calculator: %d * %d = %d", Calc_Numb1[playerid], Calc_Numb2[playerid], Calc_Result[playerid]);
  12785. }
  12786. if(Calc_Option[playerid] == 2) // Plus
  12787. {
  12788. Calc_Result[playerid] = Calc_Numb1[playerid] + Calc_Numb2[playerid];
  12789. format(sz_String, 128, "Calculator: %d + %d = %d", Calc_Numb1[playerid], Calc_Numb2[playerid], Calc_Result[playerid]);
  12790. }
  12791. if(Calc_Option[playerid] == 3) // Divide
  12792. {
  12793. Calc_Result[playerid] = Calc_Numb1[playerid] / Calc_Numb2[playerid];
  12794. format(sz_String, 128, "Calculator: %d / %d = %d", Calc_Numb1[playerid], Calc_Numb2[playerid], Calc_Result[playerid]);
  12795. }
  12796. if(Calc_Option[playerid] == 4) // Substract
  12797. {
  12798. Calc_Result[playerid] = Calc_Numb1[playerid] - Calc_Numb2[playerid];
  12799. format(sz_String, 128, "Calculator: %d - %d = %d", Calc_Numb1[playerid], Calc_Numb2[playerid], Calc_Result[playerid]);
  12800. }
  12801. SendClientMessage(playerid, COLOR_GREY, sz_String);
  12802. }
  12803. return 1;
  12804. }
  12805. //radio dialogs
  12806. if(dialogid == DIALOG_EDIT_ON)
  12807. {
  12808. if(!response)
  12809. {
  12810. editingBoomboxID[playerid] = -1; //no longer editing
  12811. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12812. return 1;
  12813. }
  12814. if(listitem == 0) //turn on
  12815. {
  12816. switch(BoomboxInfo[editingBoomboxID[playerid]][boomboxTurnedOn])
  12817. {
  12818. case 0: //if off
  12819. {
  12820. //set radio url top default
  12821. if(!BoomboxInfo[editingBoomboxID[playerid]][BoomboxURL]) //radio url is empty, play a random station
  12822. {
  12823. new defaultStation[128];
  12824. new rand = random(3);
  12825. switch(rand)
  12826. {
  12827. case 0:
  12828. {
  12829. format(defaultStation, 128, "http://ch1relay1.etn.fm:8130/listen.pls?sid=1");
  12830. }
  12831. case 1:
  12832. {
  12833. format(defaultStation, 128, "http://somafm.com/indiepop.pls");
  12834. }
  12835. case 2:
  12836. {
  12837. format(defaultStation, 128, "http://www.infowars.com/stream.pls");
  12838. }
  12839. }
  12840. format(BoomboxInfo[editingBoomboxID[playerid]][BoomboxURL], 256, defaultStation);
  12841. BoomboxInfo[editingBoomboxID[playerid]][boomboxTurnedOn] = 1;
  12842. BoomboxInfo[editingBoomboxID[playerid]][BoomboxWorld] = GetPlayerVirtualWorld(playerid);
  12843. editingBoomboxID[playerid] = -1; //no longer editing
  12844. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12845. }
  12846. else //just turn it on
  12847. {
  12848. BoomboxInfo[editingBoomboxID[playerid]][boomboxTurnedOn] = 1;
  12849. editingBoomboxID[playerid] = -1; //no longer editing
  12850. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12851. }
  12852. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have turned on the boombox.");
  12853. }
  12854. case 1: //if on
  12855. {
  12856. BoomboxInfo[editingBoomboxID[playerid]][boomboxTurnedOn] = 0;
  12857. BoomboxInfo[editingBoomboxID[playerid]][BoomboxWorld] = GetPlayerVirtualWorld(playerid);
  12858. editingBoomboxID[playerid] = -1; //no longer editing
  12859. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12860. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have turned off the boombox.");
  12861. }
  12862. }
  12863. }
  12864. if(listitem == 1) //change station
  12865. {
  12866. ShowPlayerDialog(playerid, DIALOG_STATIONS, DIALOG_STYLE_LIST, "Radio stations", "PRP Official Radio\nRadio Stations\nCustom", "Select", "Cancel");
  12867. return 1;
  12868. }
  12869. if(listitem == 2) //lock
  12870. {
  12871. if(editingBoomboxID[playerid] != playerid)
  12872. {
  12873. SendClientMessage(playerid, COLOR_GREY, "You must be the owner to lock the boombox.");
  12874. editingBoomboxID[playerid] = -1;
  12875. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12876. return 1;
  12877. }
  12878. new string[128];
  12879. new playername[MAX_PLAYER_NAME];
  12880. GetPlayerName(playerid, playername, sizeof(playername));
  12881. new bbid = editingBoomboxID[playerid];
  12882. if(BoomboxInfo[bbid][locked])
  12883. {
  12884. format(string, sizeof(string), "%s's Stereo\n{FFFFFF}/edit", playername);
  12885. BoomboxInfo[bbid][locked] = 0;
  12886. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have unlocked the boombox.");
  12887. }
  12888. else
  12889. {
  12890. format(string, sizeof(string), "%s's Stereo\n{FFFFFF}Locked", playername);
  12891. BoomboxInfo[bbid][locked] = 1;
  12892. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have locked the boombox.");
  12893. }
  12894. UpdateDynamic3DTextLabelText(BoomboxInfo[bbid][bbLabelID], 0x6E88FFFF, string);
  12895. editingBoomboxID[playerid] = -1; //no longer editing
  12896. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12897. return 1;
  12898. }
  12899. if(listitem == 3) //pickup
  12900. {
  12901. if(PlayerInfo[playerid][pStereo] != 0 && editingBoomboxID[playerid] != playerid) //if trying to pickup another persons boombox and i already have own, don't let me
  12902. {
  12903. SendClientMessage(playerid, COLOR_GREY, "You already have a boombox.");
  12904. editingBoomboxID[playerid] = -1; //no longer editing
  12905. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12906. return 1;
  12907. }
  12908. // http://www.p-rp.xyz/showthread.php?114184
  12909. if(PlayerInfo[editingBoomboxID[playerid]][pStereo] == 4 && PlayerInfo[playerid][pDonateRank] != 3 && editingBoomboxID[playerid] != playerid)
  12910. {
  12911. SendClientMessage(playerid, COLOR_GREY, "You must be a Gold VIP to carry a large boombox.");
  12912. editingBoomboxID[playerid] = -1; //no longer editing
  12913. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12914. return 1;
  12915. }
  12916. pickupBoombox(playerid);
  12917. editingBoomboxID[playerid] = -1; //no longer editing
  12918. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12919. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have picked up the boombox.");
  12920. }
  12921. return 1;
  12922. }
  12923. if(dialogid == DIALOG_STATIONS)
  12924. {
  12925. if(!response)
  12926. {
  12927. if(EDITING_TYPE[playerid] == EDIT_RADIO_BOOMBOX)
  12928. {
  12929. displayBoomboxEditDialog(playerid);
  12930. }
  12931. else if(EDITING_TYPE[playerid] == EDIT_RADIO_VEHICLE)
  12932. {
  12933. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  12934. }
  12935. return 1;
  12936. }
  12937. if(listitem == 0) //PRP Official Radio
  12938. {
  12939. new rstring[1000], name[32], rgenre[32];
  12940. for(new i = 0; i < sizeof(radioInfo); i++)
  12941. {
  12942. format(rgenre, sizeof(rgenre), "%s", radioInfo[i][genreName]);
  12943. format(name, sizeof(name), "%s", radioInfo[i][channelName]);
  12944. format(rstring, sizeof(rstring), "%s %s - %s\n", rstring, rgenre, name);
  12945. }
  12946. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST1, DIALOG_STYLE_LIST, "PRP Official Radio", rstring, "Select", "Cancel");
  12947. return 1;
  12948. }
  12949. if(listitem == 1) //display genre
  12950. {
  12951. 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");
  12952. return 1;
  12953. }
  12954. if(listitem == 2) //Custom
  12955. {
  12956. 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");
  12957. return 1;
  12958. }
  12959. }
  12960. if(dialogid == DIALOG_SARP_STATIONS_LIST1) //PRP OFFICIAL STATIONS LIST
  12961. {
  12962. if(!response)
  12963. {
  12964. ShowPlayerDialog(playerid, DIALOG_STATIONS, DIALOG_STYLE_LIST, "Radio stations", "PRP Official Radio\nRadio Stations\nCustom", "Select", "Cancel");
  12965. return 1;
  12966. }
  12967. if(radioInfo[listitem][taken] == 0) //radio station is not taken or url is blank
  12968. {
  12969. new rstring[1000], name[32], rgenre[32];
  12970. for(new i = 0; i < sizeof(radioInfo); i++)
  12971. {
  12972. format(rgenre, sizeof(rgenre), "%s", radioInfo[i][genreName]);
  12973. format(name, sizeof(name), "%s", radioInfo[i][channelName]);
  12974. format(rstring, sizeof(rstring), "%s %s - %s\n", rstring, rgenre, name);
  12975. }
  12976. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST1, DIALOG_STYLE_LIST, "PRP Official Radio", rstring, "Select", "Cancel");
  12977. SendClientMessage(playerid, COLOR_GREY, "That radio station hasn't been taken yet.");
  12978. return 1;
  12979. }
  12980. if(!strcmp(radioInfo[listitem][url], "None", true))
  12981. {
  12982. new rstring[1000], name[32], rgenre[32];
  12983. for(new i = 0; i < sizeof(radioInfo); i++)
  12984. {
  12985. format(rgenre, sizeof(rgenre), "%s", radioInfo[i][genreName]);
  12986. format(name, sizeof(name), "%s", radioInfo[i][channelName]);
  12987. format(rstring, sizeof(rstring), "%s %s - %s\n", rstring, rgenre, name);
  12988. }
  12989. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST1, DIALOG_STYLE_LIST, "PRP Official Radio", rstring, "Select", "Cancel");
  12990. SendClientMessage(playerid, COLOR_GREY, "That radio station hasn't been set up yet.");
  12991. return 1;
  12992. }
  12993. if(EDITING_TYPE[playerid] == EDIT_RADIO_BOOMBOX)
  12994. {
  12995. format(BoomboxInfo[editingBoomboxID[playerid]][BoomboxURL], 256, radioInfo[listitem][url]); //set BB to selected radio station
  12996. changeBoomboxRadioStation(editingBoomboxID[playerid]); //update for all players streaming to this BB
  12997. editingBoomboxID[playerid] = -1; //no longer editing
  12998. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have changed the radio station on the boombox.");
  12999. }
  13000. else if(EDITING_TYPE[playerid] == EDIT_RADIO_VEHICLE)
  13001. {
  13002. new vehid = GetPlayerVehicleID(playerid);
  13003. if(vehid)
  13004. {
  13005. format(VehicleInfo[vehid][radioURL], 256, radioInfo[listitem][url]);
  13006. VehicleInfo[vehid][radioStation] = 1;
  13007. playVehicleStreamForAll(vehid);
  13008. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have changed the radio station in the vehicle.");
  13009. }
  13010. }
  13011. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  13012. return 1;
  13013. }
  13014. if(dialogid == DIALOG_SARP_STATIONS_LIST2) //PLAY STATION
  13015. {
  13016. if(!response)
  13017. {
  13018. 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");
  13019. return 1;
  13020. }
  13021. new selected = listItemGenre[playerid] -9 +listitem;
  13022. if(EDITING_TYPE[playerid] == EDIT_RADIO_BOOMBOX)
  13023. {
  13024. format(BoomboxInfo[editingBoomboxID[playerid]][BoomboxURL], 256, radioStations[selected][radiourl]); //set BB to selected radio station
  13025. changeBoomboxRadioStation(editingBoomboxID[playerid]); //update for all players streaming to this BB
  13026. editingBoomboxID[playerid] = -1; //no longer editing
  13027. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have changed the radio station on the boombox.");
  13028. }
  13029. else if(EDITING_TYPE[playerid] == EDIT_RADIO_VEHICLE)
  13030. {
  13031. new vehid = GetPlayerVehicleID(playerid);
  13032. if(vehid)
  13033. {
  13034. format(VehicleInfo[vehid][radioURL], 256, radioStations[selected][radiourl]);
  13035. VehicleInfo[vehid][radioStation] = 1;
  13036. playVehicleStreamForAll(vehid);
  13037. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have changed the radio station in the vehicle.");
  13038. }
  13039. }
  13040. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  13041. listItemGenre[playerid] = -1; //reset the listitem
  13042. return 1;
  13043. }
  13044. if(dialogid == DIALOG_SARP_STATIONS_GENRES) //PRP GENRES
  13045. {
  13046. if(!response)
  13047. {
  13048. listItemGenre[playerid] = -1;
  13049. ShowPlayerDialog(playerid, DIALOG_STATIONS, DIALOG_STYLE_LIST, "Radio stations", "PRP Official Radio\nRadio Stations\nCustom", "Select", "Cancel");
  13050. return 1;
  13051. }
  13052. new rstring[1000], name[32];
  13053. if(listitem == 0)
  13054. {
  13055. for(new r = 0; r < 10; ++r)
  13056. {
  13057. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13058. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13059. listItemGenre[playerid] = r;
  13060. }
  13061. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Alternative", rstring, "Play", "Cancel");
  13062. return 1;
  13063. }
  13064. if(listitem == 1)
  13065. {
  13066. for(new r = 10; r < 20; ++r)
  13067. {
  13068. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13069. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13070. listItemGenre[playerid] = r;
  13071. }
  13072. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Blues", rstring, "Play", "Cancel");
  13073. return 1;
  13074. }
  13075. if(listitem == 2)
  13076. {
  13077. for(new r = 20; r < 30; ++r)
  13078. {
  13079. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13080. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13081. listItemGenre[playerid] = r;
  13082. }
  13083. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Classical", rstring, "Play", "Cancel");
  13084. return 1;
  13085. }
  13086. if(listitem == 3)
  13087. {
  13088. for(new r = 30; r < 40; ++r)
  13089. {
  13090. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13091. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13092. listItemGenre[playerid] = r;
  13093. }
  13094. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Country", rstring, "Play", "Cancel");
  13095. return 1;
  13096. }
  13097. if(listitem == 4)
  13098. {
  13099. for(new r = 40; r < 50; ++r)
  13100. {
  13101. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13102. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13103. listItemGenre[playerid] = r;
  13104. }
  13105. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Decades", rstring, "Play", "Cancel");
  13106. return 1;
  13107. }
  13108. if(listitem == 5)
  13109. {
  13110. for(new r = 50; r < 60; ++r)
  13111. {
  13112. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13113. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13114. listItemGenre[playerid] = r;
  13115. }
  13116. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Easy Listening", rstring, "Play", "Cancel");
  13117. return 1;
  13118. }
  13119. if(listitem == 6)
  13120. {
  13121. for(new r = 60; r < 70; ++r)
  13122. {
  13123. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13124. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13125. listItemGenre[playerid] = r;
  13126. }
  13127. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Electronic", rstring, "Play", "Cancel");
  13128. return 1;
  13129. }
  13130. if(listitem == 7)
  13131. {
  13132. for(new r = 70; r < 80; ++r)
  13133. {
  13134. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13135. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13136. listItemGenre[playerid] = r;
  13137. }
  13138. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Folk", rstring, "Play", "Cancel");
  13139. return 1;
  13140. }
  13141. if(listitem == 8)
  13142. {
  13143. for(new r = 80; r < 90; ++r)
  13144. {
  13145. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13146. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13147. listItemGenre[playerid] = r;
  13148. }
  13149. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Inspirational", rstring, "Play", "Cancel");
  13150. return 1;
  13151. }
  13152. if(listitem == 9)
  13153. {
  13154. for(new r = 90; r < 100; ++r)
  13155. {
  13156. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13157. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13158. listItemGenre[playerid] = r;
  13159. }
  13160. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - International", rstring, "Play", "Cancel");
  13161. return 1;
  13162. }
  13163. if(listitem == 10)
  13164. {
  13165. for(new r = 100; r < 110; ++r)
  13166. {
  13167. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13168. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13169. listItemGenre[playerid] = r;
  13170. }
  13171. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Jazz", rstring, "Play", "Cancel");
  13172. return 1;
  13173. }
  13174. if(listitem == 11)
  13175. {
  13176. for(new r = 110; r < 120; ++r)
  13177. {
  13178. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13179. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13180. listItemGenre[playerid] = r;
  13181. }
  13182. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Latin", rstring, "Play", "Cancel");
  13183. return 1;
  13184. }
  13185. if(listitem == 12)
  13186. {
  13187. for(new r = 120; r < 130; ++r)
  13188. {
  13189. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13190. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13191. listItemGenre[playerid] = r;
  13192. }
  13193. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Metal", rstring, "Play", "Cancel");
  13194. return 1;
  13195. }
  13196. if(listitem == 13)
  13197. {
  13198. for(new r = 130; r < 140; ++r)
  13199. {
  13200. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13201. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13202. listItemGenre[playerid] = r;
  13203. }
  13204. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Misc", rstring, "Play", "Cancel");
  13205. return 1;
  13206. }
  13207. if(listitem == 14)
  13208. {
  13209. for(new r = 140; r < 150; ++r)
  13210. {
  13211. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13212. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13213. listItemGenre[playerid] = r;
  13214. }
  13215. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - New Age", rstring, "Play", "Cancel");
  13216. return 1;
  13217. }
  13218. if(listitem == 15)
  13219. {
  13220. for(new r = 150; r < 160; ++r)
  13221. {
  13222. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13223. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13224. listItemGenre[playerid] = r;
  13225. }
  13226. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Pop", rstring, "Play", "Cancel");
  13227. return 1;
  13228. }
  13229. if(listitem == 16)
  13230. {
  13231. for(new r = 160; r < 170; ++r)
  13232. {
  13233. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13234. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13235. listItemGenre[playerid] = r;
  13236. }
  13237. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Public Radio", rstring, "Play", "Cancel");
  13238. return 1;
  13239. }
  13240. if(listitem == 17)
  13241. {
  13242. for(new r = 170; r < 180; ++r)
  13243. {
  13244. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13245. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13246. listItemGenre[playerid] = r;
  13247. }
  13248. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - R&B/Urban", rstring, "Play", "Cancel");
  13249. return 1;
  13250. }
  13251. if(listitem == 18)
  13252. {
  13253. for(new r = 180; r < 190; ++r)
  13254. {
  13255. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13256. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13257. listItemGenre[playerid] = r;
  13258. }
  13259. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Rap", rstring, "Play", "Cancel");
  13260. return 1;
  13261. }
  13262. if(listitem == 19)
  13263. {
  13264. for(new r = 190; r < 200; ++r)
  13265. {
  13266. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13267. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13268. listItemGenre[playerid] = r;
  13269. }
  13270. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Reggae", rstring, "Play", "Cancel");
  13271. return 1;
  13272. }
  13273. if(listitem == 20)
  13274. {
  13275. for(new r = 200; r < 210; ++r)
  13276. {
  13277. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13278. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13279. listItemGenre[playerid] = r;
  13280. }
  13281. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Rock", rstring, "Play", "Cancel");
  13282. return 1;
  13283. }
  13284. if(listitem == 21)
  13285. {
  13286. for(new r = 210; r < 220; ++r)
  13287. {
  13288. format(name, sizeof(name), "%s", radioStations[r][radioname]);
  13289. format(rstring, sizeof(rstring), "%s %s (listeners: %d)\n", rstring, name, radioStations[r][listeners]);
  13290. listItemGenre[playerid] = r;
  13291. }
  13292. ShowPlayerDialog(playerid, DIALOG_SARP_STATIONS_LIST2, DIALOG_STYLE_LIST, "Radio stations - Talk", rstring, "Play", "Cancel");
  13293. return 1;
  13294. }
  13295. }
  13296. if(dialogid == DIALOG_SARP_STATIONS_CUSTOM) //PRP CUSTOM
  13297. {
  13298. if(!response)
  13299. {
  13300. ShowPlayerDialog(playerid, DIALOG_STATIONS, DIALOG_STYLE_LIST, "Radio stations", "PRP Official Radio\nRadio Stations\nCustom", "Select", "Cancel");
  13301. return 1;
  13302. }
  13303. if(!strlen(inputtext))
  13304. {
  13305. SendClientMessage(playerid, COLOR_WHITE, "You must enter a stream url.");
  13306. 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");
  13307. return 1;
  13308. }
  13309. else
  13310. {
  13311. new rstr[256];
  13312. strmid(rstr, inputtext, 0, strlen(inputtext), 255);
  13313. if(EDITING_TYPE[playerid] == EDIT_RADIO_BOOMBOX)
  13314. {
  13315. format(BoomboxInfo[editingBoomboxID[playerid]][BoomboxURL], 256, rstr); //set BB to selected radio station
  13316. changeBoomboxRadioStation(editingBoomboxID[playerid]); //update for all players streaming to this BB
  13317. editingBoomboxID[playerid] = -1; //no longer editing
  13318. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have changed the radio station on the boombox.");
  13319. }
  13320. else if(EDITING_TYPE[playerid] == EDIT_RADIO_VEHICLE)
  13321. {
  13322. new vehid = GetPlayerVehicleID(playerid);
  13323. if(vehid)
  13324. {
  13325. format(VehicleInfo[vehid][radioURL], 256, rstr);
  13326. VehicleInfo[vehid][radioStation] = 1;
  13327. playVehicleStreamForAll(vehid);
  13328. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have changed the radio station in the vehicle.");
  13329. }
  13330. }
  13331. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  13332. }
  13333. }
  13334. //radio vehicle
  13335. if(dialogid == DIALOG_CAR_MENU_MAIN)
  13336. {
  13337. if(!response) return 1;
  13338. if(listitem == 0) //turn off/on
  13339. {
  13340. new vehid = GetPlayerVehicleID(playerid);
  13341. if(VehicleInfo[vehid][radioStation]) // if on
  13342. {
  13343. VehicleInfo[vehid][radioStation] = 0;
  13344. stopVehicleStreamForAll(vehid);
  13345. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have turned the vehicle radio off.");
  13346. }
  13347. else
  13348. {
  13349. if(!VehicleInfo[vehid][radioURL]) //radio url is empty, play a random station
  13350. {
  13351. new defaultStation[128];
  13352. //random radio selector (based on car type)
  13353. new vehicleid = GetPlayerVehicleID(playerid);
  13354. new vehmodel = GetVehicleModel(vehicleid);
  13355. new cartype = getCarType(vehmodel);
  13356. switch(cartype)
  13357. {
  13358. case 1: //industrial car
  13359. {
  13360. new rand = random(10);
  13361. switch(rand)
  13362. {
  13363. case 0:
  13364. {
  13365. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=212880"); //xliv rap
  13366. }
  13367. case 1:
  13368. {
  13369. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=188714"); //art bell
  13370. }
  13371. case 2:
  13372. {
  13373. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1654897"); //reggae
  13374. }
  13375. case 3:
  13376. {
  13377. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=164745"); //80's 90's
  13378. }
  13379. case 4:
  13380. {
  13381. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=914897"); //idobi
  13382. }
  13383. case 5:
  13384. {
  13385. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=326520"); //beatles
  13386. }
  13387. case 6:
  13388. {
  13389. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=106750"); //rock heaven
  13390. }
  13391. case 7:
  13392. {
  13393. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1562093"); //calm radio solo piano
  13394. }
  13395. case 8:
  13396. {
  13397. format(defaultStation, 128, "http://ch1relay1.etn.fm:8130/listen.pls?sid=1"); //etn1
  13398. }
  13399. case 9:
  13400. {
  13401. format(defaultStation, 128, "http://ch1relay1.etn.fm:8000/listen.pls?sid=6"); //etn2
  13402. }
  13403. }
  13404. format(VehicleInfo[vehid][radioURL], 256, defaultStation);
  13405. }
  13406. case 2: //poor car
  13407. {
  13408. new rand = random(10);
  13409. switch(rand)
  13410. {
  13411. case 0:
  13412. {
  13413. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=212880"); //xliv rap
  13414. }
  13415. case 1:
  13416. {
  13417. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=188714"); //art bell
  13418. }
  13419. case 2:
  13420. {
  13421. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1654897"); //reggae
  13422. }
  13423. case 3:
  13424. {
  13425. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=164745"); //80's 90's
  13426. }
  13427. case 4:
  13428. {
  13429. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=914897"); //idobi
  13430. }
  13431. case 5:
  13432. {
  13433. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=326520"); //beatles
  13434. }
  13435. case 6:
  13436. {
  13437. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=106750"); //rock heaven
  13438. }
  13439. case 7:
  13440. {
  13441. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1562093"); //calm radio solo piano
  13442. }
  13443. case 8:
  13444. {
  13445. format(defaultStation, 128, "http://ch1relay1.etn.fm:8130/listen.pls?sid=1"); //etn1
  13446. }
  13447. case 9:
  13448. {
  13449. format(defaultStation, 128, "http://ch1relay1.etn.fm:8000/listen.pls?sid=6"); //etn2
  13450. }
  13451. }
  13452. format(VehicleInfo[vehid][radioURL], 256, defaultStation);
  13453. }
  13454. case 3: //normal car
  13455. {
  13456. new rand = random(10);
  13457. switch(rand)
  13458. {
  13459. case 0:
  13460. {
  13461. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=212880"); //xliv rap
  13462. }
  13463. case 1:
  13464. {
  13465. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=188714"); //art bell
  13466. }
  13467. case 2:
  13468. {
  13469. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1654897"); //reggae
  13470. }
  13471. case 3:
  13472. {
  13473. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=164745"); //80's 90's
  13474. }
  13475. case 4:
  13476. {
  13477. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=914897"); //idobi
  13478. }
  13479. case 5:
  13480. {
  13481. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=326520"); //beatles
  13482. }
  13483. case 6:
  13484. {
  13485. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=106750"); //rock heaven
  13486. }
  13487. case 7:
  13488. {
  13489. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1562093"); //calm radio solo piano
  13490. }
  13491. case 8:
  13492. {
  13493. format(defaultStation, 128, "http://ch1relay1.etn.fm:8130/listen.pls?sid=1"); //etn1
  13494. }
  13495. case 9:
  13496. {
  13497. format(defaultStation, 128, "http://ch1relay1.etn.fm:8000/listen.pls?sid=6"); //etn2
  13498. }
  13499. }
  13500. format(VehicleInfo[vehid][radioURL], 256, defaultStation);
  13501. }
  13502. case 4: //country car
  13503. {
  13504. new rand = random(3);
  13505. switch(rand)
  13506. {
  13507. case 0:
  13508. {
  13509. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=297243");
  13510. }
  13511. case 1:
  13512. {
  13513. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=96698");
  13514. }
  13515. case 2:
  13516. {
  13517. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=9494745");
  13518. }
  13519. }
  13520. format(VehicleInfo[vehid][radioURL], 256, defaultStation);
  13521. }
  13522. default: //unknown
  13523. {
  13524. new rand = random(10);
  13525. switch(rand)
  13526. {
  13527. case 0:
  13528. {
  13529. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=212880"); //xliv rap
  13530. }
  13531. case 1:
  13532. {
  13533. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=188714"); //art bell
  13534. }
  13535. case 2:
  13536. {
  13537. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1654897"); //reggae
  13538. }
  13539. case 3:
  13540. {
  13541. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=164745"); //80's 90's
  13542. }
  13543. case 4:
  13544. {
  13545. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=914897"); //idobi
  13546. }
  13547. case 5:
  13548. {
  13549. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=326520"); //beatles
  13550. }
  13551. case 6:
  13552. {
  13553. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=106750"); //rock heaven
  13554. }
  13555. case 7:
  13556. {
  13557. format(defaultStation, 128, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1562093"); //calm radio solo piano
  13558. }
  13559. case 8:
  13560. {
  13561. format(defaultStation, 128, "http://ch1relay1.etn.fm:8130/listen.pls?sid=1"); //etn1
  13562. }
  13563. case 9:
  13564. {
  13565. format(defaultStation, 128, "http://ch1relay1.etn.fm:8000/listen.pls?sid=6"); //etn2
  13566. }
  13567. }
  13568. format(VehicleInfo[vehid][radioURL], 256, defaultStation);
  13569. }
  13570. }
  13571. }
  13572. VehicleInfo[vehid][radioStation] = 1;
  13573. playVehicleStreamForAll(vehid);
  13574. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have turned the vehicle radio on.");
  13575. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  13576. }
  13577. return 1;
  13578. }
  13579. if(listitem == 1) //change station
  13580. {
  13581. ShowPlayerDialog(playerid, DIALOG_STATIONS, DIALOG_STYLE_LIST, "Radio stations", "PRP Official Radio\nRadio Stations\nCustom", "Select", "Cancel");
  13582. EDITING_TYPE[playerid] = EDIT_RADIO_VEHICLE;
  13583. return 1;
  13584. }
  13585. return 1;
  13586. }
  13587. //DONORSTUFF
  13588. if(dialogid == DIALOG_MC_WEAPONS) // MC Weapons
  13589. {
  13590. if(response)
  13591. {
  13592. switch(listitem)
  13593. {
  13594. case 0: //colt45
  13595. {
  13596. if(PlayerInfo[playerid][pCash] >= 1500)
  13597. {
  13598. GivePlayerGun(playerid, 23);
  13599. GiveMoney(playerid, -1500);
  13600. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  13601. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Silenced Pistol off the weapons rack.");
  13602. }
  13603. else
  13604. {
  13605. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  13606. }
  13607. }
  13608. case 1: //deagle
  13609. {
  13610. if(PlayerInfo[playerid][pCash] >= 4500)
  13611. {
  13612. GivePlayerGun(playerid, 24);
  13613. GiveMoney(playerid, -4500);
  13614. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  13615. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Deagle off the weapons rack.");
  13616. }
  13617. else
  13618. {
  13619. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  13620. }
  13621. }
  13622. case 2: //shotgun
  13623. {
  13624. if(PlayerInfo[playerid][pCash] >= 2500)
  13625. {
  13626. GivePlayerGun(playerid, 25);
  13627. GiveMoney(playerid, -2500);
  13628. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  13629. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Shotgun off the weapons rack.");
  13630. }
  13631. else
  13632. {
  13633. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  13634. }
  13635. }
  13636. case 3: //rifle
  13637. {
  13638. if(PlayerInfo[playerid][pCash] >= 4000)
  13639. {
  13640. GivePlayerGun(playerid, 33);
  13641. GiveMoney(playerid, -4000);
  13642. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  13643. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Rifle off the weapons rack.");
  13644. }
  13645. else
  13646. {
  13647. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  13648. }
  13649. }
  13650. case 4: //kevlar
  13651. {
  13652. if(PlayerInfo[playerid][pCash] >= 2600)
  13653. {
  13654. GiveMoney(playerid, -2600);
  13655. SetPlayerArmour(playerid, 100);
  13656. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  13657. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken some Kevlar off the weapons rack.");
  13658. }
  13659. else
  13660. {
  13661. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  13662. }
  13663. }
  13664. }
  13665. }
  13666. return 1;
  13667. }
  13668. //Hitman stuff by Calvin Catt
  13669. if(dialogid == 6493) // Fake Badges
  13670. {
  13671. if(response)
  13672. {
  13673. if(listitem == 0)
  13674. {
  13675. if(HitmanBadgeSAPD >= 1)
  13676. {
  13677. PlayerInfo[playerid][pHAFakeBadge] = 1;
  13678. HitmanBadgeSAPD -= 1;
  13679. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake San Andreas Police Department badge for free.");
  13680. }
  13681. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake San Andreas Police Department badges in stock.");
  13682. }
  13683. if(listitem == 1)
  13684. {
  13685. if(HitmanBadgeFBI >= 1)
  13686. {
  13687. PlayerInfo[playerid][pHAFakeBadge] = 2;
  13688. HitmanBadgeFBI -= 1;
  13689. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake Federeal Bureau of Investigation badge for free.");
  13690. }
  13691. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake Federeal Bureau of Investigation badges in stock.");
  13692. }
  13693. if(listitem == 2)
  13694. {
  13695. if(HitmanBadgeRCSD >= 1)
  13696. {
  13697. PlayerInfo[playerid][pHAFakeBadge] = 3;
  13698. HitmanBadgeRCSD -= 1;
  13699. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake San Andreas Sheriff Department badge for free.");
  13700. }
  13701. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake San Andreas Sheriff Department badges in stock.");
  13702. }
  13703. if(listitem == 3)
  13704. {
  13705. if(HitmanBadgeLSFMD >= 1)
  13706. {
  13707. PlayerInfo[playerid][pHAFakeBadge] = 4;
  13708. HitmanBadgeLSFMD -= 1;
  13709. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake San Andreas Fire Medical Department badge for free.");
  13710. }
  13711. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake San Andreas Fire Medical Department badges in stock.");
  13712. }
  13713. if(listitem == 4)
  13714. {
  13715. if(HitmanBadgeNG >= 1)
  13716. {
  13717. PlayerInfo[playerid][pHAFakeBadge] = 14;
  13718. HitmanBadgeNG -= 1;
  13719. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake SANG badge for free.");
  13720. }
  13721. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake SANG badges in stock.");
  13722. }
  13723. if(listitem == 5)
  13724. {
  13725. if(HitmanBadgeGOV >= 1)
  13726. {
  13727. PlayerInfo[playerid][pHAFakeBadge] = 6;
  13728. HitmanBadgeGOV -= 1;
  13729. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake Government badge for free.");
  13730. }
  13731. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake Government badges in stock.");
  13732. }
  13733. if(listitem == 6)
  13734. {
  13735. if(HitmanBadgeSCOTUS >= 1)
  13736. {
  13737. PlayerInfo[playerid][pHAFakeBadge] = 7;
  13738. HitmanBadgeSCOTUS -= 1;
  13739. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake Judicial Department badge for free.");
  13740. }
  13741. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake Judicial Department badges in stock.");
  13742. }
  13743. if(listitem == 7)
  13744. {
  13745. if(HitmanBadgeDEA >= 1)
  13746. {
  13747. PlayerInfo[playerid][pHAFakeBadge] = 12;
  13748. HitmanBadgeDEA -= 1;
  13749. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake DEA badge for free.");
  13750. }
  13751. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake DEA badges in stock.");
  13752. }
  13753. if(listitem == 8)
  13754. {
  13755. if(HitmanBadgeATF >= 1)
  13756. {
  13757. PlayerInfo[playerid][pHAFakeBadge] = 13;
  13758. HitmanBadgeATF -= 1;
  13759. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have obtained a fake ATF badge for free.");
  13760. }
  13761. else return SendClientMessage(playerid, COLOR_GRAD1, "There are no fake ATF badges in stock.");
  13762. }
  13763. }
  13764. return 1;
  13765. }
  13766. if(dialogid == 3942)
  13767. {
  13768. if(!response)
  13769. return 1;
  13770. if(strlen(inputtext) < 3 || strlen(inputtext) > (126 - MAX_PLAYER_NAME)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} you cannot exceed 126 characters.");
  13771. strmid(PlayerInfo[playerid][pAppearance], inputtext, 0, strlen(inputtext), 255);
  13772. //format(PlayerInfo[playerid][pAppearance], 128, "%s", inputtext);
  13773. format(str, sizeof(str), "-> %s %s", PlayerICName(playerid), PlayerInfo[playerid][pAppearance]);
  13774. SendClientMessage(playerid, COLOR_PURPLE, str);
  13775. return 1;
  13776. }
  13777. //HOUSE FURNITURE
  13778. if(dialogid == DIALOG_FURNITURE_MAIN)
  13779. {
  13780. if(!response) return 1;
  13781. if(listitem == 0) //BUY FURNITURE
  13782. {
  13783. new houseid = PlayerInfo[playerid][pHouseID];
  13784. 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.");
  13785. 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");
  13786. return 1;
  13787. }
  13788. if(listitem == 1) //EDIT FURNITURE
  13789. {
  13790. ShowPlayerDialog(playerid, DIALOG_FURNITURE_EDIT, DIALOG_STYLE_LIST, "Edit furniture", "Edit\nShow/Hide\nDelete", "Select", "Back");
  13791. return 1;
  13792. }
  13793. }
  13794. if(dialogid == DIALOG_FURNITURE_BUY)
  13795. {
  13796. if(!response) return ShowPlayerDialog(playerid, DIALOG_FURNITURE_MAIN, DIALOG_STYLE_LIST, "Furniture", "Buy furniture\nEdit furniture", "Select", "Cancel");
  13797. if(listitem == 0) //Decor
  13798. {
  13799. _DestroySelectionMenu(playerid);
  13800. SetPVarInt(playerid, "ospawner_active", 1);
  13801. SetPVarInt(playerid, "ospawner_page", 0);
  13802. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_DECO);
  13803. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13804. SelectTextDraw(playerid, 0xACCBF1FF);
  13805. return 1;
  13806. }
  13807. if(listitem == 1) //Office
  13808. {
  13809. _DestroySelectionMenu(playerid);
  13810. SetPVarInt(playerid, "ospawner_active", 1);
  13811. SetPVarInt(playerid, "ospawner_page", 0);
  13812. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_OFFICE);
  13813. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13814. SelectTextDraw(playerid, 0xACCBF1FF);
  13815. return 1;
  13816. }
  13817. if(listitem == 2) //Hobby
  13818. {
  13819. _DestroySelectionMenu(playerid);
  13820. SetPVarInt(playerid, "ospawner_active", 1);
  13821. SetPVarInt(playerid, "ospawner_page", 0);
  13822. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_HOBBY);
  13823. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13824. SelectTextDraw(playerid, 0xACCBF1FF);
  13825. return 1;
  13826. }
  13827. if(listitem == 3) //Lounge
  13828. {
  13829. _DestroySelectionMenu(playerid);
  13830. SetPVarInt(playerid, "ospawner_active", 1);
  13831. SetPVarInt(playerid, "ospawner_page", 0);
  13832. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_LOUNGE);
  13833. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13834. SelectTextDraw(playerid, 0xACCBF1FF);
  13835. return 1;
  13836. }
  13837. if(listitem == 4) //Bedroom
  13838. {
  13839. _DestroySelectionMenu(playerid);
  13840. SetPVarInt(playerid, "ospawner_active", 1);
  13841. SetPVarInt(playerid, "ospawner_page", 0);
  13842. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_BEDROOM);
  13843. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13844. SelectTextDraw(playerid, 0xACCBF1FF);
  13845. return 1;
  13846. }
  13847. if(listitem == 5) //Kitchen
  13848. {
  13849. _DestroySelectionMenu(playerid);
  13850. SetPVarInt(playerid, "ospawner_active", 1);
  13851. SetPVarInt(playerid, "ospawner_page", 0);
  13852. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_KITCHEN);
  13853. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13854. SelectTextDraw(playerid, 0xACCBF1FF);
  13855. return 1;
  13856. }
  13857. if(listitem == 6) //Dining
  13858. {
  13859. _DestroySelectionMenu(playerid);
  13860. SetPVarInt(playerid, "ospawner_active", 1);
  13861. SetPVarInt(playerid, "ospawner_page", 0);
  13862. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_DINING);
  13863. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13864. SelectTextDraw(playerid, 0xACCBF1FF);
  13865. return 1;
  13866. }
  13867. if(listitem == 7) //Bathroom
  13868. {
  13869. _DestroySelectionMenu(playerid);
  13870. SetPVarInt(playerid, "ospawner_active", 1);
  13871. SetPVarInt(playerid, "ospawner_page", 0);
  13872. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_BATHROOM);
  13873. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13874. SelectTextDraw(playerid, 0xACCBF1FF);
  13875. return 1;
  13876. }
  13877. if(listitem == 8) //Laundry
  13878. {
  13879. _DestroySelectionMenu(playerid);
  13880. SetPVarInt(playerid, "ospawner_active", 1);
  13881. SetPVarInt(playerid, "ospawner_page", 0);
  13882. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_LAUNDRY);
  13883. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13884. SelectTextDraw(playerid, 0xACCBF1FF);
  13885. return 1;
  13886. }
  13887. if(listitem == 9) //Electronics
  13888. {
  13889. _DestroySelectionMenu(playerid);
  13890. SetPVarInt(playerid, "ospawner_active", 1);
  13891. SetPVarInt(playerid, "ospawner_page", 0);
  13892. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_ELECTRONICS);
  13893. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13894. SelectTextDraw(playerid, 0xACCBF1FF);
  13895. return 1;
  13896. }
  13897. if(listitem == 10) //Lights
  13898. {
  13899. _DestroySelectionMenu(playerid);
  13900. SetPVarInt(playerid, "ospawner_active", 1);
  13901. SetPVarInt(playerid, "ospawner_page", 0);
  13902. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_LIGHTS);
  13903. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13904. SelectTextDraw(playerid, 0xACCBF1FF);
  13905. return 1;
  13906. }
  13907. if(listitem == 11) //Outdoor
  13908. {
  13909. _DestroySelectionMenu(playerid);
  13910. SetPVarInt(playerid, "ospawner_active", 1);
  13911. SetPVarInt(playerid, "ospawner_page", 0);
  13912. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_OUTDOOR);
  13913. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13914. SelectTextDraw(playerid, 0xACCBF1FF);
  13915. return 1;
  13916. }
  13917. if(listitem == 12) //Structure
  13918. {
  13919. _DestroySelectionMenu(playerid);
  13920. SetPVarInt(playerid, "ospawner_active", 1);
  13921. SetPVarInt(playerid, "ospawner_page", 0);
  13922. SetPVarInt(playerid, "ospawner_category", BUY_FURNITURE_CATEGORY_STRUCTURE);
  13923. _CreateSelectionMenu(playerid, GetPVarInt(playerid, "ospawner_category"));
  13924. SelectTextDraw(playerid, 0xACCBF1FF);
  13925. return 1;
  13926. }
  13927. }
  13928. if(dialogid == DIALOG_FURNITURE_BUY_CONFIRM)
  13929. {
  13930. 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");
  13931. HandleObjectItemSelection(playerid, GetPVarInt(playerid, "buying_furniture_id"));
  13932. return 1;
  13933. }
  13934. if(dialogid == DIALOG_FURNITURE_EDIT)
  13935. {
  13936. if(!response) return ShowPlayerDialog(playerid, DIALOG_FURNITURE_MAIN, DIALOG_STYLE_LIST, "Furniture", "Buy furniture\nEdit furniture", "Select", "Cancel");
  13937. if(listitem == 0) //edit
  13938. {
  13939. new houseid = PlayerInfo[playerid][pHouseID];
  13940. if(!houseid) return SendClientMessage( playerid, COLOR_GRAD1, "You do not own a house." ); //in case they sell while in menu
  13941. new fstr[2500];
  13942. //show my furniture
  13943. for(new i = 0; i < MAX_FURNITURE; i++) {
  13944. if(FurnitureInfo[houseid][i][f_ModelID]) { //contains a model id
  13945. if(FurnitureInfo[houseid][i][f_Spawned]) {
  13946. format(fstr, sizeof(fstr), "%s\n%s (ID %d)", fstr, FurnitureInfo[houseid][i][f_ModelName], i);
  13947. } else { //hidden
  13948. format(fstr, sizeof(fstr), "%s\n{AFAFAF}%s (ID %d){FFFFFF}", fstr, FurnitureInfo[houseid][i][f_ModelName], i);
  13949. }
  13950. }
  13951. else {
  13952. format(fstr, sizeof(fstr), "%s\n{AFAFAF}Empty{FFFFFF}", fstr);
  13953. }
  13954. }
  13955. ShowPlayerDialog(playerid, DIALOG_FURNITURE_EDIT_SELECT, DIALOG_STYLE_LIST, "Edit furniture", fstr, "Edit", "Back");
  13956. }
  13957. if(listitem == 1) //hide
  13958. {
  13959. new houseid = PlayerInfo[playerid][pHouseID];
  13960. if(!houseid) return SendClientMessage( playerid, COLOR_GRAD1, "You do not own a house." ); //in case they sell while in menu
  13961. new fstr[2500];
  13962. //show my furniture
  13963. for(new i = 0; i < MAX_FURNITURE; i++) {
  13964. if(FurnitureInfo[houseid][i][f_ModelID]) { //contains a model id
  13965. if(FurnitureInfo[houseid][i][f_Spawned]) {
  13966. format(fstr, sizeof(fstr), "%s\n%s (ID %d)", fstr, FurnitureInfo[houseid][i][f_ModelName], i);
  13967. } else { //hidden
  13968. format(fstr, sizeof(fstr), "%s\n{AFAFAF}%s (ID %d){FFFFFF}", fstr, FurnitureInfo[houseid][i][f_ModelName], i);
  13969. }
  13970. }
  13971. else {
  13972. format(fstr, sizeof(fstr), "%s\n{AFAFAF}Empty{FFFFFF}", fstr);
  13973. }
  13974. }
  13975. ShowPlayerDialog(playerid, DIALOG_FURNITURE_SHOWHIDE_SELECT, DIALOG_STYLE_LIST, "Show/Hide furniture", fstr, "Select", "Back");
  13976. }
  13977. if(listitem == 2) //delete
  13978. {
  13979. new houseid = PlayerInfo[playerid][pHouseID];
  13980. if(!houseid) return SendClientMessage( playerid, COLOR_GRAD1, "You do not own a house." ); //in case they sell while in menu
  13981. new fstr[2500];
  13982. //show my furniture
  13983. for(new i = 0; i < MAX_FURNITURE; i++) {
  13984. if(FurnitureInfo[houseid][i][f_ModelID]) { //contains a model id
  13985. if(FurnitureInfo[houseid][i][f_Spawned]) {
  13986. format(fstr, sizeof(fstr), "%s\n%s (ID %d)", fstr, FurnitureInfo[houseid][i][f_ModelName], i);
  13987. } else { //hidden
  13988. format(fstr, sizeof(fstr), "%s\n{AFAFAF}%s (ID %d){FFFFFF}", fstr, FurnitureInfo[houseid][i][f_ModelName], i);
  13989. }
  13990. }
  13991. else {
  13992. format(fstr, sizeof(fstr), "%s\n{AFAFAF}Empty{FFFFFF}", fstr);
  13993. }
  13994. }
  13995. ShowPlayerDialog(playerid, DIALOG_FURNITURE_DELETE_SELECT, DIALOG_STYLE_LIST, "Delete furniture", fstr, "Edit", "Back");
  13996. }
  13997. return 1;
  13998. }
  13999. //furniture edit menu
  14000. if(dialogid == DIALOG_FURNITURE_EDIT_SELECT)
  14001. {
  14002. if(!response) return ShowPlayerDialog(playerid, DIALOG_FURNITURE_EDIT, DIALOG_STYLE_LIST, "Edit furniture", "Edit\nShow/Hide\nDelete", "Select", "Back");
  14003. new houseid = PlayerInfo[playerid][pHouseID];
  14004. if(houseid == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't own a house.");
  14005. if(!FurnitureInfo[houseid][listitem][f_ModelID]) return SendClientMessage(playerid, COLOR_GREY, "You do not have any furniture in this slot.");
  14006. if(houseid != FurnitureInfo[houseid][listitem][f_HouseID]) return SendClientMessage(playerid, COLOR_GREY, "That furniture does not belong to your house.");
  14007. if(!FurnitureInfo[houseid][listitem][f_Spawned]) return SendClientMessage(playerid, COLOR_GREY, "You cannot edit hidden furniture.");
  14008. new furnitureObject = FurnitureInfo[houseid][listitem][f_ObjectID];
  14009. if(!IsValidDynamicObject(furnitureObject)) return SendClientMessage(playerid, COLOR_GREY, "That furniture object is invalid (possibly de-spawned?).");
  14010. //set vars and enable edit mode
  14011. EditingFurnitureObjectID[playerid] = furnitureObject;
  14012. EditingFurnitureHouseID[playerid] = houseid;
  14013. EditingFurnitureID[playerid] = listitem; //the index
  14014. EditDynamicObject(playerid, furnitureObject);
  14015. return 1;
  14016. }
  14017. if(dialogid == DIALOG_FURNITURE_SHOWHIDE_SELECT)
  14018. {
  14019. if(!response) return ShowPlayerDialog(playerid, DIALOG_FURNITURE_EDIT, DIALOG_STYLE_LIST, "Edit furniture", "Edit\nShow/Hide\nDelete", "Select", "Back");
  14020. new houseid = PlayerInfo[playerid][pHouseID];
  14021. if(houseid == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't own a house.");
  14022. if(!FurnitureInfo[houseid][listitem][f_ModelID]) return SendClientMessage(playerid, COLOR_GREY, "You do not have any furniture in this slot.");
  14023. if(houseid != FurnitureInfo[houseid][listitem][f_HouseID]) return SendClientMessage(playerid, COLOR_GREY, "That furniture does not belong to your house.");
  14024. if(FurnitureInfo[houseid][listitem][f_Spawned]) { //hide
  14025. FurnitureInfo[houseid][listitem][f_Spawned] = 0;
  14026. if(FurnitureInfo[houseid][listitem][f_ObjectID]) { DestroyDynamicObjectEx(FurnitureInfo[houseid][listitem][f_ObjectID]); }
  14027. FurnitureInfo[houseid][listitem][f_ObjectID] = 0;
  14028. format(str, sizeof(str), "* You have hidden the %s.", FurnitureInfo[houseid][listitem][f_ModelName]);
  14029. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  14030. //sql update
  14031. new query[200];
  14032. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `furniture` SET `Spawned`=0 WHERE `ID`=%d", FurnitureInfo[houseid][listitem][f_ID]);
  14033. mysql_pquery(sqlGameConnection, query);
  14034. } else { //unhide
  14035. 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]);
  14036. FurnitureInfo[houseid][listitem][f_Spawned] = 1;
  14037. Streamer_Update(playerid);
  14038. format(str, sizeof(str), "* You have unhidden the %s.", FurnitureInfo[houseid][listitem][f_ModelName]);
  14039. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  14040. //sql update
  14041. new query[200];
  14042. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `furniture` SET `Spawned`=1 WHERE `ID`=%d", FurnitureInfo[houseid][listitem][f_ID]);
  14043. mysql_pquery(sqlGameConnection, query);
  14044. }
  14045. return 1;
  14046. }
  14047. if(dialogid == DIALOG_FURNITURE_DELETE_SELECT)
  14048. {
  14049. if(!response) return ShowPlayerDialog(playerid, DIALOG_FURNITURE_EDIT, DIALOG_STYLE_LIST, "Edit furniture", "Edit\nShow/Hide\nDelete", "Select", "Back");
  14050. new houseid = PlayerInfo[playerid][pHouseID];
  14051. if(houseid == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't own a house.");
  14052. if(!FurnitureInfo[houseid][listitem][f_ModelID]) return SendClientMessage(playerid, COLOR_GREY, "You do not have any furniture in this slot.");
  14053. if(houseid != FurnitureInfo[houseid][listitem][f_HouseID]) return SendClientMessage(playerid, COLOR_GREY, "That furniture does not belong to your house.");
  14054. format(str, sizeof(str), "* You have deleted the %s.", FurnitureInfo[houseid][listitem][f_ModelName]);
  14055. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  14056. DeleteHouseFurniture(houseid, listitem);
  14057. return 1;
  14058. }
  14059. if(dialogid == DIALOG_CHARGES_REMOVE)
  14060. {
  14061. if(response)
  14062. {
  14063. new query[128], query2[128], CrimeReason[128], psqlid = searchingsqlid[playerid], CrimeID, Cache:result;
  14064. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `newcrimes` WHERE `CrimePID` = %d ORDER BY `CrimeID` DESC LIMIT 20", psqlid);
  14065. result = mysql_query(sqlGameConnection, query);
  14066. CrimeID = cache_get_field_content_int(listitem, "CrimeID");
  14067. cache_get_field_content(listitem, "CrimeReason", CrimeReason);
  14068. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has deleted the charge '%s' from SQLID %d.", PlayerOOCName(playerid), CrimeReason, psqlid);
  14069. SendAdminMessage(-1, str);
  14070. print(str);
  14071. mysql_format(sqlGameConnection, query2, sizeof(query2), "DELETE FROM `newcrimes` WHERE `CrimeID`=%d", CrimeID);
  14072. mysql_query(sqlGameConnection, query2);
  14073. cache_delete(Cache:result, sqlGameConnection);
  14074. }
  14075. }
  14076. // Edit badge main screen
  14077. if(dialogid == DIALOG_S9_EDIT_BADGE )
  14078. {
  14079. if(response) {
  14080. switch(listitem)
  14081. {
  14082. // Change player name
  14083. case 0: {
  14084. if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
  14085. return ShowPlayerDialog(playerid, DIALOG_S9_EDIT_BADGE_NAME, DIALOG_STYLE_INPUT, "Player Badge Name", "Changes for only you.", "Confirm", "Cancel");
  14086. }
  14087. // Change faction name
  14088. case 1: {
  14089. if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
  14090. return ShowPlayerDialog(playerid, DIALOG_S9_EDIT_BADGE_FACTION, DIALOG_STYLE_INPUT, "Faction Name", "Changes for everyone in the faction.", "Confirm", "Cancel");
  14091. }
  14092. // Change faction weapons
  14093. case 2: {
  14094. if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
  14095. return ShowPlayerDialog(playerid, DIALOG_S9_EDIT_BADGE_WEAPONS, DIALOG_STYLE_INPUT, "Faction Weapons", "Changes for everyone in the faction.", "Confirm", "Cancel");
  14096. }
  14097. }
  14098. }
  14099. }
  14100. // Edit badge name
  14101. if(dialogid == DIALOG_S9_EDIT_BADGE_NAME)
  14102. {
  14103. if(response) {
  14104. if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
  14105. new str2[64];
  14106. if(sscanf(inputtext, "s[24]", PlayerInfo[playerid][pS9BadgeName])) return ShowS9BadgeMenu(playerid);
  14107. format(str2, sizeof(str2), "You have set your badge name to: %s", PlayerInfo[playerid][pS9BadgeName]);
  14108. SendClientMessage(playerid, COLOR_LIGHTBLUE, str2);
  14109. } else {
  14110. ShowS9BadgeMenu(playerid);
  14111. }
  14112. return 1;
  14113. }
  14114. // Edit badge faction
  14115. if(dialogid == DIALOG_S9_EDIT_BADGE_FACTION)
  14116. {
  14117. if(response) {
  14118. if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
  14119. new str2[64];
  14120. if(sscanf(inputtext, "s[64]", S9BadgeFaction)) return ShowS9BadgeMenu(playerid);
  14121. format(str2, sizeof(str2), "You have set S9's badge faction to: %s", S9BadgeFaction);
  14122. SendClientMessage(playerid, COLOR_LIGHTBLUE, str2);
  14123. } else {
  14124. ShowS9BadgeMenu(playerid);
  14125. }
  14126. return 1;
  14127. }
  14128. // Edit badge weapons
  14129. if(dialogid == DIALOG_S9_EDIT_BADGE_WEAPONS)
  14130. {
  14131. if(response) {
  14132. if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
  14133. new str2[64];
  14134. if(sscanf(inputtext, "s[64]", S9BadgeWeapons)) return ShowS9BadgeMenu(playerid);
  14135. format(str2, sizeof(str2), "You have set S9's badge weapons to: %s", S9BadgeWeapons);
  14136. SendClientMessage(playerid, COLOR_LIGHTBLUE, str2);
  14137. } else {
  14138. ShowS9BadgeMenu(playerid);
  14139. }
  14140. return 1;
  14141. }
  14142. if(dialogid == DIALOG_CLEARMOD)
  14143. {
  14144. new carid = GetPlayerVehicleID(playerid);
  14145. // Spoiler.
  14146. if(listitem == 0)
  14147. {
  14148. if(GetVehicleComponentInSlot(carid, 0) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14149. removeSlotComponent(carid, 0);
  14150. } // Hood.
  14151. if(listitem == 1)
  14152. {
  14153. if(GetVehicleComponentInSlot(carid, 1) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14154. removeSlotComponent(carid, 1);
  14155. } // Roof.
  14156. if(listitem == 2)
  14157. {
  14158. if(GetVehicleComponentInSlot(carid, 2) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14159. removeSlotComponent(carid, 2);
  14160. } // Side Skirt.
  14161. if(listitem == 3)
  14162. {
  14163. if(GetVehicleComponentInSlot(carid, 3) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14164. removeSlotComponent(carid, 3);
  14165. } // Nitro.
  14166. if(listitem == 4)
  14167. {
  14168. if(GetVehicleComponentInSlot(carid, 5) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14169. removeSlotComponent(carid, 5);
  14170. } // Exhaust.
  14171. if(listitem == 5)
  14172. {
  14173. if(GetVehicleComponentInSlot(carid, 6) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14174. removeSlotComponent(carid, 6);
  14175. } // Wheel.
  14176. if(listitem == 6)
  14177. {
  14178. if(GetVehicleComponentInSlot(carid, 7) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14179. removeSlotComponent(carid, 7);
  14180. } // Stereo.
  14181. if(listitem == 7)
  14182. {
  14183. if(GetVehicleComponentInSlot(carid, 8) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14184. removeSlotComponent(carid, 8);
  14185. } // Hydraulic.
  14186. if(listitem == 8)
  14187. {
  14188. if(GetVehicleComponentInSlot(carid, 9) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14189. removeSlotComponent(carid, 9);
  14190. } // F. Bumper.
  14191. if(listitem == 9)
  14192. {
  14193. if(GetVehicleComponentInSlot(carid, 10) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14194. removeSlotComponent(carid, 10);
  14195. } // R. Bumper.
  14196. if(listitem == 10)
  14197. {
  14198. if(GetVehicleComponentInSlot(carid, 11) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle mod in that category.");
  14199. removeSlotComponent(carid, 11);
  14200. }
  14201. }
  14202. //Security Code
  14203. if(dialogid == DIALOG_SECURITY_CODE)
  14204. {
  14205. new dialogstr[512], string[128];
  14206. if(strlen(inputtext) > 6 || !IsNumeric(inputtext))
  14207. {
  14208. SendClientMessage(playerid, COLOR_RED, "Error: "COL_WHITE"Please enter the security key in form of siz numbers, Example: 000000");
  14209. format(dialogstr, sizeof(dialogstr), "Hello %s\nPlease "COL_RED"RE-ENTER "COL_DIALOG"your personal security key to protect yourself from hackers.\nMake sure you remember this key as you will be asked for this everytime you login back to your account.\nRefrain from giving this key or your account password to anyone, we won't be responsible for your loss, unless you prove it.", PlayerOOCName(playerid));
  14210. ShowPlayerDialog(playerid, DIALOG_SECURITY_CODE, DIALOG_STYLE_INPUT, "Security Key", dialogstr, "Enter", "");
  14211. } else {
  14212. PlayerInfo[playerid][pSecKey] = strval(inputtext);
  14213. gAdminAuthorized[playerid] = 1;
  14214. format(string, sizeof(string), "* Your security key is: "COL_WHITE"%d", strval(inputtext));
  14215. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  14216. }
  14217. }
  14218. /*if(dialogid == WELCOME_DIALOG){
  14219. ShowSkinShop(playerid, true, false, false, false, true);
  14220. }*/
  14221. if(dialogid == DIALOG_BUYGUN)
  14222. {
  14223. if(!response) return 0;
  14224. new money = GetPlayerMoney(playerid);
  14225. switch(listitem){
  14226. case 0:
  14227. {
  14228. if(money >= 5000) {
  14229. GiveMoney(playerid, -5000);
  14230. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  14231. GivePlayerGun(playerid, WEAPON_MP5);
  14232. SendClientMessage(playerid, COLOR_WHITE, "(Notification) You just bought a {FF0000}MP5 {FFFFFF}for $5,000 from Emmet.");
  14233. } else {
  14234. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  14235. }
  14236. }
  14237. case 1:
  14238. {
  14239. if(money >= 4000) {
  14240. GiveMoney(playerid, -4000);
  14241. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  14242. GivePlayerGun(playerid, WEAPON_SHOTGUN);
  14243. SendClientMessage(playerid, COLOR_WHITE, "(Notification) You just bought a {FF0000}SHOTGNUN {FFFFFF}for $4,000 from Emmet.");
  14244. } else {
  14245. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  14246. }
  14247. }
  14248. case 2:
  14249. {
  14250. if(PlayerInfo[playerid][pLevel] < 4) return SendClientMessage(playerid, COLOR_GREY, "You have to be atleast level 4 to buy this gun from emmet.");
  14251. if(money >= 100000) {
  14252. GiveMoney(playerid, -100000);
  14253. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  14254. GivePlayerGun(playerid, WEAPON_AK47);
  14255. SendClientMessage(playerid, COLOR_WHITE, "(Notification) You just bought a {FF0000}AK47 {FFFFFF}for $100,000 from Emmet.");
  14256. } else {
  14257. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  14258. }
  14259. }
  14260. case 3:
  14261. {
  14262. if(PlayerInfo[playerid][pLevel] < 2) return SendClientMessage(playerid, COLOR_GREY, "You have to be atleast level 2 to buy this gun from emmet.");
  14263. if(money >= 20000) {
  14264. GiveMoney(playerid, -20000);
  14265. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  14266. GivePlayerGun(playerid, WEAPON_RIFLE);
  14267. SendClientMessage(playerid, COLOR_WHITE, "(Notification) You just bought a {FF0000}RIFLE {FFFFFF}for $20,000 from Emmet.");
  14268. } else {
  14269. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  14270. }
  14271. }
  14272. }
  14273. return 1;
  14274. }
  14275. return 0;
  14276. }