| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406 |
- /*
- /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$$
- | $$$ | $$ /$$__ $$ | $$__ $$| $$__ $$
- | $$$$| $$| $$ \__/ | $$ \ $$| $$ \ $$
- | $$ $$ $$| $$ /$$$$ /$$$$$$| $$$$$$$/| $$$$$$$/
- | $$ $$$$| $$|_ $$|______/| $$__ $$| $$____/
- | $$\ $$$| $$ \ $$ | $$ \ $$| $$
- | $$ \ $$| $$$$$$/ | $$ | $$| $$
- |__/ \__/ \______/ |__/ |__/|__/
- //-------------------------[OnDialogResponse.PWN]--------------------------------
- * Copyright (c) 2016, Next Generation Gaming, LLC
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are not permitted in any case.
- *
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- // This is the first hooked OnDialogResponse. It's used to check dialog spoofing.
- hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
- if(dialogid != iLastDialogID[playerid]) {
- if(dialogid != DIALOG_FS_ELEVATOR1 && dialogid != DIALOG_FS_ELEVATOR2) { // For dialogs called from filterscripts.
- if(PlayerInfo[playerid][pAdmin] == 99999 || dialogid == 32700) return 1;
- SendClientMessageEx(playerid, COLOR_LIGHTRED, "[SYSTEM] Please delete your dialog CLEO.");
- SetTimerEx("KickEx", 1000, 0, "i", playerid);
- }
- }
- iLastDialogID[playerid] = -1;
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
- if(arrAntiCheat[playerid][ac_iFlags][AC_DIALOGSPOOFING] > 0) return 1;
- if(dialogid == DIALOG_DISABLED) return ShowPlayerDialogEx(playerid, DIALOG_DISABLED, DIALOG_STYLE_MSGBOX, "Account Disabled - Visit http://www.laco-rp.com", "Your account has been disabled as it has been inactive for more than six months.\nPlease visit the forums and post an Administrative Request to begin the process to reactivate your account.", "Okay", "");
- new sendername[MAX_PLAYER_NAME];
- new string[256];
- szMiscArray[0] = 0;
- // Crash Bug Fix
- if(strfind(inputtext, "%", true) != -1)
- {
- if(dialogid == MAINMENU) ShowMainMenuDialog(playerid, 1);
- if(dialogid == MAINMENU2) ShowMainMenuDialog(playerid, 2);
- if(dialogid == DIALOG_CHANGEPASS2) ShowLoginDialogs(playerid, 0);
- SendClientMessage(playerid, COLOR_GREY, "Invalid Character, please try again.");
- return 1;
- }
- if(strfind(inputtext, "UPDATE", true) != -1 || strfind(inputtext, "SELECT", true) != -1 || strfind(inputtext, "DROP", true) != -1 || strfind(inputtext, "INSERT", true) != -1 || strfind(inputtext, "SLEEP", true) != -1)
- {
- new logstirng[400];
- format(logstirng, sizeof(logstirng), "%s | Dialog ID: %d | SQL ID: %d", inputtext, dialogid, PlayerInfo[playerid][pId]);
- Log("logs/fquery.log", logstirng);
- }
- if(RegistrationStep[playerid] != 0)
- {
- if(dialogid == REGISTERSEX)
- {
- if(response)
- {
- if(listitem == 0)
- {
- PlayerInfo[playerid][pSex] = 1;
- SendClientMessageEx(playerid, COLOR_YELLOW2, "Alright, so you're a male.");
- ShowPlayerDialogEx(playerid, REGISTERMONTH, DIALOG_STYLE_LIST, "{FF0000}Which month was your character born?", "January\nFebruary\nMarch\nApril\nMay\nJune\nJuly\nAugust\nSeptember\nOctober\nNovember\nDecember", "Submit", "");
- RegistrationStep[playerid] = 2;
- }
- else
- {
- PlayerInfo[playerid][pSex] = 2;
- SendClientMessageEx(playerid, COLOR_YELLOW2, "Alright, so you're a female.");
- ShowPlayerDialogEx(playerid, REGISTERMONTH, DIALOG_STYLE_LIST, "{FF0000}Which month was your character born?", "January\nFebruary\nMarch\nApril\nMay\nJune\nJuly\nAugust\nSeptember\nOctober\nNovember\nDecember", "Submit", "");
- RegistrationStep[playerid] = 2;
- }
- }
- else ShowPlayerDialogEx(playerid, REGISTERSEX, DIALOG_STYLE_LIST, "{FF0000}Is your character male or female?", "Male\nFemale", "Submit", "");
- }
- }
- if(RegistrationStep[playerid] != 0 || strcmp(PlayerInfo[playerid][pBirthDate], "0000-00-00", true) == 0)
- {
- if(dialogid == REGISTERMONTH)
- {
- if(response)
- {
- new month = listitem+1;
- SetPVarInt(playerid, "RegisterMonth", month);
- new lastdate, stringdiag[410];
- if(listitem == 0 || listitem == 2 || listitem == 4 || listitem == 6 || listitem == 7 || listitem == 9 || listitem == 11) lastdate = 32;
- else if(listitem == 3 || listitem == 5 || listitem == 8 || listitem == 10) lastdate = 31;
- else lastdate = 29;
- for(new x = 1; x < lastdate; x++)
- {
- format(stringdiag, sizeof(stringdiag), "%s%d\n", stringdiag, x);
- }
- ShowPlayerDialogEx(playerid, REGISTERDAY, DIALOG_STYLE_LIST, "{FF0000}Which day was your character born?", stringdiag, "Submit", "");
- }
- else ShowPlayerDialogEx(playerid, REGISTERMONTH, DIALOG_STYLE_LIST, "{FF0000}Which month was your character born?", "January\nFebruary\nMarch\nApril\nMay\nJune\nJuly\nAugust\nSeptember\nOctober\nNovember\nDecember", "Submit", "");
- }
- else if(dialogid == REGISTERDAY)
- {
- if(response)
- {
- new setday = listitem+1;
- SetPVarInt(playerid, "RegisterDay", setday);
- new month, day, year, stringdiag[600];
- getdate(year,month,day);
- new startyear = year-100;
- for(new x = startyear; x < year; x++)
- {
- format(stringdiag, sizeof(stringdiag), "%s%d\n", stringdiag, x);
- }
- ShowPlayerDialogEx(playerid, REGISTERYEAR, DIALOG_STYLE_LIST, "{FF0000}Which year was your character born?", stringdiag, "Submit", "");
- }
- else ShowPlayerDialogEx(playerid, REGISTERMONTH, DIALOG_STYLE_LIST, "{FF0000}Which month was your character born?", "January\nFebruary\nMarch\nApril\nMay\nJune\nJuly\nAugust\nSeptember\nOctober\nNovember\nDecember", "Submit", "");
- }
- else if(dialogid == REGISTERYEAR)
- {
- new month, day, year, stringdiag[600];
- getdate(year,month,day);
- new startyear = year-100;
- if(response)
- {
- new setyear = listitem+startyear;
- format(PlayerInfo[playerid][pBirthDate], 11, "%d-%02d-%02d", setyear, GetPVarInt(playerid, "RegisterMonth"), GetPVarInt(playerid, "RegisterDay"));
- DeletePVar(playerid, "RegisterMonth");
- DeletePVar(playerid, "RegisterDay");
- if(RegistrationStep[playerid] != 0)
- {
- ShowPlayerDialogEx(playerid, REGISTERREF, DIALOG_STYLE_INPUT, "{FF0000}Next Generation Roleplay Referral System", "Have you been referred to our server by one of our players?\nIf so, please enter the player name below.\n\nIf you haven't been referred by anyone, you may press the skip button.\n\n{FF0000}Note: You must enter the player name with a underscore (Example: FirstName_LastName)", "Enter", "Skip");
- }
- else return SendClientMessageEx(playerid, COLOR_LIGHTRED, "Your birthdate has been successfully set.");
- }
- else
- {
- for(new x = startyear; x < year; x++)
- {
- format(stringdiag, sizeof(stringdiag), "%s%d\n", stringdiag, x);
- }
- ShowPlayerDialogEx(playerid, REGISTERYEAR, DIALOG_STYLE_LIST, "{FF0000}Which year was your character born?", stringdiag, "Submit", "");
- }
- }
- else if(dialogid == REGISTERREF)
- {
- if(response)
- {
- if(IsNumeric(inputtext))
- {
- ShowPlayerDialogEx(playerid, REGISTERREF, DIALOG_STYLE_INPUT, "{FF0000}Error - Invalid Roleplay Name", "That is not a roleplay name\nPlease enter a proper roleplay name.\n\nExample: FirstName_LastName", "Enter", "Skip");
- return 1;
- }
- if(strfind(inputtext, "_", true) == -1)
- {
- ShowPlayerDialogEx(playerid, REGISTERREF, DIALOG_STYLE_INPUT, "{FF0000}Error - Invalid Roleplay Name", "That is not a roleplay name\nPlease enter a proper roleplay name.\n\nExample: FirstName_LastName", "Enter", "Skip");
- return 1;
- }
- if(strlen(inputtext) > 20)
- {
- ShowPlayerDialogEx(playerid, REGISTERREF, DIALOG_STYLE_INPUT, "{FF0000}Error - Invalid Roleplay Name", "That name is too long\nPlease shorten the name.\n\nExample: FirstName_LastName (20 Characters Max)", "Enter", "Skip");
- return 1;
- }
- if(strcmp(inputtext, GetPlayerNameExt(playerid), true) == 0)
- {
- ShowPlayerDialogEx(playerid, REGISTERREF, DIALOG_STYLE_INPUT, "{FF0000}Error", "You can't add yourself as a referrer.\nPlease enter the referrer name or press 'Skip'.\n\nExample: FirstName_LastName (20 Characters Max)", "Enter", "Skip");
- return 1;
- }
- for(new sz = 0; sz < strlen(inputtext); sz++)
- {
- if(inputtext[sz] == ' ')
- {
- ShowPlayerDialogEx(playerid, REGISTERREF, DIALOG_STYLE_INPUT, "{FF0000}Error - Invalid Roleplay Name", "That is not a roleplay name\nPlease enter a proper roleplay name.\n\nExample: FirstName_LastName", "Enter", "Skip");
- return 1;
- }
- }
- new
- szQuery[128], szEscape[MAX_PLAYER_NAME];
- mysql_escape_string(inputtext, szEscape);
- format(PlayerInfo[playerid][pReferredBy], MAX_PLAYER_NAME, "%s", szEscape);
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "SELECT `Username` FROM `accounts` WHERE `Username` = '%s'", szEscape);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "iii", MAIN_REFERRAL_THREAD, playerid, g_arrQueryHandle{playerid});
- }
- else {
- PlayerInfo[playerid][pTut]++;
- AdvanceTutorial(playerid);
- format(string, sizeof(string), "Nobody");
- strmid(PlayerInfo[playerid][pReferredBy], string, 0, strlen(string), MAX_PLAYER_NAME);
- SendClientMessageEx(playerid, COLOR_LIGHTRED, "Thanks for filling in all the information, now you can proceed to the tutorial!");
- //Tutorial_Start(playerid);
- RegistrationStep[playerid] = 3;
- SetPlayerVirtualWorld(playerid, 0);
- ClearChatbox(playerid);
- TutStep[playerid] = 1;
- //ShowTutGUIBox(playerid);
- if(fexist("NoTutorial.h"))
- {
- //ShowTutGUIFrame(playerid, 23);
- //TutStep[playerid] = 23;
- }
- /*else
- {
- ShowTutGUIFrame(playerid, 1);
- TutStep[playerid] = 1;
- }*/
- Streamer_UpdateEx(playerid, 1607.0160,-1510.8218,207.4438);
- SetPlayerPos(playerid, 1607.0160,-1510.8218,-10.0);
- SetPlayerCameraPos(playerid, 1850.1813,-1765.7552,81.9271);
- SetPlayerCameraLookAt(playerid, 1607.0160,-1510.8218,207.4438);
- }
- }
- }
- switch(dialogid)
- {
- case DIALOG_911PICKLOCK: if(response)
- {
- new Float: carPos[3];
- if(PlayerVehicleInfo[playerid][listitem][pvId] > INVALID_PLAYER_VEHICLE_ID) {
- if(PlayerVehicleInfo[playerid][listitem][pvAlarmTriggered]) {
- GetVehiclePos(PlayerVehicleInfo[playerid][listitem][pvId], carPos[0], carPos[1], carPos[2]);
- new zone[MAX_ZONE_NAME], mainzone[MAX_ZONE_NAME];
- Get3DZone(carPos[0], carPos[1], carPos[2], zone, sizeof(zone));
- Get2DMainZone(carPos[0], carPos[1], mainzone, sizeof(mainzone));
- format(string, sizeof(string), "Your vehicle is located in %s(%s).", zone, mainzone);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- format(string, sizeof(string), "Suspected Vehicle Burglary, %s(%d)", GetVehicleName(PlayerVehicleInfo[playerid][listitem][pvId]), PlayerVehicleInfo[playerid][listitem][pvId]);
- SendCallToQueue(playerid, string, zone, mainzone, 4, PlayerVehicleInfo[playerid][listitem][pvId]);
- SetPVarInt(playerid, "Has911Call", 1);
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Dispatch: We have alerted all units in the area.");
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Thank you for reporting this incident");
- }
- else {
- SetPVarInt(playerid, "ConfirmReport", listitem);
- ShowPlayerDialogEx(playerid, DIALOG_911PICKLOCK2, DIALOG_STYLE_MSGBOX, "{FFFB00}Warning - Confirmation Required", "Are you sure you want to report this Vehicle Burglary?\nYour alarm has not yet been triggered for this vehicle.\nPlease have in mind that it is a Vehicle Burglary {FF8400}In Progress", "Confirm", "Cancel");
- }
- }
- else if(PlayerVehicleInfo[playerid][listitem][pvImpounded]) SendClientMessageEx(playerid, COLOR_WHITE, "You can not report an impounded vehicle. If you wish to reclaim it, do so at the DMV in Dillimore.");
- else if(PlayerVehicleInfo[playerid][listitem][pvDisabled] == 1) SendClientMessageEx(playerid, COLOR_WHITE, "You can not report a disabled vehicle. It is disabled due to your VIP level (vehicle restrictions).");
- else if(PlayerVehicleInfo[playerid][listitem][pvSpawned] == 0) SendClientMessageEx(playerid, COLOR_WHITE, "You can not report a stored vehicle. Use /vstorage to spawn it.");
- else SendClientMessageEx(playerid, COLOR_WHITE, "You can not track a non-existent vehicle.");
- }
- case DIALOG_911PICKLOCK2: {
- if(response) {
- new Float: carPos[3];
- GetVehiclePos(PlayerVehicleInfo[playerid][listitem][pvId], carPos[0], carPos[1], carPos[2]);
- new zone[MAX_ZONE_NAME], mainzone[MAX_ZONE_NAME];
- Get3DZone(carPos[0], carPos[1], carPos[2], zone, sizeof(zone));
- Get2DMainZone(carPos[0], carPos[1], mainzone, sizeof(mainzone));
- format(string, sizeof(string), "Your vehicle is located in %s(%s).", zone, mainzone);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- format(string, sizeof(string), "Suspected Vehicle Burglary, %s(%d)", GetVehicleName(PlayerVehicleInfo[playerid][listitem][pvId]), PlayerVehicleInfo[playerid][listitem][pvId]);
- SendCallToQueue(playerid, string, zone, mainzone, 4, PlayerVehicleInfo[playerid][listitem][pvId]);
- SetPVarInt(playerid, "Has911Call", 1);
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Dispatch: We have alerted all units in the area.");
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Thank you for reporting this incident");
- }
- DeletePVar(playerid, "ConfirmReport");
- }
- case DIALOG_NATION_CHECK:
- {
- if(response) {
- PlayerInfo[playerid][pNation] = listitem;
- switch(listitem) {
- case 0: SendClientMessageEx(playerid, COLOR_GRAD1, "You are now a citizen of San Andreas.");
- case 1: SendClientMessageEx(playerid, COLOR_GRAD1, "You are now a citizen of New Robada.");
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "You did not provide a response, picking a random nation for you...");
- new rand = random(2);
- PlayerInfo[playerid][pNation] = rand;
- switch(rand) {
- case 0: SendClientMessageEx(playerid, COLOR_GRAD1, "You are now a citizen of San Andreas.");
- case 1: SendClientMessageEx(playerid, COLOR_GRAD1, "You are now a citizen of New Robada.");
- }
- }
- }
- case BIGEARS3:
- {
- if(response) {
- new group = ListItemTrackId[playerid][listitem];
- if (arrGroupData[group][g_iGroupType] == GROUP_TYPE_CONTRACT && PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pASM] < 1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Only Senior Admins+ are allowed to use this feature.");
- return 1;
- }
- SetPVarInt(playerid, "BigEar", 5);
- SetPVarInt(playerid, "BigEarOOCGroup", group);
- }
- else ShowPlayerDialogEx(playerid, BIGEARS, DIALOG_STYLE_LIST, "Please choose an item to proceed", "Global Chat\nOOC Chat\nIC Chat\nFaction Chat\nGroup OOC Chat\nPlayer\nPrivate Messages\nDisable Bigears", "Select", "Cancel");
- }
- case BIGEARS: if(response) switch(listitem) {
- case 0: {
- SetPVarInt(playerid, "BigEar", 1);
- SendClientMessage(playerid, COLOR_WHITE, "You have selected the Global Chat, you can now see all the messages server-wide.");
- }
- case 1: {
- SetPVarInt(playerid, "BigEar", 2);
- SendClientMessage(playerid, COLOR_WHITE, "You have selected the OOC Chat, you can now see all the OOC(/b) messages server-wide.");
- }
- case 2: {
- SetPVarInt(playerid, "BigEar", 3);
- SendClientMessage(playerid, COLOR_WHITE, "You have selected the IC Chat, you can now see all the IC(Includes /me's & /do's) messages server-wide.");
- }
- case 3: {
- Group_ListGroups(playerid, BIGEARS2);
- }
- case 4: {
- Group_ListGroups(playerid, BIGEARS3);
- }
- case 5: {
- ShowPlayerDialogEx(playerid, BIGEARS4, DIALOG_STYLE_INPUT, "{3399FF}Big Ears Player", "Please type in the name or the Id of the person you want to use the Big Ears function", "Select", "Back");
- }
- case 6: {
- ShowPlayerDialogEx(playerid, BIGEARS5, DIALOG_STYLE_INPUT, "{3399FF}Big Ears | Private Messages", "Please type in the name or the Id of the person you want to use the Big Ears function", "Select", "Back");
- }
- case 7: {
- DeletePVar(playerid, "BigEar");
- DeletePVar(playerid, "BigEarGroup");
- DeletePVar(playerid, "BigEarPlayer");
- DeletePVar(playerid, "BigEarOOCGroup");
- DeletePVar(playerid, "BigEarPM");
- DeletePVar(playerid, "BigEarPlayerPM");
- rBigEarT[playerid] = 0;
- SendClientMessage(playerid, COLOR_WHITE, "You have disabled the bigears feature, you no longer see anything on your screen.");
- }
- }
- case BIGEARS4: {
- if(response) {
- new giveplayerid;
- if(sscanf(inputtext, "u", giveplayerid) || PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin]) {
- ShowPlayerDialogEx(playerid, BIGEARS4, DIALOG_STYLE_INPUT, "{3399FF}Big Ears Player", "Error - Please type in the name or the Id of the person you want to use the Big Ears function", "Select", "Back");
- return 1;
- }
- SetPVarInt(playerid, "BigEar", 6);
- SetPVarInt(playerid, "BigEarPlayer", giveplayerid);
- SendClientMessageEx(playerid, COLOR_WHITE, "You can now see all the messages from this player.");
- }
- else ShowPlayerDialogEx(playerid, BIGEARS, DIALOG_STYLE_LIST, "Please choose an item to proceed", "Global Chat\nOOC Chat\nIC Chat\nFaction Chat\nGroup OOC Chat\nPlayer\nPrivate Messages\nDisable Bigears", "Select", "Cancel");
- }
- case BIGEARS5: {
- if(response) {
- new giveplayerid, szString[128];
- if(sscanf(inputtext, "u", giveplayerid) || PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin]) {
- ShowPlayerDialogEx(playerid, BIGEARS5, DIALOG_STYLE_INPUT, "{3399FF}Big Ears | Private Messages", "Error - Please type in the name or the Id of the person you want to use the Big Ears function", "Select", "Back");
- return 1;
- }
- SetPVarInt(playerid, "BigEarPM", 1);
- SetPVarInt(playerid, "BigEarPlayerPM", giveplayerid);
- format(szString, sizeof(szString), "You will now receive all private messages from %s", GetPlayerNameEx(giveplayerid));
- SendClientMessageEx(playerid, COLOR_WHITE, szString);
- }
- else ShowPlayerDialogEx(playerid, BIGEARS, DIALOG_STYLE_LIST, "Please choose an item to proceed", "Global Chat\nOOC Chat\nIC Chat\nFaction Chat\nGroup OOC Chat\nPlayer\nPrivate Messages\nDisable Bigears", "Select", "Cancel");
- }
- case BIGEARS2: {
- if(response) {
- new group = ListItemTrackId[playerid][listitem];
- if (arrGroupData[group][g_iGroupType] == GROUP_TYPE_CONTRACT && PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pASM] < 1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Only Senior Admins+ are allowed to use this feature.");
- return 1;
- }
- SetPVarInt(playerid, "BigEar", 4);
- SetPVarInt(playerid, "BigEarGroup", group);
- }
- else ShowPlayerDialogEx(playerid, BIGEARS, DIALOG_STYLE_LIST, "Please choose an item to proceed", "Global Chat\nOOC Chat\nIC Chat\nFaction Chat\nGroup OOC Chat\nPlayer\nPrivate Messages\nDisable Bigears", "Select", "Cancel");
- }
- case DIALOG_DELETECAR:
- {
- if(response)
- {
- if(GetPVarType(playerid, "vDel")) {
- new
- i = GetPVarInt(playerid, "vDel");
- if(PlayerVehicleInfo[playerid][i][pvId] != INVALID_PLAYER_VEHICLE_ID && !PlayerVehicleInfo[playerid][i][pvImpounded] && PlayerVehicleInfo[playerid][i][pvSpawned]) {
- switch(PlayerVehicleInfo[playerid][i][pvModelId]) {
- case 519, 553, 508: {
- if(IsValidDynamicArea(iVehEnterAreaID[PlayerVehicleInfo[playerid][i][pvId]])) DestroyDynamicArea(iVehEnterAreaID[PlayerVehicleInfo[playerid][i][pvId]]);
- }
- }
- DestroyVehicle(PlayerVehicleInfo[playerid][i][pvId]);
- --PlayerCars;
- VehicleSpawned[playerid]--;
- }
- if(PlayerVehicleInfo[playerid][i][pvTicket] != 0)
- {
- GivePlayerCash(playerid, -PlayerVehicleInfo[playerid][i][pvTicket]);
- OnPlayerStatsUpdate(playerid);
- format(string, sizeof(string), "Your vehicle had active tickets on it. You have been charged the amount of the tickets ($%s).", number_format(PlayerVehicleInfo[playerid][i][pvTicket]));
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- }
- format(szMiscArray, sizeof(szMiscArray), "[DELETECAR] %s (IP: %s) (SQLID: %d) has deleted their %s (%d) (SQLID: %d).", GetPlayerNameEx(playerid), GetPlayerIpEx(playerid), GetPlayerSQLId(playerid), VehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400], PlayerVehicleInfo[playerid][i][pvModelId], PlayerVehicleInfo[playerid][i][pvSlotId]);
- Log("logs/playervehicle.log", szMiscArray);
- PlayerVehicleInfo[playerid][i][pvId] = 0;
- PlayerVehicleInfo[playerid][i][pvModelId] = 0;
- PlayerVehicleInfo[playerid][i][pvPosX] = 0.0;
- PlayerVehicleInfo[playerid][i][pvPosY] = 0.0;
- PlayerVehicleInfo[playerid][i][pvPosZ] = 0.0;
- PlayerVehicleInfo[playerid][i][pvPosAngle] = 0.0;
- PlayerVehicleInfo[playerid][i][pvLock] = 0;
- PlayerVehicleInfo[playerid][i][pvLocksLeft] = 0;
- PlayerVehicleInfo[playerid][i][pvLocked] = 0;
- PlayerVehicleInfo[playerid][i][pvPaintJob] = -1;
- PlayerVehicleInfo[playerid][i][pvColor1] = 0;
- PlayerVehicleInfo[playerid][i][pvColor2] = 0;
- PlayerVehicleInfo[playerid][i][pvPrice] = 0;
- PlayerVehicleInfo[playerid][i][pvTicket] = 0;
- for(new j = 0; j < 3; j++)
- {
- PlayerVehicleInfo[playerid][i][pvWeapons][j] = 0;
- }
- PlayerVehicleInfo[playerid][i][pvImpounded] = 0;
- PlayerVehicleInfo[playerid][i][pvSpawned] = 0;
- PlayerVehicleInfo[playerid][i][pvVW] = 0;
- PlayerVehicleInfo[playerid][i][pvInt] = 0;
- PlayerVehicleInfo[playerid][i][pvAlarm] = 0;
- PlayerVehicleInfo[playerid][i][pvAlarmTriggered] = 0;
- PlayerVehicleInfo[playerid][i][pvBeingPickLocked] = 0;
- if(PlayerVehicleInfo[playerid][i][pvAllowedPlayerId] != INVALID_PLAYER_ID)
- {
- PlayerInfo[PlayerVehicleInfo[playerid][i][pvAllowedPlayerId]][pVehicleKeys] = INVALID_PLAYER_VEHICLE_ID;
- PlayerInfo[PlayerVehicleInfo[playerid][i][pvAllowedPlayerId]][pVehicleKeysFrom] = INVALID_PLAYER_ID;
- PlayerVehicleInfo[playerid][i][pvAllowedPlayerId] = INVALID_PLAYER_ID;
- }
- GiveKeysTo[playerid] = INVALID_PLAYER_ID;
- DeletePVar(playerid, "vDel");
- new query[128];
- mysql_format(MainPipeline, query, sizeof(query), "DELETE FROM `vehicles` WHERE `id` = '%d'", PlayerVehicleInfo[playerid][i][pvSlotId]);
- mysql_tquery(MainPipeline, query, "OnQueryFinish", "ii", SENDDATA_THREAD, playerid);
- PlayerVehicleInfo[playerid][i][pvSlotId] = 0;
- return SendClientMessageEx(playerid, COLOR_WHITE, "Your vehicle has been permanently deleted.");
- }
- new
- szDialogStr[256];
- SetPVarInt(playerid, "vDel", listitem);
- if(PlayerVehicleInfo[playerid][listitem][pvTicket] != 0) format(szDialogStr, sizeof(szDialogStr), "{FFFFFF}Your {FF0000}%s{FFFFFF} will be {FF0000}permanently deleted{FFFFFF}.\n\n{FF0000}This vehicle currently has active tickets.\n{FFFFFF}You will be fined {FF0000}$%s{FFFFFF} upon vehicle deletion.\n\nYou may now confirm or cancel the deletion.", VehicleName[PlayerVehicleInfo[playerid][listitem][pvModelId] - 400], number_format(PlayerVehicleInfo[playerid][listitem][pvTicket]));
- else format(szDialogStr, sizeof(szDialogStr), "{FFFFFF}Your {FF0000}%s{FFFFFF} will be {FF0000}permanently deleted{FFFFFF}.\n\nYou may now confirm or cancel the deletion.", VehicleName[PlayerVehicleInfo[playerid][listitem][pvModelId] - 400]);
- return ShowPlayerDialogEx(playerid, DIALOG_DELETECAR, DIALOG_STYLE_MSGBOX, "Delete Vehicle", szDialogStr, "Delete", "Cancel");
- }
- else return DeletePVar(playerid, "vDel");
- }
- }
- if(dialogid == RCPINTRO)
- {
- if (response)
- {
- new msgstring[218];
- format(msgstring,sizeof(msgstring),"\tThere are stages you follow in order to make a checkpoint;\n1.- Adjusting the position of the checkpoint.\n2.- Confirm the position of the checkpoint.\n3.- Set the checkpoint size.\n4.- Set the checkpoint type.");
- ShowPlayerDialogEx(playerid,RCPINTRO2,DIALOG_STYLE_MSGBOX,"Race Checkpoints Introduction",msgstring,"Start","Cancel");
- }
- else
- {
- format(string,sizeof(string),"Create a checkpoint...\nEdit an existing checkpoint\nRemove checkpoint preview");
- ShowPlayerDialogEx(playerid,RCPCHOOSE,DIALOG_STYLE_LIST,"Race Checkpoints Configuration",string,"Okay","I'm done!");
- ConfigEventCPId[playerid] = 0;
- ConfigEventCPs[playerid][1] = 0;
- }
- }
- if(dialogid == RCPINTRO2)
- {
- if (response)
- {
- format(string,sizeof(string),"Create a checkpoint...\nEdit an existing checkpoint\nRemove checkpoint preview");
- ShowPlayerDialogEx(playerid,RCPCHOOSE,DIALOG_STYLE_LIST,"Race Checkpoints Configuration",string,"Okay","I'm done!");
- ConfigEventCPId[playerid] = 0;
- ConfigEventCPs[playerid][1] = 0;
- }
- }
- if(dialogid == RCPCHOOSE)
- {
- if (response && ConfigEventCPs[playerid][0] == 1)
- {
- if(listitem == 0) // Create a checkpoint
- {
- if(ConfigEventCPs[playerid][1] != 0) return SendClientMessageEx(playerid, COLOR_RED, "ERROR: You cannot create a new checkpoint since you are editing an existing one.");
- if(ConfigEventCPId[playerid] >= 20) {
- ConfigEventCPs[playerid][0] = 0;
- ConfigEventCPs[playerid][1] = 0;
- ConfigEventCPId[playerid] = 0;
- return SendClientMessageEx(playerid, COLOR_RED, "ERROR: You cannot create a new checkpoint since you have reached the checkpoint limit(20).");
- }
- new i;
- for(i = 0; i < 20; i++)
- {
- if(EventRCPU[i] == 0) break;
- }
- if(i >= 20) {
- ConfigEventCPs[playerid][0] = 0;
- ConfigEventCPs[playerid][1] = 0;
- ConfigEventCPId[playerid] = 0;
- return SendClientMessageEx(playerid, COLOR_RED, "ERROR: You cannot create a new checkpoint since you have reached the checkpoint limit(20).");
- }
- ConfigEventCPId[playerid] = i;
- ConfigEventCPs[playerid][1] = 1;
- ConfigEventCPs[playerid][2] = 1;
- SendClientMessageEx(playerid, COLOR_WHITE, "You are now creating a new checkpoint, you need to choose the position where the checkpoint will be at.");
- SendClientMessageEx(playerid, COLOR_YELLOW, "NOTE: Once you are done and have the right place please press the fire button to save the position.");
- SendClientMessageEx(playerid, COLOR_YELLOW, "NOTE: You can also cancel this action by pressing the AIM button.");
- }
- else if(listitem == 1) // Edit an existing checkpoint IN PROCESS
- {
- if(ConfigEventCPs[playerid][1] != 0) return SendClientMessageEx(playerid, COLOR_RED, "ERROR: You cannot edit a checkpoint since you are editing an existing one.");
- new bigstring[798], totalrcps;
- for(new i = 0; i < 20; i++)
- {
- if(EventRCPU[i] > 0) {
- switch(EventRCPT[i]) {
- case 1:
- {
- format(bigstring, sizeof(bigstring), "%s(RCPID:%i) Start Checkpoint", bigstring, i+1);
- format(bigstring, sizeof(bigstring), "%s\n", bigstring);
- }
- case 2:
- {
- format(bigstring, sizeof(bigstring), "%s(RCPID:%i) Normal Checkpoint", bigstring, i+1);
- format(bigstring, sizeof(bigstring), "%s\n", bigstring);
- }
- case 3:
- {
- format(bigstring, sizeof(bigstring), "%s(RCPID:%i) Watering Station Checkpoint", bigstring, i+1);
- format(bigstring, sizeof(bigstring), "%s\n", bigstring);
- }
- case 4:
- {
- format(bigstring, sizeof(bigstring), "%s(RCPID:%i) Finish Checkpoint", bigstring, i+1);
- format(bigstring, sizeof(bigstring), "%s\n", bigstring);
- }
- default:
- {
- format(bigstring, sizeof(bigstring), "%s(RCPID:%i) No Checkpoint type", bigstring, i+1);
- format(bigstring, sizeof(bigstring), "%s\n", bigstring);
- }
- }
- ListItemRCPId[playerid][totalrcps] = i;
- totalrcps++;
- }
- }
- if(totalrcps == 0) return SendClientMessageEx(playerid, COLOR_RED, "ERROR: No checkpoints have been created.");
- ShowPlayerDialogEx(playerid, RCPEDITMENU, DIALOG_STYLE_LIST,"Please choose a checkpoint to edit:", bigstring, "Edit", "Cancel");
- }
- else if(listitem == 2) // Remove view of checkpoint
- {
- DisablePlayerCheckpoint(playerid);
- SendClientMessageEx(playerid, COLOR_WHITE, "You have disabled your race checkpoints.");
- }
- }
- }
- if(dialogid == RCPEDITMENU)
- {
- ConfigEventCPs[playerid][2] = 0;
- ConfigEventCPId[playerid] = ListItemRCPId[playerid][listitem];
- ConfigEventCPs[playerid][1] = 0;
- DisablePlayerCheckpoint(playerid);
- if(EventRCPT[ConfigEventCPId[playerid]] == 1) {
- SetPlayerCheckpoint(playerid, EventRCPX[ConfigEventCPId[playerid]], EventRCPY[ConfigEventCPId[playerid]], EventRCPZ[ConfigEventCPId[playerid]], EventRCPS[ConfigEventCPId[playerid]]);
- }
- else if(EventRCPT[ConfigEventCPId[playerid]] == 4) {
- SetPlayerCheckpoint(playerid, EventRCPX[ConfigEventCPId[playerid]], EventRCPY[ConfigEventCPId[playerid]], EventRCPZ[ConfigEventCPId[playerid]], EventRCPS[ConfigEventCPId[playerid]]);
- }
- else {
- SetPlayerCheckpoint(playerid, EventRCPX[ConfigEventCPId[playerid]], EventRCPY[ConfigEventCPId[playerid]], EventRCPZ[ConfigEventCPId[playerid]], EventRCPS[ConfigEventCPId[playerid]]);
- }
- format(string,sizeof(string),"Checkpoint Edit(ID:%d)", ConfigEventCPId[playerid]);
- ShowPlayerDialogEx(playerid,RCPEDITMENU2,DIALOG_STYLE_LIST,string,"Edit position\nEdit size\nEdit type\nView checkpoint","Okay","I'm done!");
- }
- if(dialogid == RCPEDITMENU2)
- {
- if (response)
- {
- if(listitem == 0) // Edit position
- {
- ConfigEventCPs[playerid][1] = 1;
- SendClientMessageEx(playerid, COLOR_WHITE, "You are now creating editing this checkpoint's position, you need to choose the position where the checkpoint will be at.");
- SendClientMessageEx(playerid, COLOR_WHITE, "NOTE: Press the FIRE button to save the position. You can cancel this action by pressing the AIM button.");
- }
- else if(listitem == 1) // edit size
- {
- ConfigEventCPs[playerid][1] = 3;
- format(string,sizeof(string),"Race Checkpoint %d Size", ConfigEventCPId[playerid]);
- ShowPlayerDialogEx(playerid,RCPSIZE,DIALOG_STYLE_INPUT,string,"Please choose the size of the checkpoint.\nRecommended size: 5.0","Ok","Cancel");
- }
- else if(listitem == 2) // edit type
- {
- ConfigEventCPs[playerid][1] = 4;
- ShowPlayerDialogEx(playerid,RCPTYPE,DIALOG_STYLE_LIST,"Race Checkpoints Type List","1.- Start checkpoint\n2.- Normal checkpoint\n3.- Watering Station\n4.- Finish checkpoint","Okay","Cancel");
- }
- else if(listitem == 3) // view checkpoint
- {
- if(EventRCPT[ConfigEventCPId[playerid]] == 1) {
- SetPlayerCheckpoint(playerid, EventRCPX[ConfigEventCPId[playerid]], EventRCPY[ConfigEventCPId[playerid]], EventRCPZ[ConfigEventCPId[playerid]], EventRCPS[ConfigEventCPId[playerid]]);
- }
- else if(EventRCPT[ConfigEventCPId[playerid]] == 4) {
- SetPlayerCheckpoint(playerid, EventRCPX[ConfigEventCPId[playerid]], EventRCPY[ConfigEventCPId[playerid]], EventRCPZ[ConfigEventCPId[playerid]], EventRCPS[ConfigEventCPId[playerid]]);
- }
- else {
- SetPlayerCheckpoint(playerid, EventRCPX[ConfigEventCPId[playerid]], EventRCPY[ConfigEventCPId[playerid]], EventRCPZ[ConfigEventCPId[playerid]], EventRCPS[ConfigEventCPId[playerid]]);
- }
- SetPlayerPos(playerid, EventRCPX[ConfigEventCPId[playerid]], EventRCPY[ConfigEventCPId[playerid]], EventRCPZ[ConfigEventCPId[playerid]]);
- SendClientMessageEx(playerid, COLOR_WHITE, "You now have a view of this checkpoint, you are inside of the checkpoint, step outside to see it.");
- }
- }
- }
- if(dialogid == RCPTYPE)
- {
- if (response && ConfigEventCPs[playerid][0] == 1)
- {
- if(listitem == 0) // Start checkpoint
- {
- EventRCPT[ConfigEventCPId[playerid]] = 1;
- DisablePlayerCheckpoint(playerid);
- ConfigEventCPs[playerid][1] = 0;
- ConfigEventCPs[playerid][0] = 0;
- SetPlayerCheckpoint(playerid, EventRCPX[ConfigEventCPId[playerid]], EventRCPY[ConfigEventCPId[playerid]], EventRCPZ[ConfigEventCPId[playerid]], EventRCPS[ConfigEventCPId[playerid]]);
- }
- else if(listitem == 1) // Normal Checkpoint
- {
- EventRCPT[ConfigEventCPId[playerid]] = 2;
- DisablePlayerCheckpoint(playerid);
- ConfigEventCPs[playerid][1] = 0;
- ConfigEventCPs[playerid][0] = 0;
- SetPlayerCheckpoint(playerid, EventRCPX[ConfigEventCPId[playerid]], EventRCPY[ConfigEventCPId[playerid]], EventRCPZ[ConfigEventCPId[playerid]], EventRCPS[ConfigEventCPId[playerid]]);
- }
- else if(listitem == 2) // Watering Checkpoint
- {
- EventRCPT[ConfigEventCPId[playerid]] = 3;
- DisablePlayerCheckpoint(playerid);
- ConfigEventCPs[playerid][1] = 0;
- ConfigEventCPs[playerid][0] = 0;
- SetPlayerCheckpoint(playerid, EventRCPX[ConfigEventCPId[playerid]], EventRCPY[ConfigEventCPId[playerid]], EventRCPZ[ConfigEventCPId[playerid]], EventRCPS[ConfigEventCPId[playerid]]);
- }
- else if(listitem == 3) // Finish Checkpoint
- {
- EventRCPT[ConfigEventCPId[playerid]] = 4;
- DisablePlayerCheckpoint(playerid);
- ConfigEventCPs[playerid][1] = 0;
- ConfigEventCPs[playerid][0] = 0;
- SetPlayerCheckpoint(playerid, EventRCPX[ConfigEventCPId[playerid]], EventRCPY[ConfigEventCPId[playerid]], EventRCPZ[ConfigEventCPId[playerid]], EventRCPS[ConfigEventCPId[playerid]]);
- }
- }
- }
- if(dialogid == RCPSIZE)
- {
- if(response && ConfigEventCPs[playerid][0] == 1)
- {
- if(strlen(inputtext) < 1)
- {
- format(string,sizeof(string),"Race Checkpoint %d Size", ConfigEventCPId[playerid]);
- ShowPlayerDialogEx(playerid,RCPSIZE,DIALOG_STYLE_INPUT,string,"Please type a number for the size of the checkpoint","Ok","Cancel");
- return 1;
- }
- new Float: rcpsize;
- rcpsize = floatstr(inputtext);
- if(rcpsize < 1.0 && rcpsize > 15.0) return 1;
- EventRCPS[ConfigEventCPId[playerid]] = rcpsize;
- SendClientMessage(playerid, COLOR_WHITE, "Successfully changed the size, updating preview...");
- /*if(EventRCPT[ConfigEventCPId[playerid]] == 1) {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid, EventRCPX[ConfigEventCPId[playerid]], EventRCPY[ConfigEventCPId[playerid]], EventRCPZ[ConfigEventCPId[playerid]], EventRCPS[ConfigEventCPId[playerid]]);
- }
- else if(EventRCPT[ConfigEventCPId[playerid]] == 4) {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid, EventRCPX[ConfigEventCPId[playerid]], EventRCPY[ConfigEventCPId[playerid]], EventRCPZ[ConfigEventCPId[playerid]], EventRCPS[ConfigEventCPId[playerid]]);
- }*/
- DisablePlayerCheckpoint(playerid);
- if(ConfigEventCPs[playerid][2] == 1) {
- ConfigEventCPs[playerid][1] = 4;
- ShowPlayerDialogEx(playerid,RCPTYPE,DIALOG_STYLE_LIST,"Race Checkpoints Type List","1.- Start checkpoint\n2.- Normal checkpoint\n3.- Watering Station\n4.- Finish checkpoint","Okay","Cancel");
- }
- else
- {
- SetTimerEx("RFLCheckpointu", 1000, false, "i", playerid);
- //SetPlayerCheckpoint(playerid, EventRCPX[ConfigEventCPId[playerid]], EventRCPY[ConfigEventCPId[playerid]], EventRCPZ[ConfigEventCPId[playerid]], EventRCPS[ConfigEventCPId[playerid]]);
- }
- }
- }
- if(dialogid == UNMODCARMENU)
- {
- if (response)
- {
- new count = GetPVarInt(playerid, "modCount");
- new d;
- for(new z = 0 ; z < MAX_PLAYERVEHICLES; z++)
- {
- if(IsPlayerInVehicle(playerid, PlayerVehicleInfo[playerid][z][pvId]))
- {
- d = z;
- break;
- }
- }
- for (new i = 0; i < count; i++)
- {
- if(listitem == i)
- {
- format(string, sizeof(string), "partList%i", i);
- new partID = GetPVarInt(playerid, string);
- if (partID == 999)
- {
- for(new f = 0 ; f < MAX_MODS; f++)
- {
- SetPVarInt(playerid, "unMod", 1);
- RemoveVehicleComponent(PlayerVehicleInfo[playerid][d][pvId], GetVehicleComponentInSlot(PlayerVehicleInfo[playerid][d][pvId], f));
- PlayerVehicleInfo[playerid][d][pvMods][f] = 0;
- }
- SendClientMessageEx(playerid, COLOR_WHITE, "All modifications have been removed from your vehicle.");
- return 1;
- }
- SetPVarInt(playerid, "unMod", 1);
- RemoveVehicleComponent(GetPlayerVehicleID(playerid), partID);
- if(GetVehicleComponentType(partID) == 3) {
- PlayerVehicleInfo[playerid][d][pvMods][14] = 0;
- }
- PlayerVehicleInfo[playerid][d][pvMods][GetVehicleComponentType(partID)] = 0;
- SendClientMessageEx(playerid, COLOR_WHITE, "The modification you requested has been removed.");
- return 1;
- }
- }
- }
- }
- if(dialogid == 7954) // Report tips
- {
- ShowPlayerDialogEx(playerid,7955,DIALOG_STYLE_MSGBOX,"Report tips","Tips when reporting:\n- Report what you need, not who you need.\n- Be specific, report exactly what you need.\n- Do not make false reports.\n- Do not flame admins.\n- Report only for in-game items.\n- For shop orders use the /shoporder command","Close", "");
- }
- #if defined SHOPAUTOMATED
- if(dialogid == DIALOG_SHOPORDER)
- {
- if(response)
- {
- if(strlen(inputtext) < 1 || strlen(inputtext) > 6)
- {
- ShowPlayerDialogEx(playerid, DIALOG_SHOPERROR, DIALOG_STYLE_MSGBOX, "Shop Order","ERROR: The shop order ID must be no longer than 6 characters and no lower than 1 character.", "Retry", "Cancel");
- return 1;
- }
- if(!IsNumeric(inputtext))
- {
- ShowPlayerDialogEx(playerid, DIALOG_SHOPERROR, DIALOG_STYLE_MSGBOX, "Shop Order","ERROR: The shop order ID must be a numerical value.", "Retry", "Cancel");
- return 1;
- }
- new orderid = strval(inputtext);
- if(orderid == 0)
- {
- ShowPlayerDialogEx(playerid, DIALOG_SHOPERROR, DIALOG_STYLE_MSGBOX, "Shop Order","ERROR: The shop order ID can not be 0.", "Retry", "Cancel");
- return 1;
- }
- ShowNoticeGUIFrame(playerid, 6);
- PlayerInfo[playerid][pOrder] = orderid;
- new query[384];
- format(query, sizeof(query), "\
- SELECT p.order_product_id, p.order_id, p.name, p.quantity, h.order_status_id, o.email, o.ip \
- FROM betazorder_product p \
- LEFT JOIN betazorder_history h ON h.order_id = p.order_id AND h.order_history_id = (SELECT max(order_history_id) FROM betazorder_history WHERE p.order_id = order_id) \
- LEFT JOIN betazorder o ON o.order_id = p.order_id \
- WHERE p.order_id = %d", orderid);
- mysql_tquery(ShopPipeline, query, true, "OnShopOrder", "i", playerid);
- SetPVarInt(playerid, "ShopOrderTimer", 60); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_SHOPORDERTIMER);
- }
- }
- if(dialogid == DIALOG_SHOPORDEREMAIL)
- {
- if(response)
- {
- new email[256];
- GetPVarString(playerid, "ShopEmailVerify", email, sizeof(email));
- if(!isnull(inputtext) && strcmp(inputtext, email, true) == 0)
- {
- ShowNoticeGUIFrame(playerid, 6);
- new query[384];
- format(query, sizeof(query), "\
- SELECT p.order_product_id, p.order_id, p.name, p.quantity, p.delivered, h.order_status_id \
- FROM betazorder_product p \
- LEFT JOIN betazorder_history h ON h.order_id = p.order_id AND h.order_history_id = (SELECT max(order_history_id) FROM betazorder_history WHERE p.order_id = order_id) \
- LEFT JOIN betazorder o ON o.order_id = p.order_id \
- WHERE p.order_id = %d", PlayerInfo[playerid][pOrder]);
- mysql_tquery(ShopPipeline, query, true, "OnShopOrderEmailVer", "i", playerid);
- }
- else
- {
- //ERROR ASK FURTHER HELP
- ShowPlayerDialogEx(playerid, 0, DIALOG_STYLE_MSGBOX, "Shop Order Error", "We were unable to verify that e-mail to that order, would you like further assistance from a shop technician?", "Yes", "No");
- }
- }
- }
- if(dialogid == DIALOG_SHOPORDER2)
- {
- if(response)
- {
- ShowNoticeGUIFrame(playerid, 6);
- new query[256];
- format(query, sizeof(query), "SELECT * FROM `shop` WHERE `order_id`=%d", PlayerInfo[playerid][pOrder]);
- mysql_tquery(ShopPipeline, query, true, "OnShopOrder2", "ii", playerid, listitem);
- }
- }
- if(dialogid == DIALOG_SHOPDELIVER)
- {
- if(response)
- {
- switch(GetPVarInt(playerid, "DShop_product_id"))
- {
- case 69: //Custom car
- {
- new carstring[5012];
- for(new x;x<sizeof(VehicleNameShop);x++)
- {
- format(carstring, sizeof(carstring), "%s%d - %s\n", carstring, VehicleNameShop[x][svehicleid], VehicleNameShop[x][svehiclename]);
- }
- ShowPlayerDialogEx(playerid, DIALOG_SHOPDELIVERCAR, DIALOG_STYLE_LIST, "Shop Car Delivery", carstring, "Select Car", "Cancel");
- }
- }
- }
- }
- if(dialogid == DIALOG_SHOPDELIVERCAR)
- {
- if(response)
- {
- new dialogstring[256], name[64];
- GetPVarString(playerid, "DShop_name", name, sizeof(name));
- SetPVarInt(playerid, "DShop_listitem", listitem);
- format(dialogstring, sizeof(dialogstring), "You are about to redeem: %s\nOrder ID: %d\nWith vehicle: %s (ID %d)\n\nAre you sure?", name, GetPVarInt(playerid, "DShop_order_id"), VehicleNameShop[listitem][svehicleid], VehicleNameShop[listitem][svehiclename]);
- ShowPlayerDialogEx(playerid, DIALOG_SHOPDELIVERCAR2, DIALOG_STYLE_MSGBOX, "Shop Car Delivery", dialogstring, "Reedem", "Cancel");
- }
- }
- if(dialogid == DIALOG_SHOPDELIVERCAR2)
- {
- if(response)
- {
- if(!vehicleCountCheck(playerid))
- {
- ShowPlayerDialogEx(playerid, 0, DIALOG_STYLE_MSGBOX, "Error", "You can't have any more vehicles, you own too many!", "OK", "");
- }
- else if(!vehicleSpawnCountCheck(playerid))
- {
- ShowPlayerDialogEx(playerid, 0, DIALOG_STYLE_MSGBOX, "Error", "You have too many vehicles spawned, you must store one first.", "OK", "");
- }
- else
- {
- new Float: arr_fPlayerPos[4];
- listitem = GetPVarInt(playerid, "DShop_listitem");
- GetPlayerPos(playerid, arr_fPlayerPos[0], arr_fPlayerPos[1], arr_fPlayerPos[2]);
- GetPlayerFacingAngle(playerid, arr_fPlayerPos[3]);
- CreatePlayerVehicle(playerid, GetPlayerFreeVehicleId(playerid), VehicleNameShop[listitem][svehicleid], arr_fPlayerPos[0], arr_fPlayerPos[1], arr_fPlayerPos[2], arr_fPlayerPos[3], 0, 0, 2000000, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
- format(string, sizeof(string), "[shoporder] created a %s (%d) for %s(%d) (invoice %s).", GetVehicleName(VehicleNameShop[listitem][svehicleid]), VehicleNameShop[listitem][svehicleid], GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPVarInt(playerid, "DShop_order_id"));
- Log("logs/shoplog.log", string);
- }
- }
- }
- #else
- if(dialogid == DIALOG_SHOPORDER)
- {
- if(response)
- {
- if(strlen(inputtext) < 1 || strlen(inputtext) > 6)
- {
- ShowPlayerDialogEx(playerid, DIALOG_SHOPERROR, DIALOG_STYLE_MSGBOX, "Shop Order","ERROR: The shop order ID must be no longer than 6 characters and no lower than 1 character.", "Retry", "Cancel");
- return 1;
- }
- if(!IsNumeric(inputtext))
- {
- ShowPlayerDialogEx(playerid, DIALOG_SHOPERROR, DIALOG_STYLE_MSGBOX, "Shop Order","ERROR: The shop order ID must be a numerical value.", "Retry", "Cancel");
- return 1;
- }
- new orderid = strval(inputtext);
- if(orderid == 0)
- {
- ShowPlayerDialogEx(playerid, DIALOG_SHOPERROR, DIALOG_STYLE_MSGBOX, "Shop Order","ERROR: The shop order ID can not be 0.", "Retry", "Cancel");
- return 1;
- }
- PlayerInfo[playerid][pOrder] = orderid;
- SetPVarInt(playerid, "ShopOrderTimer", 60); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_SHOPORDERTIMER);
- format(string, sizeof(string), "shop.ng-gaming.net/idcheck.php?id=%d", orderid);
- HTTP(playerid, HTTP_GET, string, "", "HttpCallback_ShopIDCheck");
- }
- }
- #endif
- if(dialogid == DIALOG_SHOPERROR)
- {
- if(response)
- {
- ShowPlayerDialogEx(playerid, DIALOG_SHOPORDER, DIALOG_STYLE_INPUT, "Shop Order", "This is for shop orders from http://shop.ng-gaming.net\n\nIf you do not have a shop order then please cancel this dialog box now.\n\nWarning: Abuse of this feature may result to an indefinite block from this command.\n\nPlease enter your shop order ID (if you do not know it put 1):", "Submit", "Cancel" );
- }
- }
- if(dialogid == DIALOG_SHOPERROR2)
- {
- if(response)
- {
- ShowPlayerDialogEx(playerid, DIALOG_SHOPSENT, DIALOG_STYLE_INPUT, "Shop Order", "", "Submit", "Cancel" );
- }
- }
- if(dialogid == PMOTDNOTICE && 1 <= PlayerInfo[playerid][pDonateRank] <= 3 && (PlayerInfo[playerid][pVIPExpire] - 86400 < gettime()))
- {
- ShowPlayerDialogEx(playerid, VIP_EXPIRES, DIALOG_STYLE_MSGBOX, "VIP Expiration!", "Your VIP expires in less than a day - renew today at shop.ng-gaming.net!", "OK", "");
- }
- else if(dialogid == PMOTDNOTICE || dialogid == VIP_EXPIRES)
- {
- SetPVarInt(playerid, "ViewedPMOTD", 1);
- if(PlayerInfo[playerid][pReceivedCredits] != 0) ShowLoginDialogs(playerid, 5);
- }
- if(dialogid == DIALOG_LOADTRUCK)
- {
- if(response)
- {
- new iBusiness = ListItemTrackId[playerid][listitem];
- if (Businesses[iBusiness][bOrderState] != 1) {
- SendClientMessageEx(playerid, COLOR_WHITE, "That order cannot be taken anymore (either taken by another Shipment Contractor or the business has cancelled it)");
- return 1;
- }
- new iTruckModel = GetVehicleModel(GetPlayerVehicleID(playerid));
- if (iTruckModel != 443 && Businesses[iBusiness][bType] == BUSINESS_TYPE_NEWCARDEALERSHIP) {
- SendClientMessageEx(playerid, COLOR_WHITE, "You need to be driving a Packer in order to accept orders from car dealerships.");
- TogglePlayerControllable(playerid, 1);
- DeletePVar(playerid, "IsFrozen");
- return 1;
- }
- if (iTruckModel != 514 && Businesses[iBusiness][bType] == BUSINESS_TYPE_GASSTATION) {
- SendClientMessageEx(playerid, COLOR_WHITE, "You need to be driving a tank truck in order to accept orders from gas stations.");
- TogglePlayerControllable(playerid, 1);
- DeletePVar(playerid, "IsFrozen");
- return 1;
- }
- if ((iTruckModel == 443 || iTruckModel == 514) && Businesses[iBusiness][bType] != BUSINESS_TYPE_NEWCARDEALERSHIP && Businesses[iBusiness][bType] != BUSINESS_TYPE_GASSTATION)
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "You need to be driving a regular truck (i.e not packer or tank truck) in order to accept orders from this type of business.");
- TogglePlayerControllable(playerid, 1);
- DeletePVar(playerid, "IsFrozen");
- return 1;
- }
- Businesses[iBusiness][bOrderState] = 2;
- TruckDeliveringTo[GetPlayerVehicleID(playerid)] = iBusiness;
- SaveBusiness(iBusiness);
- format(string,sizeof(string),"* Please wait a moment while the vehicle is being loaded with %s...", GetInventoryType(iBusiness));
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- SetPVarInt(playerid, "LoadTruckTime", 10);
- SetTimerEx("LoadTruck", 1000, 0, "d", playerid);
- }
- else
- {
- DeletePVar(playerid, "IsFrozen");
- TogglePlayerControllable(playerid, 1);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You canceled the loading of the shipment, type /loadshipment to try again.");
- }
- }
- if((dialogid == BUYTOYSCOP) && response)
- {
- szMiscArray[0] = 0;
- new icount = GetPlayerToySlots(playerid);
- for(new x;x<icount;x++)
- {
- new name[24] = "None";
- for(new i;i<sizeof(HoldingObjectsAll);i++)
- {
- if(HoldingObjectsAll[i][holdingmodelid] == PlayerToyInfo[playerid][x][ptModelID])
- {
- format(name, sizeof(name), "%s", HoldingObjectsAll[i][holdingmodelname]);
- }
- }
- if(PlayerToyInfo[playerid][x][ptModelID] != 0 && (strcmp(name, "None", true) == 0))
- {
- format(name, sizeof(name), "ID: %d", PlayerToyInfo[playerid][x][ptModelID]);
- }
- format(szMiscArray, sizeof(szMiscArray), "%s(%d) %s (Bone: %s)\n", szMiscArray, x, name, HoldingBones[PlayerToyInfo[playerid][x][ptBone]]);
- }
- ShowPlayerDialogEx(playerid, BUYTOYSCOP2, DIALOG_STYLE_LIST, "Select a Slot", szMiscArray, "Select", "Cancel");
- }
- if((dialogid == BUYTOYSCOP2) && response)
- {
- /*
- if(listitem >= 5 && PlayerInfo[playerid][pDonateRank] < 1 || listitem >= 5 && PlayerInfo[playerid][pBuddyInvited] == 1) return SendClientMessageEx(playerid, COLOR_WHITE, "* You must be a Bronze VIP + to use that slot!");
- if(listitem >= 8 && PlayerInfo[playerid][pDonateRank] < 2) return SendClientMessageEx(playerid, COLOR_WHITE, "* You must be a Silver VIP + to use that slot!");
- if(listitem >= 9 && PlayerInfo[playerid][pDonateRank] < 3) return SendClientMessageEx(playerid, COLOR_WHITE, "* You must be a Gold VIP + to use that slot!");
- if(listitem >= 10 && PlayerInfo[playerid][pDonateRank] < 4) return SendClientMessageEx(playerid, COLOR_WHITE, "* You must be a Platinum VIP + to use that slot!");
- */
- if(!toyCountCheck(playerid)) return SendClientMessageEx(playerid, COLOR_YELLOW, "* You cannot hold anymore toys.");
- if(PlayerToyInfo[playerid][listitem][ptModelID] != 0) return SendClientMessageEx(playerid, COLOR_YELLOW, "* You already have something in that slot. Delete it with /toys");
- SetPVarInt(playerid, "ToySlot", listitem);
- new stringg[1024];
- for(new x;x<sizeof(HoldingObjectsCop);x++)
- {
- format(stringg, sizeof(stringg), "%s%s ($%d)\n", stringg, HoldingObjectsCop[x][holdingmodelname], HoldingObjectsCop[x][holdingprice]);
- }
- ShowPlayerDialogEx(playerid, BUYTOYSCOP3, DIALOG_STYLE_LIST, "Select an Item", stringg, "Buy", "Cancel");
- }
- if((dialogid == BUYTOYSCOP3) && response)
- {
- if(GetPlayerCash(playerid) < HoldingObjectsCop[listitem][holdingprice])
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "* You can't afford that!");
- }
- else
- {
- GivePlayerCash(playerid, -HoldingObjectsCop[listitem][holdingprice]);
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptModelID] = HoldingObjectsCop[listitem][holdingmodelid];
- new modelid = PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptModelID];
- if((modelid >= 19006 && modelid <= 19035) || (modelid >= 19138 && modelid <= 19140))
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.9;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.35;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else if(modelid >= 18891 && modelid <= 18910)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.15;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 90.0;
- }
- else if(modelid >= 18926 && modelid <= 18935)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.1;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else if(modelid >= 18911 && modelid <= 18920)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.1;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.035;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 90.0;
- }
- else if(modelid == 19078 || modelid == 19078)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 16;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else if((modelid >= 18641 && modelid <= 18644) || (modelid >= 19080 && modelid <= 19084) || modelid == 18890)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 6;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptScaleX] = 1.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptScaleY] = 1.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptScaleZ] = 1.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptTradable] = 0;
- g_mysql_NewToy(playerid, GetPVarInt(playerid, "ToySlot"));
- format(string, sizeof(string), "* You have purchased %s for $%d (Slot: %d)", HoldingObjectsCop[listitem][holdingmodelname], HoldingObjectsCop[listitem][holdingprice], GetPVarInt(playerid, "ToySlot"));
- SendClientMessageEx(playerid, COLOR_RED, string);
- SendClientMessageEx(playerid, COLOR_WHITE, "HINT: Use /toys to wear/edit this");
- }
- }
- if((dialogid == BUYTOYSGOLD) && response)
- {
- if(PlayerInfo[playerid][pDonateRank] < 3) return SendClientMessageEx(playerid, COLOR_WHITE, "* You must be a Gold VIP +");
- new icount = GetPlayerToySlots(playerid);
- for(new x;x<icount;x++)
- {
- new name[24] = "None";
- for(new i;i<sizeof(HoldingObjectsAll);i++)
- {
- if(HoldingObjectsAll[i][holdingmodelid] == PlayerToyInfo[playerid][x][ptModelID])
- {
- format(name, sizeof(name), "%s", HoldingObjectsAll[i][holdingmodelname]);
- }
- }
- if(PlayerToyInfo[playerid][x][ptModelID] != 0 && (strcmp(name, "None", true) == 0))
- {
- format(name, sizeof(name), "ID: %d", PlayerToyInfo[playerid][x][ptModelID]);
- }
- format(szMiscArray, sizeof(szMiscArray), "%s(%d) %s (Bone: %s)\n", szMiscArray, x, name, HoldingBones[PlayerToyInfo[playerid][x][ptBone]]);
- }
- ShowPlayerDialogEx(playerid, BUYTOYSGOLD2, DIALOG_STYLE_LIST, "Select a Slot", szMiscArray, "Select", "Cancel");
- }
- if((dialogid == BUYTOYSGOLD2) && response)
- {
- if(PlayerInfo[playerid][pDonateRank] < 3) return SendClientMessageEx(playerid, COLOR_WHITE, "* You must be a Gold VIP +");
- if(!toyCountCheck(playerid)) return SendClientMessageEx(playerid, COLOR_YELLOW, "* You cannot hold anymore toys.");
- if(PlayerToyInfo[playerid][listitem][ptModelID] != 0) return SendClientMessageEx(playerid, COLOR_YELLOW, "* You already have something in that slot. Delete it with /toys");
- SetPVarInt(playerid, "ToySlot", listitem);
- for(new x;x<sizeof(HoldingObjectsAll);x++)
- {
- format(szMiscArray, sizeof(szMiscArray), "%s%s ($%d)\n", szMiscArray, HoldingObjectsAll[x][holdingmodelname], HoldingObjectsAll[x][holdingprice]);
- }
- ShowPlayerDialogEx(playerid, BUYTOYSGOLD3, DIALOG_STYLE_LIST, "Select an Item", szMiscArray, "Buy", "Cancel");
- }
- if((dialogid == BUYTOYSGOLD3) && response)
- {
- if(PlayerInfo[playerid][pDonateRank] < 3) return SendClientMessageEx(playerid, COLOR_WHITE, "* You must be a Gold VIP +");
- if(GetPlayerCash(playerid) < HoldingObjectsAll[listitem][holdingprice])
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "* You can't afford that!");
- }
- else
- {
- GivePlayerCash(playerid, -HoldingObjectsAll[listitem][holdingprice]);
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptModelID] = HoldingObjectsAll[listitem][holdingmodelid];
- new modelid = PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptModelID];
- if((modelid >= 19006 && modelid <= 19035) || (modelid >= 19138 && modelid <= 19140))
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.9;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.35;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else if(modelid >= 18891 && modelid <= 18910)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.15;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 90.0;
- }
- else if(modelid >= 18926 && modelid <= 18935)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.1;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else if(modelid >= 18911 && modelid <= 18920)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.1;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.035;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 90.0;
- }
- else if(modelid == 19078 || modelid == 19078)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 16;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else if((modelid >= 18641 && modelid <= 18644) || (modelid >= 19080 && modelid <= 19084) || modelid == 18890)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 6;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptScaleX] = 1.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptScaleY] = 1.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptScaleZ] = 1.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptTradable] = 0;
- g_mysql_NewToy(playerid, GetPVarInt(playerid, "ToySlot"));
- format(string, sizeof(string), "* You have purchased %s for $%d (Slot: %d)", HoldingObjectsAll[listitem][holdingmodelname], HoldingObjectsAll[listitem][holdingprice], GetPVarInt(playerid, "ToySlot"));
- SendClientMessageEx(playerid, COLOR_RED, string);
- SendClientMessageEx(playerid, COLOR_WHITE, "HINT: Use /toys to wear/edit this");
- }
- }
- if((dialogid == BUYTOYS) && response)
- {
- szMiscArray[0] = 0;
- new icount = GetPlayerToySlots(playerid);
- for(new x;x<icount;x++)
- {
- new name[24];
- format(name, sizeof(name), "None");
- for(new i;i<sizeof(HoldingObjectsAll);i++)
- {
- if(HoldingObjectsAll[i][holdingmodelid] == PlayerToyInfo[playerid][x][ptModelID])
- {
- format(name, sizeof(name), "%s", HoldingObjectsAll[i][holdingmodelname]);
- }
- }
- if(PlayerToyInfo[playerid][x][ptModelID] != 0 && (strcmp(name, "None", true) == 0))
- {
- format(name, sizeof(name), "ID: %d", PlayerToyInfo[playerid][x][ptModelID]);
- }
- format(szMiscArray, sizeof(szMiscArray), "%s(%d) %s (Bone: %s)\n", szMiscArray, x, name, HoldingBones[PlayerToyInfo[playerid][x][ptBone]]);
- }
- ShowPlayerDialogEx(playerid, BUYTOYS2, DIALOG_STYLE_LIST, "Select a Slot", szMiscArray, "Select", "Cancel");
- }
- if((dialogid == BUYTOYS2) && response)
- {
- /*
- if(listitem >= 5 + PlayerInfo[playerid][pToySlot] && PlayerInfo[playerid][pDonateRank] < 1 || listitem >= 5 + PlayerInfo[playerid][pToySlot] && PlayerInfo[playerid][pBuddyInvited] == 1) return SendClientMessageEx(playerid, COLOR_WHITE, "* You must be a Bronze VIP + to use that slot!");
- if(listitem >= 8 + PlayerInfo[playerid][pToySlot] && PlayerInfo[playerid][pDonateRank] < 2) return SendClientMessageEx(playerid, COLOR_WHITE, "* You must be a Silver VIP + to use that slot!");
- if(listitem >= 9 + PlayerInfo[playerid][pToySlot] && PlayerInfo[playerid][pDonateRank] < 3) return SendClientMessageEx(playerid, COLOR_WHITE, "* You must be a Gold VIP + to use that slot!");
- if(listitem >= 10 + PlayerInfo[playerid][pToySlot] && PlayerInfo[playerid][pDonateRank] < 4) return SendClientMessageEx(playerid, COLOR_WHITE, "* You must be a Platinum VIP + to use that slot!");
- */
- if(!toyCountCheck(playerid)) return SendClientMessageEx(playerid, COLOR_YELLOW, "* You cannot hold anymore toys.");
- if(PlayerToyInfo[playerid][listitem][ptModelID] != 0) return SendClientMessageEx(playerid, COLOR_YELLOW, "* You already have something in that slot. Delete it with /toys");
- SetPVarInt(playerid, "ToySlot", listitem);
- new stringg[5000];
- for(new x;x<sizeof(HoldingObjects);x++)
- {
- format(stringg, sizeof(stringg), "%s%s ($%d)\n", stringg, HoldingObjects[x][holdingmodelname], HoldingObjects[x][holdingprice]);
- }
- ShowPlayerDialogEx(playerid, BUYTOYS3, DIALOG_STYLE_LIST, "Select an Item", stringg, "Buy", "Cancel");
- }
- if((dialogid == BUYTOYS3) && response)
- {
- if(GetPlayerCash(playerid) < HoldingObjects[listitem][holdingprice])
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "* You can't afford that!");
- }
- else
- {
- GivePlayerCash(playerid, -HoldingObjects[listitem][holdingprice]);
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptModelID] = HoldingObjects[listitem][holdingmodelid];
- new modelid = PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptModelID];
- if((modelid >= 19006 && modelid <= 19035) || (modelid >= 19138 && modelid <= 19140))
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.9;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.35;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else if(modelid >= 18891 && modelid <= 18910)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.15;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 90.0;
- }
- else if(modelid >= 18926 && modelid <= 18935)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.1;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else if(modelid >= 18911 && modelid <= 18920)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.1;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.035;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 90.0;
- }
- else if(modelid == 19078 || modelid == 19078)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 16;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else if((modelid >= 18641 && modelid <= 18644) || (modelid >= 19080 && modelid <= 19084) || modelid == 18890)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 6;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptScaleX] = 1.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptScaleY] = 1.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptScaleZ] = 1.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptTradable] = 1;
- g_mysql_NewToy(playerid, GetPVarInt(playerid, "ToySlot"));
- format(string, sizeof(string), "* You have purchased %s for $%d (Slot: %d)", HoldingObjects[listitem][holdingmodelname], HoldingObjects[listitem][holdingprice], GetPVarInt(playerid, "ToySlot"));
- SendClientMessageEx(playerid, COLOR_RED, string);
- SendClientMessageEx(playerid, COLOR_WHITE, "HINT: Use /toys to wear/edit this");
- }
- }
- if((dialogid == TOYS) && response)
- {
- szMiscArray[0] = 0;
- new icount = GetPlayerToySlots(playerid);
- for(new x;x<icount;x++)
- {
- new name[24];
- format(name, sizeof(name), "None");
- for(new i;i<sizeof(HoldingObjectsAll);i++)
- {
- if(HoldingObjectsAll[i][holdingmodelid] == PlayerToyInfo[playerid][x][ptModelID])
- {
- format(name, sizeof(name), "%s", HoldingObjectsAll[i][holdingmodelname]);
- }
- }
- if(PlayerToyInfo[playerid][x][ptModelID] != 0 && (strcmp(name, "None", true) == 0))
- {
- format(name, sizeof(name), "ID: %d", PlayerToyInfo[playerid][x][ptModelID]);
- }
- format(szMiscArray, sizeof(szMiscArray), "%s(%d) %s (Bone: %s)\n", szMiscArray, x+1, name, HoldingBones[PlayerToyInfo[playerid][x][ptBone]]); // x+1 Since the toys list starts of from 1( As players see it )
- }
- format(szMiscArray, sizeof(szMiscArray), "%s\n{40FFFF}Additional Toy Slot {FFD700}(Credits: %s){A9C4E4}", szMiscArray, number_format(ShopItems[28][sItemPrice]));
- switch(listitem) {
- case 0:
- ShowPlayerDialogEx(playerid, WEARTOY, DIALOG_STYLE_LIST, "Select a Toy", szMiscArray, "Select", "Cancel");
- case 1:
- ShowPlayerDialogEx(playerid, EDITTOYS, DIALOG_STYLE_LIST, "Select a Toy", szMiscArray, "Select", "Cancel");
- case 2:
- ShowPlayerDialogEx(playerid, DELETETOY, DIALOG_STYLE_LIST, "Select a Toy", szMiscArray, "Delete", "Cancel");
- }
- }
- if((dialogid == EDITTOYS) && response)
- {
- /*new toycount = GetFreeToySlot(playerid);
- if(toycount >= 10) return SendClientMessageEx(playerid, COLOR_GRAD1, "You currently have 10 objects attached, please deattach an object.");*/
- if(listitem >= GetPlayerToySlots(playerid))
- {
- new szstring[128];
- SetPVarInt(playerid, "MiscShop", 8);
- format(szstring, sizeof(szstring), "Additional Toy Slot\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[28][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[28][sItemPrice]));
- return ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Additional Toy Slot", szstring, "Purchase", "Cancel");
- }
- else if(PlayerToyInfo[playerid][listitem][ptModelID] == 0 && listitem < GetPlayerToySlots(playerid))
- {
- ShowPlayerDialogEx(playerid, 0, DIALOG_STYLE_MSGBOX, "Edit your toy", "Woops! You don't have anything to edit in that slot.", "Okay", "");
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "{AA3333}HINT:{FFFF00} Position your camera differently to better see where your editing.");
- SetPVarInt(playerid, "ToySlot", listitem);
- ShowEditMenu(playerid);
- }
- }
- if((dialogid == EDITTOYS2)) {
- if(response) switch(listitem) {
- case 0: ShowPlayerDialogEx(playerid, EDITTOYSBONE, DIALOG_STYLE_LIST, "Select a Bone", "Spine\nHead\nLeft upper arm\nRight upper arm\nLeft hand\nRight hand\nLeft thigh\nRight thigh\nLeft foot\nRight foot\nRight calf\nLeft calf\nLeft forearm\nRight forearm\nLeft clavicle\nRight clavicle\nNeck\nJaw", "Select", "Cancel");
- case 1:
- {
- for(new i; i < 10; i++)
- {
- if(PlayerHoldingObject[playerid][i] == GetPVarInt(playerid, "ToySlot"))
- {
- EditAttachedObject(playerid, i);
- break;
- }
- }
- SendClientMessage(playerid, COLOR_WHITE, "HINT: Hold {8000FF}~k~~PED_SPRINT~ {FFFFAA}to move your camera, press escape to cancel");
- }
- case 2:
- {
- new szstring[128];
- if(PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptAutoAttach] == -2) format(szstring, sizeof(szstring), "Select an auto-attach option (Currently Disabled)");
- else if(PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptAutoAttach] == -1) format(szstring, sizeof(szstring), "Select an auto-attach option (Currently: All Skins)");
- else format(szstring, sizeof(szstring), "Select an auto-attach option (Currently: Skin %d)", GetPlayerSkin(playerid));
- ShowPlayerDialogEx(playerid, EDITTOYSAUTOATTACH, DIALOG_STYLE_LIST, szstring, "Attach to any skin\nAttach to current skin\nDisable auto-attachment", "Select", "Cancel");
- }
- }
- else
- {
- szMiscArray[0] = 0;
- new icount = GetPlayerToySlots(playerid);
- if(PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptSpecial] == 2) for(new i; i < 10; i++) {
- if(PlayerHoldingObject[playerid][i] == GetPVarInt(playerid, "ToySlot")) {
- PlayerHoldingObject[playerid][i] = 0;
- RemovePlayerAttachedObject(playerid, i);
- SendClientMessageEx(playerid, COLOR_GRAD1, "You may only wear this toy with /helmet.");
- break;
- }
- }
- for(new x;x<icount;x++)
- {
- new name[24];
- format(name, sizeof(name), "None");
- for(new i;i<sizeof(HoldingObjectsAll);i++)
- {
- if(HoldingObjectsAll[i][holdingmodelid] == PlayerToyInfo[playerid][x][ptModelID])
- {
- format(name, sizeof(name), "%s", HoldingObjectsAll[i][holdingmodelname]);
- }
- }
- if(PlayerToyInfo[playerid][x][ptModelID] != 0 && (strcmp(name, "None", true) == 0))
- {
- format(name, sizeof(name), "ID: %d", PlayerToyInfo[playerid][x][ptModelID]);
- }
- format(szMiscArray, sizeof(szMiscArray), "%s(%d) %s (Bone: %s)\n", szMiscArray, x+1, name, HoldingBones[PlayerToyInfo[playerid][x][ptBone]]); // x+1 since toys list starts off from 1 (From players view)
- }
- format(szMiscArray, sizeof(szMiscArray), "%s\n{40FFFF}Additional Toy Slot {FFD700}(Credits: %s){A9C4E4}", szMiscArray, number_format(ShopItems[28][sItemPrice]));
- ShowPlayerDialogEx(playerid, EDITTOYS, DIALOG_STYLE_LIST, "Select a Toy", szMiscArray, "Select", "Cancel");
- }
- }
- if(dialogid == EDITTOYSBONE)
- {
- if(response)
- {
- if(PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptSpecial] == 2)
- SendClientMessageEx(playerid, COLOR_GRAD2, "This toy is limited to be attached to the head only.");
- else {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = listitem+1;
- g_mysql_SaveToys(playerid,GetPVarInt(playerid, "ToySlot"));
- }
- }
- ShowEditMenu(playerid);
- }
- if(dialogid == EDITTOYSAUTOATTACH)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptAutoAttach] = -1;
- g_mysql_SaveToys(playerid,GetPVarInt(playerid, "ToySlot"));
- }
- case 1:
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptAutoAttach] = GetPlayerSkin(playerid);
- g_mysql_SaveToys(playerid,GetPVarInt(playerid, "ToySlot"));
- }
- case 2:
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptAutoAttach] = -2;
- g_mysql_SaveToys(playerid,GetPVarInt(playerid, "ToySlot"));
- }
- }
- }
- ShowEditMenu(playerid);
- }
- if(dialogid == SELLTOY)
- {
- if(response)
- {
- new buyerid = GetPVarInt(playerid, "ttBuyer"),
- cost = GetPVarInt(playerid, "ttCost");
- if(PlayerToyInfo[playerid][listitem][ptModelID] == 0) {
- DeletePVar(buyerid, "ttSeller");
- DeletePVar(playerid, "ttCost");
- DeletePVar(playerid, "ttBuyer");
- ShowPlayerDialogEx(playerid, 0, DIALOG_STYLE_MSGBOX, "Sell your toy", "Woops! You don't have anything to sell from that slot.", "Okay", "");
- }
- if(PlayerToyInfo[playerid][listitem][ptTradable] == 0) {
- SendClientMessageEx(playerid, COLOR_GREY, "This toy isn't tradable.");
- DeletePVar(buyerid, "ttSeller");
- DeletePVar(playerid, "ttCost");
- return DeletePVar(playerid, "ttBuyer");
- }
- if(!IsPlayerAttachedObjectSlotUsed(playerid, listitem))
- {
- new szmessage[128], name[24],
- toyid = PlayerToyInfo[playerid][listitem][ptModelID];
- format(name, sizeof(name), "None");
- for(new i;i<sizeof(HoldingObjectsAll);i++)
- {
- if(HoldingObjectsAll[i][holdingmodelid] == toyid)
- {
- format(name, sizeof(name), "(%s)", HoldingObjectsAll[i][holdingmodelname]);
- }
- }
- if(PlayerToyInfo[playerid][listitem][ptModelID] != 0 && (strcmp(name, "None", true) == 0))
- {
- format(name, sizeof(name), "(ID: %d)", toyid);
- }
- format(szmessage, sizeof(szmessage), "You have offered %s to purchase your toy. %s", GetPlayerNameEx(buyerid), name);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, szmessage);
- SetPVarInt(playerid, "ttToy", toyid);
- SetPVarInt(playerid, "ttToySlot", listitem);
- PrepTradeToysGUI(buyerid, playerid, cost, toyid);
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, "You currently have this toy attached, please deattach it and try again.");
- DeletePVar(buyerid, "ttSeller");
- DeletePVar(playerid, "ttCost");
- DeletePVar(playerid, "ttSeller");
- }
- }
- else
- {
- SetPVarInt(playerid, "ttSeller", INVALID_PLAYER_ID);
- SetPVarInt(playerid, "ttCost", 0);
- SetPVarInt(playerid, "ttSeller", INVALID_PLAYER_ID);
- }
- }
- if(dialogid == CONFIRMSELLTOY)
- {
- if(response) {
- CompleteToyTrade(playerid);
- }
- else {
- format(szMiscArray, sizeof(szMiscArray), "%s has declined the toy offer.", GetPlayerNameEx(playerid));
- SendClientMessageEx(GetPVarInt(playerid, "ttSeller"), COLOR_GREY, szMiscArray);
- SendClientMessageEx(playerid, COLOR_GREY, "You have declined the toy offer.");
- DeletePVar(GetPVarInt(playerid, "ttSeller"), "ttBuyer");
- DeletePVar(GetPVarInt(playerid, "ttSeller"), "ttCost");
- DeletePVar(playerid, "ttSeller");
- HideTradeToysGUI(playerid);
- }
- }
- if((dialogid == WEARTOY) && response)
- {
- //if(PlayerToyInfo[playerid][listitem][ptModelID] == 0)
- if(listitem >= GetPlayerToySlots(playerid))
- {
- SetPVarInt(playerid, "MiscShop", 8);
- format(szMiscArray, sizeof(szMiscArray), "Additional Toy Slot\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[28][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[28][sItemPrice]));
- return ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Additional Toy Slot", szMiscArray, "Purchase", "Cancel");
- }
- else if(PlayerToyInfo[playerid][listitem][ptModelID] == 0 && listitem < GetPlayerToySlots(playerid))
- {
- ShowPlayerDialogEx(playerid, 0, DIALOG_STYLE_MSGBOX, "Wear your toy", "Woops! You don't have anything to wear from that slot.", "Okay", "");
- }
- else if(PlayerToyInfo[playerid][listitem][ptSpecial] == 2)
- {
- ShowPlayerDialogEx(playerid, 0, DIALOG_STYLE_MSGBOX, "Wear your toy", "You may only wear this toy with /helmet.", "Okay", "");
- }
- else
- {
- new toys = 99999;
- for(new i; i < 10; i++)
- {
- if(PlayerHoldingObject[playerid][i] == listitem)
- {
- toys = i;
- break;
- }
- }
- if(IsPlayerAttachedObjectSlotUsed(playerid, toys))
- {
- new name[24];
- format(name, sizeof(name), "None");
- for(new i;i<sizeof(HoldingObjectsAll);i++)
- {
- if(HoldingObjectsAll[i][holdingmodelid] == PlayerToyInfo[playerid][listitem][ptModelID])
- {
- format(name, sizeof(name), "%s", HoldingObjectsAll[i][holdingmodelname]);
- }
- }
- format(string, sizeof(string), "Successfully dettached %s (Bone: %s) (Slot: %d)", name, HoldingBones[PlayerToyInfo[playerid][listitem][ptBone]], listitem);
- SendClientMessageEx(playerid, COLOR_RED, string);
- RemovePlayerAttachedObject(playerid, toys);
- for(new i; i < 10; i++)
- {
- if(PlayerHoldingObject[playerid][i] == listitem)
- {
- PlayerHoldingObject[playerid][i] = 0;
- break;
- }
- }
- }
- else AttachToy(playerid, listitem);
- }
- }
- if((dialogid == DELETETOY) && response)
- {
- new toys = 99999;
- for(new i; i < 10; i++)
- {
- if(PlayerHoldingObject[playerid][i] == listitem)
- {
- toys = i;
- if(IsPlayerAttachedObjectSlotUsed(playerid, toys))
- {
- PlayerHoldingObject[playerid][i] = 0;
- RemovePlayerAttachedObject(playerid, toys);
- }
- break;
- }
- }
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "DELETE FROM `toys` WHERE `id` = '%d'", PlayerToyInfo[playerid][listitem][ptID]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "ii", SENDDATA_THREAD, playerid);
- PlayerToyInfo[playerid][listitem][ptID] = 0;
- PlayerToyInfo[playerid][listitem][ptModelID] = 0;
- PlayerToyInfo[playerid][listitem][ptBone] = 0;
- if(PlayerToyInfo[playerid][listitem][ptSpecial] != 0)
- {
- PlayerToyInfo[playerid][listitem][ptSpecial] = 0;
- }
- format(string, sizeof(string), "You have deleted your toy in slot %d.", listitem);
- ShowPlayerDialogEx(playerid, 0, DIALOG_STYLE_MSGBOX, "Toy Menu", string, "OK", "");
- }
- if((dialogid == LAELEVATORPASS) && response)
- {
- listitem = GetPVarInt(playerid, "ElevatorFloorPick");
- if(FloorRequestedBy[listitem] != INVALID_PLAYER_ID || IsFloorInQueue(listitem))
- GameTextForPlayer(playerid, "~r~The floor is already in the queue", 3500, 4);
- else if(DidPlayerRequestElevator(playerid))
- GameTextForPlayer(playerid, "~r~You already requested the elevator", 3500, 4);
- else
- {
- if(strfind(inputtext, "hats", true) == 0 && IsAHitman(playerid))
- {
- CallElevator(playerid, 20);
- }
- else if(strfind(inputtext, LAElevatorFloorData[1][listitem], true) == 0)
- {
- CallElevator(playerid, listitem);
- }
- else
- {
- GameTextForPlayer(playerid, "~r~Invalid Password", 3500, 4);
- }
- }
- }
- if((dialogid == LAELEVATOR) && response)
- {
- if(FloorRequestedBy[listitem] != INVALID_PLAYER_ID || IsFloorInQueue(listitem))
- GameTextForPlayer(playerid, "~r~The floor is already in the queue", 3500, 4);
- else if(DidPlayerRequestElevator(playerid))
- GameTextForPlayer(playerid, "~r~You already requested the elevator", 3500, 4);
- else
- {
- if(strlen(LAElevatorFloorData[1][listitem]) > 0)
- {
- SetPVarInt(playerid, "ElevatorFloorPick", listitem);
- ShowPlayerDialogEx(playerid, LAELEVATORPASS, DIALOG_STYLE_INPUT, "Elevator", "Enter the password for this level", "Enter", "Cancel");
- }
- else
- {
- CallElevator(playerid, listitem);
- }
- }
- return 1;
- }
- if((dialogid == AUDIO_URL) && response) // /audiourl
- {
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pASM] >= 1)
- {
- new range = GetPVarInt(playerid, "aURLrange");
- new Float:aX, Float:aY, Float:aZ;
- GetPlayerPos(playerid, aX, aY, aZ);
- //SendAudioURLToRange(inputtext,aX,aY,aZ,range);
- format(audiourlurl, sizeof(audiourlurl), "%s", inputtext);
- SetGVarInt("MusicArea", CreateDynamicSphere(aX, aY, aZ, range, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid)));
- if(range > 100)
- {
- format(string,sizeof(string),"{AA3333}AdmWarning{FFFF00}: %s has placed url %s - Range: %d.",GetPlayerNameEx(playerid),inputtext,range);
- ABroadCast(COLOR_YELLOW, string, 4);
- format(string, sizeof(string),"Use /audiostopurl to stop playback");
- SendClientMessage(playerid, COLOR_YELLOW, string);
- }
- else
- {
- format(string,sizeof(string),"You have placed url %s - Range: %d",inputtext,range);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- format(string, sizeof(string),"Use /audiostopurl to stop playback");
- SendClientMessage(playerid, COLOR_YELLOW, string);
- }
- }
- }
- /*if(dialogid == DIALOG_NUMBER_PLATE_CHOSEN) {
- if(response == 1) {
- for(new i = 0; i < MAX_PLAYERVEHICLES; i++) {
- if(listitem == i) {
- if(PlayerInfo[playerid][pDonateRank] > 0) {
- new
- tmpSz_NumPlate[32];
- GetPVarString(playerid, "szNumPS", tmpSz_NumPlate, sizeof(tmpSz_NumPlate));
- RegisterVehicleNumberPlate(PlayerVehicleInfo[playerid][i][pvId], tmpSz_NumPlate);
- SetPVarInt(playerid, "Cash", PlayerInfo[playerid][pCash]-80000);
- strcpy(PlayerVehicleInfo[playerid][i][pvNumberPlate], tmpSz_NumPlate, 32);
- SendClientMessageEx(playerid, COLOR_WHITE, "Your registration plate has successfully been configured.");
- }
- else {
- new
- tmpSz_NumPlate[32];
- GetPVarString(playerid, "szNumPS", tmpSz_NumPlate, sizeof(tmpSz_NumPlate));
- RegisterVehicleNumberPlate(PlayerVehicleInfo[playerid][i][pvId], tmpSz_NumPlate);
- strcpy(PlayerVehicleInfo[playerid][i][pvNumberPlate], tmpSz_NumPlate, 32);
- SetPVarInt(playerid, "Cash", PlayerInfo[playerid][pCash]-100000);
- SendClientMessageEx(playerid, COLOR_WHITE, "Your registration plate has successfully been configured.");
- }
- return 1;
- }
- }
- }
- }*/
- if(dialogid == DIALOG_NUMBER_PLATE) {
- if(response) {
- if(strlen(inputtext) < 1 || strlen(inputtext) > 8) {
- SendClientMessageEx(playerid, COLOR_WHITE, "{AA3333}ERROR:{FFFF00} You can only have a number plate that consists of 1-8 characters.");
- }
- else {
- if(strfind("XMT", inputtext, true) != -1) {
- SendClientMessageEx(playerid, COLOR_WHITE, "{AA3333}ERROR:{FFFF00} You cannot use the term \"XMT\" in your registration plate.");
- return 1;
- }
- SetPVarString(playerid, "szNumPS", inputtext);
- new
- vstring[1024]; // ew, another 4096 bytes of memory down the drain
- for(new i = 0; i < MAX_PLAYERVEHICLES; i++)
- {
- if(PlayerVehicleInfo[playerid][i][pvId] != INVALID_PLAYER_VEHICLE_ID)
- {
- format(vstring, sizeof(vstring), "%s\n%s", vstring, GetVehicleName(PlayerVehicleInfo[playerid][i][pvId]));
- }
- else
- {
- format(vstring, sizeof(vstring), "%s\nEmpty", vstring);
- }
- }
- ShowPlayerDialogEx(playerid, DIALOG_NUMBER_PLATE_CHOSEN, DIALOG_STYLE_LIST, "Registration plate selection", vstring, "Select", "Cancel");
- }
- }
- /*if(PlayerInfo[playerid][pDonateRank] > 0) {
- PlayerInfo[playerid][pMoney] -= 80000;
- SendClientMessageEx(playerid, COLOR_WHITE, "Your new number plate has been configured!");
- RegisterVehicleNumberPlate();
- }
- else {
- PlayerInfo[playerid][pMoney] -= 100000;
- SendClientMessageEx(playerid, COLOR_WHITE, "Your new number plate has been configured!");
- RegisterVehicleNumberPlate();
- }*/
- }
- if(dialogid == NMUTE)
- {
- if(response == 1)
- {
- switch(listitem)
- {
- case 0: // Jailtime
- {
- if(PlayerInfo[playerid][pNMuteTotal] < 4)
- {
- if(GetPVarType(playerid, "IsInArena"))
- {
- LeavePaintballArena(playerid, GetPVarInt(playerid, "IsInArena"));
- }
- PlayerInfo[playerid][pNMute] = 0;
- ResetPlayerWeaponsEx(playerid);
- PlayerInfo[playerid][pJailTime] += PlayerInfo[playerid][pNMuteTotal]*15*60;
- strcpy(PlayerInfo[playerid][pPrisonReason], "[OOC] NMute Prison", 128);
- PhoneOnline[playerid] = 1;
- SetPlayerInterior(playerid, 1);
- PlayerInfo[playerid][pInt] = 1;
- new rand = random(sizeof(OOCPrisonSpawns));
- Streamer_UpdateEx(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2]);
- SetPlayerPos(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2]);
- SetPlayerSkin(playerid, 50);
- SetPlayerColor(playerid, TEAM_APRISON_COLOR);
- Player_StreamPrep(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2], FREEZE_TIME);
- }
- else if(PlayerInfo[playerid][pNMuteTotal] >= 4 || PlayerInfo[playerid][pNMuteTotal] < 7)
- {
- if(GetPVarType(playerid, "IsInArena"))
- {
- LeavePaintballArena(playerid, GetPVarInt(playerid, "IsInArena"));
- }
- PlayerInfo[playerid][pNMute] = 0;
- GameTextForPlayer(playerid, "~w~Welcome to ~n~~r~Fort DeMorgan", 5000, 3);
- ResetPlayerWeaponsEx(playerid);
- PlayerInfo[playerid][pJailTime] += PlayerInfo[playerid][pNMuteTotal]*15*60;
- PhoneOnline[playerid] = 1;
- SetPlayerInterior(playerid, 1);
- PlayerInfo[playerid][pInt] = 1;
- new rand = random(sizeof(OOCPrisonSpawns));
- Streamer_UpdateEx(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2]);
- SetPlayerPos(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2]);
- SetPlayerSkin(playerid, 50);
- SetPlayerColor(playerid, TEAM_APRISON_COLOR);
- Player_StreamPrep(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2], FREEZE_TIME);
- }
- strcpy(PlayerInfo[playerid][pPrisonReason], "[OOC][NEWB-UNMUTE]", 128);
- format(string,sizeof(string),"{AA3333}AdmWarning{FFFF00}: %s is serving %d Minutes in Jail/Prison for Newbie Unmute.",GetPlayerNameEx(playerid),PlayerInfo[playerid][pNMuteTotal]*15);
- ABroadCast(COLOR_YELLOW,string,2);
- }
- case 1: // Fine
- {
- new playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername, sizeof(playername));
- new totalwealth = PlayerInfo[playerid][pAccount] + GetPlayerCash(playerid);
- if(PlayerInfo[playerid][pPhousekey] != INVALID_HOUSE_ID && HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwnerID] == GetPlayerSQLId(playerid)) totalwealth += HouseInfo[PlayerInfo[playerid][pPhousekey]][hSafeMoney];
- if(PlayerInfo[playerid][pPhousekey2] != INVALID_HOUSE_ID && HouseInfo[PlayerInfo[playerid][pPhousekey2]][hOwnerID] == GetPlayerSQLId(playerid)) totalwealth += HouseInfo[PlayerInfo[playerid][pPhousekey2]][hSafeMoney];
- if(PlayerInfo[playerid][pPhousekey3] != INVALID_HOUSE_ID && HouseInfo[PlayerInfo[playerid][pPhousekey3]][hOwnerID] == GetPlayerSQLId(playerid)) totalwealth += HouseInfo[PlayerInfo[playerid][pPhousekey3]][hSafeMoney];
- new fine = 10 * totalwealth / 100;
- if(GetPlayerCash(playerid) < fine || totalwealth < 0)
- {
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has declined the Newbie Unmute (Insufficient Funds).", GetPlayerNameEx(playerid));
- ABroadCast(COLOR_YELLOW, string, 2);
- return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot afford an unmute!");
- }
- format(string,sizeof(string),"{AA3333}AdmWarning{FFFF00}: %s has paid a $%d fine for Newbie Chat Unmute.",GetPlayerNameEx(playerid),fine);
- GivePlayerCash(playerid,-fine);
- ABroadCast(COLOR_YELLOW,string,2);
- PlayerInfo[playerid][pNMute] = 0;
- }
- }
- }
- else
- {
- format(string,sizeof(string),"{AA3333}AdmWarning{FFFF00}: %s has canceled punishment for Newbie Chat Unmute.",GetPlayerNameEx(playerid));
- ABroadCast(COLOR_YELLOW,string,2);
- }
- }
- if(dialogid == ADMUTE)
- {
- if(response == 1)
- {
- switch(listitem)
- {
- case 0: // Jailtime
- {
- if(PlayerInfo[playerid][pADMuteTotal] < 4)
- {
- if(GetPVarType(playerid, "IsInArena"))
- {
- LeavePaintballArena(playerid, GetPVarInt(playerid, "IsInArena"));
- }
- PlayerInfo[playerid][pADMute] = 0;
- ResetPlayerWeaponsEx(playerid);
- PlayerInfo[playerid][pJailTime] += PlayerInfo[playerid][pADMuteTotal]*15*60;
- PhoneOnline[playerid] = 1;
- SetPlayerInterior(playerid, 1);
- PlayerInfo[playerid][pInt] = 1;
- new rand = random(sizeof(OOCPrisonSpawns));
- Streamer_UpdateEx(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2]);
- SetPlayerPos(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2]);
- SetPlayerSkin(playerid, 50);
- SetPlayerColor(playerid, TEAM_APRISON_COLOR);
- Player_StreamPrep(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2], FREEZE_TIME);
- }
- else if(PlayerInfo[playerid][pADMuteTotal] >= 4 || PlayerInfo[playerid][pADMuteTotal] < 7)
- {
- if(GetPVarType(playerid, "IsInArena"))
- {
- LeavePaintballArena(playerid, GetPVarInt(playerid, "IsInArena"));
- }
- PlayerInfo[playerid][pADMute] = 0;
- GameTextForPlayer(playerid, "~w~Welcome to ~n~~r~Fort DeMorgan", 5000, 3);
- ResetPlayerWeaponsEx(playerid);
- PlayerInfo[playerid][pJailTime] += PlayerInfo[playerid][pADMuteTotal]*15*60;
- PhoneOnline[playerid] = 1;
- SetPlayerInterior(playerid, 1);
- PlayerInfo[playerid][pInt] = 1;
- new rand = random(sizeof(OOCPrisonSpawns));
- Streamer_UpdateEx(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2]);
- SetPlayerPos(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2]);
- SetPlayerSkin(playerid, 50);
- SetPlayerColor(playerid, TEAM_APRISON_COLOR);
- Player_StreamPrep(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2], FREEZE_TIME);
- }
- strcpy(PlayerInfo[playerid][pPrisonReason], "[OOC][AD-UNMUTE]", 128);
- format(string,sizeof(string),"{AA3333}AdmWarning{FFFF00}: %s is serving %d Minutes in Jail/Prison for Advertisement Unmute.",GetPlayerNameEx(playerid),PlayerInfo[playerid][pADMuteTotal]*15);
- ABroadCast(COLOR_YELLOW,string,2);
- }
- case 1: // Fine
- {
- new playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername, sizeof(playername));
- new totalwealth = PlayerInfo[playerid][pAccount] + GetPlayerCash(playerid);
- if(PlayerInfo[playerid][pPhousekey] != INVALID_HOUSE_ID && HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwnerID] == GetPlayerSQLId(playerid)) totalwealth += HouseInfo[PlayerInfo[playerid][pPhousekey]][hSafeMoney];
- if(PlayerInfo[playerid][pPhousekey2] != INVALID_HOUSE_ID && HouseInfo[PlayerInfo[playerid][pPhousekey2]][hOwnerID] == GetPlayerSQLId(playerid)) totalwealth += HouseInfo[PlayerInfo[playerid][pPhousekey2]][hSafeMoney];
- if(PlayerInfo[playerid][pPhousekey3] != INVALID_HOUSE_ID && HouseInfo[PlayerInfo[playerid][pPhousekey3]][hOwnerID] == GetPlayerSQLId(playerid)) totalwealth += HouseInfo[PlayerInfo[playerid][pPhousekey3]][hSafeMoney];
- new fine = 10 * totalwealth / 100;
- if(GetPlayerCash(playerid) < fine)
- {
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has declined the Advertisement Unmute (Insufficient Funds).", GetPlayerNameEx(playerid));
- ABroadCast(COLOR_YELLOW, string, 2);
- return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot afford an unmute!");
- }
- PlayerInfo[playerid][pADMute] = 0;
- format(string,sizeof(string),"{AA3333}AdmWarning{FFFF00}: %s has paid a $%d fine for Advertisement Unmute.",GetPlayerNameEx(playerid),fine);
- GivePlayerCash(playerid,-fine);
- ABroadCast(COLOR_YELLOW,string,2);
- }
- }
- }
- else
- {
- format(string,sizeof(string),"{AA3333}AdmWarning{FFFF00}: %s has canceled punishment for Advertisement Unmute.",GetPlayerNameEx(playerid));
- ABroadCast(COLOR_YELLOW,string,2);
- }
- }
- if(dialogid == RTONEMENU) // Ringtone Menu
- {
- if(response == 1)
- {
- switch(listitem)
- {
- case 0:
- {
- PlayerInfo[playerid][pRingtone] = 1;
- //SendAudioToPlayer(playerid, 51, 100);
- }
- case 1:
- {
- PlayerInfo[playerid][pRingtone] = 2;
- //SendAudioToPlayer(playerid, 52, 100);
- }
- case 2:
- {
- PlayerInfo[playerid][pRingtone] = 3;
- //SendAudioToPlayer(playerid, 53, 100);
- }
- case 3:
- {
- PlayerInfo[playerid][pRingtone] = 4;
- //SendAudioToPlayer(playerid, 54, 100);
- }
- case 4:
- {
- PlayerInfo[playerid][pRingtone] = 5;
- //SendAudioToPlayer(playerid, 55, 100);
- }
- case 5:
- {
- PlayerInfo[playerid][pRingtone] = 6;
- //SendAudioToPlayer(playerid, 56, 100);
- }
- case 6:
- {
- PlayerInfo[playerid][pRingtone] = 7;
- //SendAudioToPlayer(playerid, 57, 100);
- }
- case 7:
- {
- PlayerInfo[playerid][pRingtone] = 8;
- //SendAudioToPlayer(playerid, 58, 100);
- }
- case 8:
- {
- PlayerInfo[playerid][pRingtone] = 9;
- //SendAudioToPlayer(playerid, 59, 100);
- }
- case 9:
- {
- PlayerInfo[playerid][pRingtone] = 0;
- }
- }
- RemovePlayerAttachedObject(playerid, 8);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
- }
- }
- if(dialogid == MAINMENU || dialogid == MAINMENU2)
- {
- if(response == 0)
- {
- SendClientMessage(playerid, COLOR_RED, "SERVER: You have been kicked out automatically.");
- SetTimerEx("KickEx", 1000, 0, "i", playerid);
- }
- else if(dialogid == MAINMENU)
- {
- if(!isnull(inputtext) && strlen(inputtext) <= 64 && gPlayerLogged{playerid} == 0)
- {
- SetPVarString(playerid, "PassAuth", inputtext);
- g_mysql_AccountLoginCheck(playerid);
- }
- else
- {
- ShowMainMenuDialog(playerid, 1);
- }
- }
- else if(dialogid == MAINMENU2)
- {
- if(PassComplexCheck && CheckPasswordComplexity(inputtext) != 1) return ShowMainMenuDialog(playerid, 2);
- if(!isnull(inputtext) && strlen(inputtext) <= 64)
- {
- SetPVarString(playerid, "PassAuth", inputtext);
- g_mysql_CreateAccount(playerid, inputtext);
- }
- else ShowMainMenuDialog(playerid, 2);
- }
- return 1;
- }
- if(dialogid == MAINMENU3)
- {
- Kick(playerid);
- }
- if (dialogid == ELEVATOR3 && response)
- {
- if (listitem == 0)
- {
- SetPlayerPos(playerid, 1564.8, -1666.2, 28.3);
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pVW] = 0;
- SetPlayerVirtualWorld(playerid, 0);
- }
- else
- {
- SetPlayerPos(playerid, 1568.6676, -1689.9708, 6.2188);
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pVW] = 0;
- SetPlayerVirtualWorld(playerid, 0);
- }
- }
- if (dialogid == ELEVATOR && response)
- {
- if (listitem == 0)
- {
- SetPlayerPos(playerid, 276.0980, 122.1232, 1004.6172);
- SetPlayerInterior(playerid, 10);
- PlayerInfo[playerid][pVW] = 133337;
- SetPlayerVirtualWorld(playerid, 133337);
- }
- else
- {
- SetPlayerPos(playerid, 1568.6676, -1689.9708, 6.2188);
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pVW] = 0;
- SetPlayerVirtualWorld(playerid, 0);
- }
- }
- if (dialogid == ELEVATOR2 && response)
- {
- if (listitem == 0)
- {
- SetPlayerPos(playerid, 1564.8, -1666.2, 28.3);
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pVW] = 0;
- SetPlayerVirtualWorld(playerid, 0);
- }
- else
- {
- SetPlayerPos(playerid, 276.0980, 122.1232, 1004.6172);
- SetPlayerInterior(playerid, 10);
- PlayerInfo[playerid][pVW] = 133337;
- SetPlayerVirtualWorld(playerid, 133337);
- }
- }
- if(dialogid == VIPNUMMENU)
- {
- if(response)
- {
- new numberstr = -abs(strval(inputtext));
- if(!(1 < strlen(inputtext) < 9) || strval(inputtext) == 0) { return ShowPlayerDialogEx(playerid, VIPNUMMENU, DIALOG_STYLE_INPUT, "Error", "The phone number can only be between 2 and 8 digits long. Please input a new number below", "Submit", "Cancel"); }
- new query[128];
- new numb[16];
- format(numb, sizeof(numb), "%d", numberstr);
- new checkmon = GetPlayerCash(playerid);
- if(PlayerInfo[playerid][pPnumber] == numberstr)
- {
- SendClientMessageEx(playerid,COLOR_GREY," Cannot change to your existing number");
- return 1;
- }
- if(strlen(numb) == 2) return ShowPlayerDialogEx(playerid, VIPNUMMENU, DIALOG_STYLE_INPUT, "Error", "The phone number can only be between 2 and 10 digits long. Please input a new number below", "Submit", "Cancel");
- if(strlen(numb) == 3)
- {
- new iCheck = abs(checkmon * 30/100);
- if(GetPlayerCash(playerid) <= iCheck)
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "You don't have enough money for the phone number!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 1000000)
- {
- SetPVarInt(playerid, "WantedPh", numberstr);
- SetPVarInt(playerid, "CurrentPh", PlayerInfo[playerid][pPnumber]);
- SetPVarInt(playerid, "PhChangeCost", iCheck);
- mysql_format(MainPipeline, query, sizeof(query), "SELECT `Username` FROM `accounts` WHERE `PhoneNr` = '%d'", numberstr);
- mysql_tquery(MainPipeline, query, "OnPhoneNumberCheck", "ii", playerid, 1);
- return 1;
- }
- else if(GetPlayerCash(playerid) >= 300000 && GetPlayerCash(playerid) < 1000000)
- {
- SetPVarInt(playerid, "WantedPh", numberstr);
- SetPVarInt(playerid, "CurrentPh", PlayerInfo[playerid][pPnumber]);
- SetPVarInt(playerid, "PhChangeCost", 300000);
- mysql_format(MainPipeline, query, sizeof(query), "SELECT `Username` FROM `accounts` WHERE `PhoneNr` = '%d'",numberstr);
- mysql_tquery(MainPipeline, query, "OnPhoneNumberCheck", "ii", playerid, 1);
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid,COLOR_GREY," You do not have enough money to purchase a negative 2 digit number, try again.");
- return 1;
- }
- }
- else if(strlen(numb) == 4)
- {
- new iCheck = abs(checkmon * 20/100);
- if(GetPlayerCash(playerid) <= iCheck)
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "You don't have enough money for the phone number!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 1000000)
- {
- SetPVarInt(playerid, "WantedPh", numberstr);
- SetPVarInt(playerid, "CurrentPh", PlayerInfo[playerid][pPnumber]);
- SetPVarInt(playerid, "PhChangeCost", iCheck);
- mysql_format(MainPipeline, query, sizeof(query), "SELECT `Username` FROM `accounts` WHERE `PhoneNr` = '%d'",numberstr);
- mysql_tquery(MainPipeline, query, "OnPhoneNumberCheck", "ii", playerid, 1);
- return 1;
- }
- else if(GetPlayerCash(playerid) >= 200000 && GetPlayerCash(playerid) < 1000000)
- {
- SetPVarInt(playerid, "WantedPh", numberstr);
- SetPVarInt(playerid, "CurrentPh", PlayerInfo[playerid][pPnumber]);
- SetPVarInt(playerid, "PhChangeCost", 200000);
- mysql_format(MainPipeline, query, sizeof(query), "SELECT `Username` FROM `accounts` WHERE `PhoneNr` = '%d'",numberstr);
- mysql_tquery(MainPipeline, query, "OnPhoneNumberCheck", "ii", playerid, 1);
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid,COLOR_GREY," You do not have enough money to purchase a negative 3 digit number, try again.");
- return 1;
- }
- }
- else if(strlen(numb) >= 5 && strlen(numb) <= 9)
- {
- new iCheck = abs(checkmon * 10/100);
- if(GetPlayerCash(playerid) <= iCheck)
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "You don't have enough money for the phone number!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 500000)
- {
- SetPVarInt(playerid, "WantedPh", numberstr);
- SetPVarInt(playerid, "CurrentPh", PlayerInfo[playerid][pPnumber]);
- SetPVarInt(playerid, "PhChangeCost", iCheck);
- mysql_format(MainPipeline, query, sizeof(query), "SELECT `Username` FROM `accounts` WHERE `PhoneNr` = '%d'",numberstr);
- mysql_tquery(MainPipeline, query, "OnPhoneNumberCheck", "ii", playerid, 1);
- return 1;
- }
- else if(GetPlayerCash(playerid) >= 50000 && GetPlayerCash(playerid) < 500000)
- {
- SetPVarInt(playerid, "WantedPh", numberstr);
- SetPVarInt(playerid, "CurrentPh", PlayerInfo[playerid][pPnumber]);
- SetPVarInt(playerid, "PhChangeCost", 50000);
- mysql_format(MainPipeline, query, sizeof(query), "SELECT `Username` FROM `accounts` WHERE `PhoneNr` = '%d'",numberstr);
- mysql_tquery(MainPipeline, query, "OnPhoneNumberCheck", "ii", playerid, 1);
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid,COLOR_GREY," You do not have enough money to purchase a negative 2 digit number, try again.");
- return 1;
- }
- }
- else return SendClientMessageEx(playerid,COLOR_GREY," Unable to change your number!");
- }
- else
- {
- SendClientMessageEx(playerid,COLOR_GREY," You chose not to change numbers.");
- }
- }
- if(dialogid == VIPNUMMENU2)
- {
- if(response)
- {
- SendClientMessageEx(playerid, COLOR_GREEN, "________________________________________________");
- SendClientMessageEx(playerid, COLOR_YELLOW, "Phone number is not being used, updating your phone number.");
- format(string,sizeof(string),"You have changed numbers from %d, to %d, and it cost $%s", GetPVarInt(playerid, "CurrentPh"), GetPVarInt(playerid, "WantedPh"), number_format(GetPVarInt(playerid, "PhChangeCost")));
- SendClientMessageEx(playerid,COLOR_GREY,string);
- PlayerInfo[playerid][pPnumber] = GetPVarInt(playerid, "WantedPh");
- new iCost = abs(GetPVarInt(playerid, "PhChangeCost"));
- GivePlayerCash(playerid, -iCost);
- mysql_format(MainPipeline, string, sizeof(string), "UPDATE `accounts` SET `PhoneNr` = %d WHERE `id` = '%d'", PlayerInfo[playerid][pPnumber], GetPlayerSQLId(playerid));
- mysql_tquery(MainPipeline, string, "OnQueryFinish", "ii", SENDDATA_THREAD, playerid);
- DeletePVar(playerid, "PhChangerId");
- DeletePVar(playerid, "WantedPh");
- DeletePVar(playerid, "PhChangeCost");
- DeletePVar(playerid, "CurrentPh");
- }
- else
- {
- SendClientMessageEx(playerid,COLOR_GREY," You chose not to change numbers.");
- DeletePVar(playerid, "PhChangerId");
- DeletePVar(playerid, "WantedPh");
- DeletePVar(playerid, "PhChangeCost");
- DeletePVar(playerid, "CurrentPh");
- }
- }
- /*if(dialogid == RENTMENU)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0://15 Minutes
- {
- if(GetPlayerCash(playerid) < 1000)
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "You don't have enough money!");
- RemovePlayerFromVehicle(playerid);
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz+1.2);
- TogglePlayerControllable(playerid,1);
- }
- else
- {
- GivePlayerCash(playerid,-1000);
- gBike[playerid] = 3;
- gBikeRenting[playerid] = 1;
- TogglePlayerControllable(playerid, 1);
- SendClientMessageEx(playerid,COLOR_GREY," You have rented a bike for 15 minutes, enjoy!");
- SetPVarInt(playerid, "RentTime", SetTimerEx("RentTimer", (1000*60)*15, true, "d", playerid));
- }
- }
- case 1: // 30 minutes
- {
- if(GetPlayerCash(playerid) < 2000)
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "You don't have enough money!");
- RemovePlayerFromVehicle(playerid);
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz+1.2);
- TogglePlayerControllable(playerid,1);
- }
- else
- {
- GivePlayerCash(playerid,-2000);
- gBike[playerid] = 6;
- gBikeRenting[playerid] = 1;
- TogglePlayerControllable(playerid, 1);
- SendClientMessageEx(playerid,COLOR_GREY," You have rented a bike for 30 minutes, enjoy!");
- SetPVarInt(playerid, "RentTime", SetTimerEx("RentTimer", (1000*60)*30, true, "d", playerid));
- }
- }
- case 2: // 1 hour
- {
- if(GetPlayerCash(playerid) < 4000)
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "You don't have enough money!");
- RemovePlayerFromVehicle(playerid);
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz+1.2);
- TogglePlayerControllable(playerid,1);
- }
- else
- {
- GivePlayerCash(playerid,-4000);
- gBike[playerid] = 12;
- gBikeRenting[playerid] = 1;
- TogglePlayerControllable(playerid, 1);
- SendClientMessageEx(playerid,COLOR_GREY," You have rented a bike for an hour, enjoy!");
- SetPVarInt(playerid, "RentTime", SetTimerEx("RentTimer", (1000*60)*60, true, "d", playerid));
- }
- }
- }
- }
- if(!response)
- {
- RemovePlayerFromVehicle(playerid);
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz+1.2);
- TogglePlayerControllable(playerid,1);
- SendClientMessageEx(playerid,COLOR_GREY," You may only use these bikes if you rent one.");
- }
- }*/
- if(dialogid == 1348)
- {
- if(response)
- {
- new
- Float: carPosF[3],
- miscid = GetPVarInt(playerid, "playeraffectedcarTP"),
- v = ListItemTrackId[playerid][listitem];
- GetVehiclePos(PlayerVehicleInfo[miscid][v][pvId], carPosF[0], carPosF[1], carPosF[2]);
- SetPlayerVirtualWorld(playerid,GetVehicleVirtualWorld(PlayerVehicleInfo[miscid][v][pvId]));
- SetPlayerPos(playerid, carPosF[0], carPosF[1], carPosF[2]);
- }
- }
- if(dialogid == GOTOPLAYERCAR)
- {
- if(response == 1)
- {
- for(new i = 0; i < MAX_PLAYERVEHICLES; i++)
- {
- if(listitem == i)
- {
- new Float: carPos[3], id = GetPVarInt(playerid, "playeraffectedcarTP");
- if(PlayerVehicleInfo[id][i][pvId] > INVALID_PLAYER_VEHICLE_ID)
- {
- GetVehiclePos(PlayerVehicleInfo[id][i][pvId], carPos[0], carPos[1], carPos[2]);
- SetPlayerVirtualWorld(playerid,GetVehicleVirtualWorld(PlayerVehicleInfo[id][i][pvId]));
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid, carPos[0], carPos[1], carPos[2]);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "You can not teleport to an empty, disabled or impounded slot.");
- }
- }
- }
- }
- }
- if(dialogid == VEHICLESTORAGE && response) {
- //if(!(400 <= PlayerVehicleInfo[playerid][listitem][pvModelId] <= 611))
- //printf("DEBUG: listitem: %d, Vehicle Slots: %d", listitem, GetPlayerVehicleSlots(playerid));
- if(listitem == GetPlayerVehicleSlots(playerid)) {
- new szstring[128];
- SetPVarInt(playerid, "MiscShop", 7);
- format(szstring, sizeof(szstring), "Additional Vehicle Slot\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[23][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[23][sItemPrice]));
- return ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Purchase a additional vehicle slot", szstring, "Purchase", "Cancel");
- }
- if(PlayerVehicleInfo[playerid][listitem][pvSpawned]) {
- new
- iVehicleID = PlayerVehicleInfo[playerid][listitem][pvId];
- if((!IsVehicleOccupied(iVehicleID) || IsPlayerInVehicle(playerid, iVehicleID)) && !IsVehicleInTow(iVehicleID) && !PlayerVehicleInfo[playerid][listitem][pvBeingPickLocked]) {
- new
- Float: vehiclehealth;
- GetVehicleHealth(iVehicleID, vehiclehealth);
- if(vehiclehealth < 800) {
- SendClientMessageEx(playerid, COLOR_WHITE, "This vehicle is too damaged to be stored.");
- }
- else if (GetPVarInt(playerid, "Refueling") == PlayerVehicleInfo[playerid][listitem][pvId])
- SendClientMessageEx(playerid, COLOR_WHITE, "You can not store a vehicle while it is being refueled.");
- else if (WheelClamp{PlayerVehicleInfo[playerid][listitem][pvId]})
- SendClientMessageEx(playerid, COLOR_WHITE, "You can not store this vehicle at this moment.");
- else {
- --PlayerCars;
- VehicleSpawned[playerid]--;
- PlayerVehicleInfo[playerid][listitem][pvSpawned] = 0;
- PlayerVehicleInfo[playerid][listitem][pvFuel] = VehicleFuel[iVehicleID];
- GetVehicleHealth(PlayerVehicleInfo[playerid][listitem][pvId], PlayerVehicleInfo[playerid][listitem][pvHealth]);
- DestroyVehicle(iVehicleID);
- if(IsValidDynamicArea(iVehEnterAreaID[iVehicleID])) DestroyDynamicArea(iVehEnterAreaID[iVehicleID]);
- PlayerVehicleInfo[playerid][listitem][pvId] = INVALID_PLAYER_VEHICLE_ID;
- g_mysql_SaveVehicle(playerid, listitem);
- new vstring[128];
- format(vstring, sizeof(vstring), "You have stored your %s. The vehicle has been despawned.", VehicleName[PlayerVehicleInfo[playerid][listitem][pvModelId] - 400]);
- SendClientMessageEx(playerid, COLOR_WHITE, vstring);
- CheckPlayerVehiclesForDesync(playerid);
- }
- }
- else SendClientMessageEx(playerid, COLOR_WHITE, "This vehicle is currently occupied - it cannot be despawned right now.");
- }
- else if(PlayerVehicleInfo[playerid][listitem][pvImpounded]) {
- SendClientMessageEx(playerid, COLOR_WHITE, "You can not spawn an impounded vehicle. If you wish to reclaim it, do so at the DMV in Dillimore.");
- }
- else if(PlayerVehicleInfo[playerid][listitem][pvDisabled]) {
- SendClientMessageEx(playerid, COLOR_WHITE, "You can not spawn a disabled vehicle. It is disabled due to your VIP level (vehicle restrictions).");
- }
- else if((PlayerInfo[playerid][pRVehRestricted] > gettime() || PlayerVehicleInfo[playerid][listitem][pvRestricted] > gettime()) && IsRestrictedVehicle(PlayerVehicleInfo[playerid][listitem][pvModelId]))
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to spawn this restricted vehicle.");
- }
- else if(!PlayerVehicleInfo[playerid][listitem][pvSpawned]) {
- if(PlayerInfo[playerid][pDonateRank] == 0 && VehicleSpawned[playerid] >= 2) {
- SendClientMessageEx(playerid, COLOR_GREY, "As non-VIP you can only have 2 vehicles spawned. You must store a vehicle in order to spawn another one.");
- }
- else if(PlayerInfo[playerid][pDonateRank] == 1 && VehicleSpawned[playerid] >= 2) {
- SendClientMessageEx(playerid, COLOR_GREY, "As Bronze VIP you can only have 2 vehicles spawned. You must store a vehicle in order to spawn another one.");
- }
- else if(PlayerInfo[playerid][pDonateRank] == 2 && VehicleSpawned[playerid] >= 2) {
- SendClientMessageEx(playerid, COLOR_GREY, "As Silver VIP you can only have 2 vehicles spawned. You must store a vehicle in order to spawn another one.");
- }
- else if(PlayerInfo[playerid][pDonateRank] == 3 && VehicleSpawned[playerid] >= 3) {
- SendClientMessageEx(playerid, COLOR_GREY, "As Gold VIP you can only have 3 vehicles spawned. You must store a vehicle in order to spawn another one.");
- }
- else if(PlayerInfo[playerid][pDonateRank] == 4 && VehicleSpawned[playerid] >= 5) {
- SendClientMessageEx(playerid, COLOR_GREY, "As Platinum VIP you can only have 5 vehicles spawned. You must store a vehicle in order to spawn another one.");
- }
- else if(!(0 <= PlayerInfo[playerid][pDonateRank] <= 4)) {
- SendClientMessageEx(playerid, COLOR_GREY, "You have an invalid VIP level.");
- }
- else if((PlayerVehicleInfo[playerid][listitem][pvModelId]) < 400) {
- SendClientMessageEx(playerid, COLOR_GREY, "The vehicle slot is empty.");
- }
- else {
- new
- iVeh = CreateVehicle(PlayerVehicleInfo[playerid][listitem][pvModelId], PlayerVehicleInfo[playerid][listitem][pvPosX], PlayerVehicleInfo[playerid][listitem][pvPosY], (PlayerVehicleInfo[playerid][listitem][pvModelId] == 460) ? PlayerVehicleInfo[playerid][listitem][pvPosZ]+5 : PlayerVehicleInfo[playerid][listitem][pvPosZ], PlayerVehicleInfo[playerid][listitem][pvPosAngle],PlayerVehicleInfo[playerid][listitem][pvColor1], PlayerVehicleInfo[playerid][listitem][pvColor2], -1);
- SetVehicleVirtualWorld(iVeh, PlayerVehicleInfo[playerid][listitem][pvVW]);
- LinkVehicleToInterior(iVeh, PlayerVehicleInfo[playerid][listitem][pvInt]);
- switch(GetVehicleModel(iVeh)) {
- case 519, 553, 508: {
- iVehEnterAreaID[iVeh] = CreateDynamicSphere(PlayerVehicleInfo[playerid][listitem][pvPosX]+2, PlayerVehicleInfo[playerid][listitem][pvPosY], PlayerVehicleInfo[playerid][listitem][pvPosZ], 4, GetVehicleVirtualWorld(iVeh));
- AttachDynamicAreaToVehicle(iVehEnterAreaID[iVeh], iVeh);
- // Streamer_SetIntData(STREAMER_TYPE_AREA, iVehEnterAreaID[iVeh], E_STREAMER_EXTRA_ID, iVeh);
- }
- }
- ++PlayerCars;
- VehicleSpawned[playerid]++;
- PlayerVehicleInfo[playerid][listitem][pvSpawned] = 1;
- PlayerVehicleInfo[playerid][listitem][pvId] = iVeh;
- if(PlayerVehicleInfo[playerid][listitem][pvLocked] == 1) LockPlayerVehicle(playerid, iVeh, PlayerVehicleInfo[playerid][listitem][pvLock]);
- LoadPlayerVehicleMods(playerid, listitem);
- g_mysql_SaveVehicle(playerid, listitem);
- new vstring[64];
- format(vstring, sizeof(vstring), "You have taken your %s out of storage.", VehicleName[PlayerVehicleInfo[playerid][listitem][pvModelId] - 400]);
- SendClientMessageEx(playerid, COLOR_WHITE, vstring);
- CheckPlayerVehiclesForDesync(playerid);
- Vehicle_ResetData(iVeh);
- VehicleFuel[iVeh] = PlayerVehicleInfo[playerid][listitem][pvFuel];
- new zyear, zmonth, zday;
- getdate(zyear, zmonth, zday);
- if(zombieevent || (zmonth == 10 && zday == 31) || (zmonth == 11 && zday == 1)) SetVehicleHealth(iVeh, PlayerVehicleInfo[playerid][listitem][pvHealth]);
- if (VehicleFuel[iVeh] > 100.0) VehicleFuel[iVeh] = 100.0;
- if(PlayerVehicleInfo[playerid][listitem][pvCrashFlag] == 1 && PlayerVehicleInfo[playerid][listitem][pvCrashX] != 0.0)
- {
- SetVehiclePos(iVeh, PlayerVehicleInfo[playerid][listitem][pvCrashX], PlayerVehicleInfo[playerid][listitem][pvCrashY], PlayerVehicleInfo[playerid][listitem][pvCrashZ]);
- SetVehicleZAngle(iVeh, PlayerVehicleInfo[playerid][listitem][pvCrashAngle]);
- SetVehicleVirtualWorld(iVeh, PlayerVehicleInfo[playerid][listitem][pvCrashVW]);
- PlayerVehicleInfo[playerid][listitem][pvCrashFlag] = 0;
- PlayerVehicleInfo[playerid][listitem][pvCrashVW] = 0;
- PlayerVehicleInfo[playerid][listitem][pvCrashX] = 0.0;
- PlayerVehicleInfo[playerid][listitem][pvCrashY] = 0.0;
- PlayerVehicleInfo[playerid][listitem][pvCrashZ] = 0.0;
- PlayerVehicleInfo[playerid][listitem][pvCrashAngle] = 0.0;
- SendClientMessageEx(playerid, COLOR_WHITE, "Your vehicle has been restored to it's last known location from your previous timeout.");
- }
- }
- }
- else SendClientMessageEx(playerid, COLOR_WHITE, "You can not spawn a non-existent vehicle.");
- }
- if(dialogid == ADMIN_VEHCHECK && response) {
- if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pASM] < 1) { return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized"); }
- new giveplayerid = GetPVarInt(playerid, "vehcheck_giveplayerid");
- if(!IsPlayerConnected(giveplayerid)) { return SendClientMessage(playerid, COLOR_GRAD2, "The person has disconnected"); }
- new iVehicleID = PlayerVehicleInfo[giveplayerid][listitem][pvId];
- new model;
- model = PlayerVehicleInfo[giveplayerid][listitem][pvModelId];
- PlayerVehicleInfo[giveplayerid][listitem][pvId] = 0;
- PlayerVehicleInfo[giveplayerid][listitem][pvModelId] = 0;
- PlayerVehicleInfo[giveplayerid][listitem][pvPosX] = 0.0;
- PlayerVehicleInfo[giveplayerid][listitem][pvPosY] = 0.0;
- PlayerVehicleInfo[giveplayerid][listitem][pvPosZ] = 0.0;
- PlayerVehicleInfo[giveplayerid][listitem][pvPosAngle] = 0.0;
- PlayerVehicleInfo[giveplayerid][listitem][pvLock] = 0;
- PlayerVehicleInfo[giveplayerid][listitem][pvLocksLeft] = 0;
- PlayerVehicleInfo[giveplayerid][listitem][pvLocked] = 0;
- PlayerVehicleInfo[giveplayerid][listitem][pvPaintJob] = -1;
- PlayerVehicleInfo[giveplayerid][listitem][pvColor1] = 0;
- PlayerVehicleInfo[giveplayerid][listitem][pvImpounded] = 0;
- PlayerVehicleInfo[giveplayerid][listitem][pvColor2] = 0;
- PlayerVehicleInfo[giveplayerid][listitem][pvAllowedPlayerId] = INVALID_PLAYER_ID;
- PlayerVehicleInfo[giveplayerid][listitem][pvPark] = 0;
- PlayerVehicleInfo[giveplayerid][listitem][pvVW] = 0;
- PlayerVehicleInfo[giveplayerid][listitem][pvInt] = 0;
- PlayerVehicleInfo[giveplayerid][listitem][pvAlarm] = 0;
- PlayerVehicleInfo[giveplayerid][listitem][pvAlarmTriggered] = 0;
- PlayerVehicleInfo[giveplayerid][listitem][pvBeingPickLocked] = 0;
- PlayerVehicleInfo[giveplayerid][listitem][pvBeingPickLockedBy] = INVALID_PLAYER_ID;
- PlayerVehicleInfo[giveplayerid][listitem][pvLastLockPickedBy] = 0;
- if(PlayerVehicleInfo[giveplayerid][listitem][pvSpawned])
- {
- PlayerVehicleInfo[giveplayerid][iVehicleID][pvSpawned] = 0;
- DestroyVehicle(iVehicleID);
- PlayerVehicleInfo[playerid][listitem][pvId] = INVALID_PLAYER_VEHICLE_ID;
- VehicleSpawned[giveplayerid]--;
- }
- DestroyPlayerVehicle(giveplayerid, listitem);
- for(new m = 0; m < MAX_MODS; m++)
- {
- PlayerVehicleInfo[giveplayerid][listitem][pvMods][m] = 0;
- }
- format(string, sizeof(string), "AdmCmd: Admin %s has deleted one of %s's(%d) vehicles (VehModel:%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), model);
- Log("logs/admin.log", string);
- format(string, sizeof(string), "AdmCmd: Admin %s has deleted one of %s's vehicles (VehModel:%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), model);
- ABroadCast(COLOR_YELLOW, string, 4);
- format(string, sizeof(string), "* Admin %s has deleted one of your vehicles.", GetPlayerNameEx(playerid));
- SendClientMessageEx(giveplayerid, COLOR_YELLOW, string);
- format(string, sizeof(string), "* You have deleted one of %s's vehicles.", GetPlayerNameEx(giveplayerid));
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }
- if(dialogid == TRACKCAR2)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- new Float: carPos[3];
- GetVehiclePos(GetPVarInt(playerid, "RentedVehicle"), carPos[0], carPos[1], carPos[2]);
- if(CheckPointCheck(playerid))
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
- }
- else
- {
- SetPVarInt(playerid, "TrackCar", 1);
- new zone[MAX_ZONE_NAME];
- Get3DZone(carPos[0], carPos[1], carPos[2], zone, sizeof(zone));
- format(string, sizeof(string), "Your vehicle is located in %s.", zone);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- SetPlayerCheckpoint(playerid, carPos[0], carPos[1], carPos[2], 15.0);
- SendClientMessageEx(playerid, COLOR_WHITE, "Hint: Make your way to the checkpoint to find your vehicle!");
- }
- }
- case 1:
- {
- new vstring[1024];
- new szCarLocation[MAX_ZONE_NAME];
- for(new i, iModelID; i < MAX_PLAYERVEHICLES; i++)
- {
- if((iModelID = PlayerVehicleInfo[playerid][i][pvModelId] - 400) >= 0)
- {
- Get3DZone(PlayerVehicleInfo[playerid][i][pvPosX], PlayerVehicleInfo[playerid][i][pvPosY], PlayerVehicleInfo[playerid][i][pvPosZ], szCarLocation, sizeof(szCarLocation));
- if(PlayerVehicleInfo[playerid][i][pvImpounded]) {
- format(vstring, sizeof(vstring), "%s\n%s (impounded) | Location: DMV", vstring, VehicleName[iModelID]);
- }
- else if(PlayerVehicleInfo[playerid][i][pvDisabled]) {
- format(vstring, sizeof(vstring), "%s\n%s (disabled) | Location: Unknown", vstring, VehicleName[iModelID]);
- }
- else if(!PlayerVehicleInfo[playerid][i][pvSpawned]) {
- format(vstring, sizeof(vstring), "%s\n%s (stored)", vstring, VehicleName[iModelID]);
- }
- else format(vstring, sizeof(vstring), "%s\n%s | Location: %s", vstring, VehicleName[iModelID], szCarLocation);
- }
- else strcat(vstring, "\nEmpty");
- }
- ShowPlayerDialogEx(playerid, TRACKCAR, DIALOG_STYLE_LIST, "Vehicle GPS Tracking", vstring, "Track", "Cancel");
- }
- }
- }
- }
- if(dialogid == TRACKCAR && response) {
- new Float: carPos[3];
- if(PlayerVehicleInfo[playerid][listitem][pvId] > INVALID_PLAYER_VEHICLE_ID)
- {
- GetVehiclePos(PlayerVehicleInfo[playerid][listitem][pvId], carPos[0], carPos[1], carPos[2]);
- if(CheckPointCheck(playerid))
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
- }
- else
- {
- SetPVarInt(playerid, "TrackCar", 1);
- new zone[MAX_ZONE_NAME];
- Get3DZone(carPos[0], carPos[1], carPos[2], zone, sizeof(zone));
- format(string, sizeof(string), "Your vehicle is located in %s.", zone);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- SetPlayerCheckpoint(playerid, carPos[0], carPos[1], carPos[2], 15.0);
- SendClientMessageEx(playerid, COLOR_WHITE, "Hint: Make your way to the checkpoint to find your vehicle!");
- }
- }
- else if(PlayerVehicleInfo[playerid][listitem][pvImpounded]) SendClientMessageEx(playerid, COLOR_WHITE, "You can not track an impounded vehicle. If you wish to reclaim it, do so at the DMV in Dillimore.");
- else if(PlayerVehicleInfo[playerid][listitem][pvDisabled] == 1) SendClientMessageEx(playerid, COLOR_WHITE, "You can not track a disabled vehicle. It is disabled due to your VIP level (vehicle restrictions).");
- else if(PlayerVehicleInfo[playerid][listitem][pvSpawned] == 0) SendClientMessageEx(playerid, COLOR_WHITE, "You can not track a stored vehicle. Use /vstorage to spawn it.");
- else SendClientMessageEx(playerid, COLOR_WHITE, "You can not track a non-existent vehicle.");
- }
- if(dialogid == DV_STORAGE && response) {
- new stpos = strfind(inputtext, "(");
- new fpos = strfind(inputtext, ")");
- new caridstr[6], carid;
- strmid(caridstr, inputtext, stpos+1, fpos);
- carid = strval(caridstr);
- if(DynVehicleInfo[carid][gv_iSpawnedID] != INVALID_VEHICLE_ID && !DynVehicleInfo[carid][gv_iDisabled])
- {
- if((!IsVehicleOccupied(DynVehicleInfo[carid][gv_iSpawnedID]) || IsPlayerInVehicle(playerid, DynVehicleInfo[carid][gv_iSpawnedID])) && !IsVehicleInTow(DynVehicleInfo[carid][gv_iSpawnedID]))
- {
- new Float: vHealth;
- GetVehicleHealth(DynVehicleInfo[carid][gv_iSpawnedID], vHealth);
- if(vHealth < 800)
- return SendClientMessageEx(playerid, COLOR_GRAD1, "This vehicle is too damaged to be stored.");
- if(!IsPlayerInRangeOfVehicle(playerid, DynVehicleInfo[carid][gv_iSpawnedID], 9.0) && !IsWeaponizedVehicle(DynVehicleInfo[carid][gv_iModel]))
- return SendClientMessageEx(playerid, COLOR_GRAD1, "You're not near the vehicle.");
- DestroyVehicle(DynVehicleInfo[carid][gv_iSpawnedID]);
- DynVeh[DynVehicleInfo[carid][gv_iSpawnedID]] = -1;
- DynVehicleInfo[carid][gv_iDisabled] = 2;
- DynVehicleInfo[carid][gv_iSpawnedID] = INVALID_VEHICLE_ID;
- for(new i = 0; i != MAX_DV_OBJECTS; i++)
- {
- if(DynVehicleObjInfo[carid][i][gv_iAttachedObjectID] != INVALID_OBJECT_ID)
- {
- DestroyDynamicObject(DynVehicleObjInfo[carid][i][gv_iAttachedObjectID]);
- DynVehicleObjInfo[carid][i][gv_iAttachedObjectID] = INVALID_OBJECT_ID;
- }
- }
- new szstring[128];
- format(szstring, sizeof(szstring), "You have stored your dynamic group vehicle (%s)", VehicleName[DynVehicleInfo[carid][gv_iModel] - 400]);
- SendClientMessageEx(playerid, COLOR_WHITE, szstring);
- }
- else
- return SendClientMessageEx(playerid, COLOR_GRAD1, "This vehicle is currently occupied.");
- }
- else if(DynVehicleInfo[carid][gv_iDisabled] == 1) SendClientMessageEx(playerid, COLOR_WHITE, "You can not spawn a repo'd vehicle. Please see /grepocars to buy it back.");
- else {
- DynVehicleInfo[carid][gv_iDisabled] = 0;
- DynVeh_Spawn(carid);
- new szstring[128];
- format(szstring, sizeof(szstring), "You have spawned your dynamic group vehicle (%s)", VehicleName[DynVehicleInfo[carid][gv_iModel] - 400]);
- SendClientMessageEx(playerid, COLOR_WHITE, szstring);
- }
- }
- if(dialogid == DV_TRACKCAR && response) {
- new stpos = strfind(inputtext, "(");
- new fpos = strfind(inputtext, ")");
- new caridstr[6], carid;
- strmid(caridstr, inputtext, stpos+1, fpos);
- carid = strval(caridstr);
- new Float: carPos[3];
- GetVehiclePos(DynVehicleInfo[carid][gv_iSpawnedID], carPos[0], carPos[1], carPos[2]);
- if(DynVehicleInfo[carid][gv_iSpawnedID] != INVALID_VEHICLE_ID)
- {
- if(CheckPointCheck(playerid))
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
- }
- else
- {
- SetPVarInt(playerid, "DV_TrackCar", 1);
- new zone[MAX_ZONE_NAME];
- Get3DZone(carPos[0], carPos[1], carPos[2], zone, sizeof(zone));
- format(string, sizeof(string), "Your vehicle is located in %s.", zone);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- SetPlayerCheckpoint(playerid, carPos[0], carPos[1], carPos[2], 15.0);
- SendClientMessageEx(playerid, COLOR_WHITE, "Hint: Make your way to the checkpoint to find your vehicle!");
- if(carPos[2] > 500.0)
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "Note: This vehicle may be parked in a garage or interior!");
- }
- }
- }
- else if(DynVehicleInfo[carid][gv_iDisabled] == 1) SendClientMessageEx(playerid, COLOR_WHITE, "You can not track a repo'd vehicle. Please see /grepocars to buy it back.");
- else if(DynVehicleInfo[carid][gv_iDisabled] == 2) SendClientMessageEx(playerid, COLOR_WHITE, "You can not track a stored vehicle. Use /dvstorage to restore.");
- else SendClientMessageEx(playerid, COLOR_WHITE, "You can not track a non-existent vehicle.");
- }
- // --------------------------------------------------------------------------------------------------
- if(dialogid == VIPWEPSMENU)
- {
- if(!response) return 1;
- if(PlayerInfo[playerid][pDonateRank] < 3 && PlayerInfo[playerid][pTokens] == 0)
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You do not have any tokens!");
- return 1;
- }
- if(PlayerInfo[playerid][pConnectHours] < 2 || PlayerInfo[playerid][pWRestricted] > 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "You cannot use this as you are currently restricted from possessing weapons!");
- //if(!CanGetVIPWeapon(playerid) && (listitem < 4 || listitem == 8)) return SendClientMessageEx(playerid, COLOR_WHITE, "You can no longer withdraw anymore VIP weapons today, wait until tomorrow!");
- switch( listitem )
- {
- case 0:
- {
- if(PlayerInfo[playerid][pDonateRank] < 3)
- {
- if(PlayerInfo[playerid][pTokens] < 3)
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You do not have enough tokens for this.");
- return 1;
- }
- PlayerInfo[playerid][pTokens] -= 3;
- format(string, sizeof(string), "VIP: You have traded 3 tokens for a Desert Eagle, you now have %d token(s).", PlayerInfo[playerid][pTokens]);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }
- GivePlayerValidWeapon(playerid, 24);
- PlayerInfo[playerid][pVIPGuncount]++;
- }
- case 1:
- {
- if(PlayerInfo[playerid][pDonateRank] < 3)
- {
- if(PlayerInfo[playerid][pTokens] < 2)
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You do not have enough tokens for this.");
- return 1;
- }
- PlayerInfo[playerid][pTokens] -= 2;
- format(string, sizeof(string), "VIP: You have traded 2 tokens for a shotgun, you now have %d token(s).", PlayerInfo[playerid][pTokens]);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }
- GivePlayerValidWeapon(playerid, 25);
- PlayerInfo[playerid][pVIPGuncount]++;
- }
- case 2:
- {
- if(PlayerInfo[playerid][pDonateRank] < 3)
- {
- if(PlayerInfo[playerid][pTokens] < 3)
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You do not have enough tokens for this.");
- return 1;
- }
- PlayerInfo[playerid][pTokens] -= 3;
- format(string, sizeof(string), "VIP: You have traded 3 tokens for an MP5, you now have %d token(s).", PlayerInfo[playerid][pTokens]);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }
- GivePlayerValidWeapon(playerid, 29);
- PlayerInfo[playerid][pVIPGuncount]++;
- }
- case 3:
- {
- if(PlayerInfo[playerid][pDonateRank] < 3)
- {
- if(PlayerInfo[playerid][pTokens] > 1)
- {
- PlayerInfo[playerid][pTokens] -= 2;
- format(string, sizeof(string), "VIP: You have traded 2 tokens for a silenced pistol, you now have %d token(s).", PlayerInfo[playerid][pTokens]);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You do not have enough tokens for this.");
- return 1;
- }
- }
- GivePlayerValidWeapon(playerid, 23);
- PlayerInfo[playerid][pVIPGuncount]++;
- }
- case 4:
- {
- if(PlayerInfo[playerid][pDonateRank] < 3)
- {
- if(PlayerInfo[playerid][pTokens] > 0)
- {
- PlayerInfo[playerid][pTokens] -= 1;
- format(string, sizeof(string), "VIP: You have traded a token for a golf club, you now have %d token(s).", PlayerInfo[playerid][pTokens]);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You do not have enough tokens for this.");
- return 1;
- }
- }
- GivePlayerValidWeapon(playerid, 2);
- PlayerInfo[playerid][pVIPGuncount]++;
- }
- case 5:
- {
- if(PlayerInfo[playerid][pDonateRank] < 3)
- {
- if(PlayerInfo[playerid][pTokens] > 0)
- {
- PlayerInfo[playerid][pTokens] -= 1;
- format(string, sizeof(string), "VIP: You have traded a token for a baseball bat, you now have %d token(s).", PlayerInfo[playerid][pTokens]);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You do not have enough tokens for this.");
- return 1;
- }
- }
- GivePlayerValidWeapon(playerid, 5);
- }
- case 6:
- {
- if(PlayerInfo[playerid][pDonateRank] < 3)
- {
- if(PlayerInfo[playerid][pTokens] > 0)
- {
- PlayerInfo[playerid][pTokens] -= 1;
- format(string, sizeof(string), "VIP: You have traded a token for a dildo, you now have %d token(s).", PlayerInfo[playerid][pTokens]);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You do not have enough tokens for this.");
- return 1;
- }
- }
- GivePlayerValidWeapon(playerid, 10);
- PlayerInfo[playerid][pVIPGuncount]++;
- }
- case 7:
- {
- if(PlayerInfo[playerid][pDonateRank] < 3)
- {
- if(PlayerInfo[playerid][pTokens] > 0)
- {
- PlayerInfo[playerid][pTokens] -= 1;
- format(string, sizeof(string), "VIP: You have traded a token for a sword, you now have %d token(s).", PlayerInfo[playerid][pTokens]);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You do not have enough tokens for this.");
- return 1;
- }
- }
- GivePlayerValidWeapon(playerid, 8);
- }
- case 8:
- {
- if(PlayerInfo[playerid][pDonateRank] < 3)
- {
- if(PlayerInfo[playerid][pTokens] > 1)
- {
- PlayerInfo[playerid][pTokens] -= 2;
- format(string, sizeof(string), "VIP: You have traded 2 tokens for a 9mm, you now have %d token(s).", PlayerInfo[playerid][pTokens]);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You do not have enough tokens for this.");
- return 1;
- }
- }
- GivePlayerValidWeapon(playerid, 22);
- PlayerInfo[playerid][pVIPGuncount]++;
- }
- }
- }
- if( dialogid == 3497) //famed change skin
- {
- new skinid = strval(inputtext);
- if(response)
- {
- if(skinid < 1 || skinid > 299)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "That skin ID is invalid, the range of available skin IDs are 1-299 !");
- ShowPlayerDialogEx( playerid, 3497, DIALOG_STYLE_INPUT, "Skin Selection","Please enter a valid Skin ID!", "Wear", "Cancel" );
- return 1;
- }
- if(PlayerInfo[playerid][pFamed] == 1)
- {
- if(GetPlayerCash(playerid) < 3000)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You do not have $3,000 on you.");
- ShowPlayerDialogEx(playerid, 3497, DIALOG_STYLE_INPUT, "Famed Skin Selection","Please enter a Skin ID!\n\n{FF0000}Note: Skin changes are $3,000 for Old School.", "Change", "Cancel" );
- return 1;
- }
- GivePlayerCash(playerid, -3000);
- }
- if(PlayerInfo[playerid][pFamed] == 2)
- {
- if(GetPlayerCash(playerid) < 1500)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You do not have $1,500 on you.");
- ShowPlayerDialogEx(playerid, 3497, DIALOG_STYLE_INPUT, "Famed Skin Selection","Please enter a Skin ID!\n\n{FF0000}Note: Skin changes are $1,500 for Chartered Old School.", "Change", "Cancel" );
- return 1;
- }
- GivePlayerCash(playerid, -1500);
- }
- SendClientMessageEx(playerid, COLOR_YELLOW, "Famed Locker: You have changed your clothes.");
- PlayerInfo[playerid][pModel] = skinid;
- SetPlayerSkin(playerid, skinid);
- }
- else return 0;
- return 1;
- }
- if(dialogid == 3498) //Famed Weapon Locker
- {
- if(!response) return SendClientMessageEx(playerid, COLOR_GRAD2, "You exited the famed locker.");
- if(PlayerInfo[playerid][pConnectHours] < 2 || PlayerInfo[playerid][pWRestricted] > 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "You cannot use this as you are currently restricted from possessing weapons!");
- switch(listitem)
- {
- case 0: //Deagle
- {
- GivePlayerValidWeapon(playerid, 24);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You have taken a Desert Eagle from the famed locker.");
- }
- case 1: //MP5
- {
- GivePlayerValidWeapon(playerid, 29);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You have taken a Semi-Automatic MP5 from the famed locker.");
- }
- case 2: //Shotgun
- {
- GivePlayerValidWeapon(playerid, 25);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You have taken a Pump Shotgun from the famed locker.");
- }
- case 3: //Rifle
- {
- GivePlayerValidWeapon(playerid, 33);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You have taken a County Rifle from the famed locker.");
- }
- case 4: //SD Pistol
- {
- GivePlayerValidWeapon(playerid, 23);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You have taken a Silenced Pistol from the famed locker.");
- }
- case 5: //Katana
- {
- GivePlayerValidWeapon(playerid, 8);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You have taken a Japanese Katana from the famed locker.");
- }
- case 6: //Purple Dildo
- {
- GivePlayerValidWeapon(playerid, 10);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You have taken a Purple Dildo from the famed locker.");
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] Have Fun...");
- }
- case 7: //White Dildo
- {
- GivePlayerValidWeapon(playerid, 11);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You have taken a White Dildo from the famed locker.");
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] Have Fun...");
- }
- case 8: //Big Vibrator
- {
- GivePlayerValidWeapon(playerid, 12);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You have taken a Big Vibrator from the famed locker.");
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] Have Fun...");
- }
- case 9: //Silver Vibrator
- {
- GivePlayerValidWeapon(playerid, 13);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You have taken a Silver Vibrator from the famed locker.");
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] Have Fun...");
- }
- }
- }
- else if(dialogid == DIALOG_CHANGEPASS2)
- {
- if(!response || strlen(inputtext) == 0) return ShowLoginDialogs(playerid, 0);
- if(response)
- {
- if(PassComplexCheck && CheckPasswordComplexity(inputtext) != 1) return ShowLoginDialogs(playerid, 0);
- if(strlen(inputtext) > 64) return ShowLoginDialogs(playerid, 0), SendClientMessageEx(playerid, COLOR_GREY, "You can't select a password that's above 64 characters.");
- if(!strcmp(PlayerInfo[playerid][pLastPass], inputtext, true)) return ShowLoginDialogs(playerid, 0), SendClientMessageEx(playerid, COLOR_RED, "There was an issue with processing your request.");
- new
- szBuffer[129],
- szQuery[256],
- salt[11];
- SetPVarString(playerid, "PassChange", inputtext);
- randomString(salt);
- format(szQuery, sizeof(szQuery), "%s%s", inputtext, salt);
- WP_Hash(szBuffer, sizeof(szBuffer), szQuery);
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `accounts` SET `Key` = '%s', `Salt` = '%s' WHERE `id` = '%i'", szBuffer, salt, PlayerInfo[playerid][pId]);
- mysql_tquery(MainPipeline, szQuery, "OnPlayerChangePass", "i", playerid);
- SendClientMessageEx(playerid, COLOR_YELLOW, "Processing your request...");
- if(strcmp(PlayerInfo[playerid][pBirthDate], "0000-00-00", true) == 0 && PlayerInfo[playerid][pTut] != 0) ShowLoginDialogs(playerid, 1);
- else if(pMOTD[0] && GetPVarInt(playerid, "ViewedPMOTD") != 1) ShowLoginDialogs(playerid, 4);
- else if(PlayerInfo[playerid][pReceivedCredits] != 0) ShowLoginDialogs(playerid, 5);
- }
- }
- else if( dialogid == DIALOG_CHANGEPASS )
- {
- if(!response || strlen(inputtext) == 0) return SendClientMessageEx(playerid, COLOR_WHITE, "You have prevented yourself from changing your password." );
- if(response)
- {
- if(PassComplexCheck && CheckPasswordComplexity(inputtext) != 1) return ShowPlayerDialogEx(playerid, DIALOG_CHANGEPASS, DIALOG_STYLE_INPUT, "Password Change", "Please enter a new password for your account.\n\n\
- - You can't select a password that's below 8 or above 64 characters\n\
- - Your password must contain a combination of letters, numbers and special characters.\n\
- - Invalid Character: %", "Change", "Exit" );
- if(strlen(inputtext) > 64) return SendClientMessageEx(playerid, COLOR_WHITE, "You can't select a password that's above 64 characters.");
- if(!strcmp(PlayerInfo[playerid][pLastPass], inputtext, true)) return SendClientMessageEx(playerid, COLOR_RED, "There was an issue with processing your request.");
- new
- szBuffer[129],
- szQuery[256],
- salt[11];
- SetPVarString(playerid, "PassChange", inputtext);
- randomString(salt);
- format(szQuery, sizeof(szQuery), "%s%s", inputtext, salt);
- WP_Hash(szBuffer, sizeof(szBuffer), szQuery);
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `accounts` SET `Key` = '%s', `Salt` = '%s' WHERE `id` = '%i'", szBuffer, salt, PlayerInfo[playerid][pId]);
- mysql_tquery(MainPipeline, szQuery, "OnPlayerChangePass", "i", playerid);
- SendClientMessageEx(playerid, COLOR_YELLOW, "Processing your request...");
- }
- }
- else if(dialogid == DIALOG_NAMECHANGE)
- {
- if(!response || strlen(inputtext) == 0) return SendClientMessageEx(playerid, COLOR_WHITE, "You have prevented yourself from changing your name." );
- if(strlen(inputtext) > 20)
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "You can't select a name that's above 20 characters.");
- }
- else
- {
- if(strlen(inputtext) >= 1)
- {
- if(!response)
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "You have prevented yourself from changing your name." );
- }
- else
- {
- if(!IsValidName(inputtext)) return SendClientMessageEx(playerid, COLOR_WHITE, "Name change rejected. Please choose a name in the correct format: Firstname_Lastname.");
- /*new namechangecost;
- namechangecost = (PlayerInfo[playerid][pLevel]) * 15000;
- if(PlayerInfo[playerid][pDonateRank] >= 3)
- {
- namechangecost = 90*namechangecost/100;
- }*/
- DeletePVar(playerid, "marriagelastname");
- new tmpName[MAX_PLAYER_NAME];
- mysql_escape_string(inputtext, tmpName);
- if(strcmp(inputtext, tmpName, false) != 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "Unacceptable characters used in namechange, try again");
- if((0 <= PlayerInfo[playerid][pMember] < MAX_GROUPS) && (PlayerInfo[playerid][pRank] >= arrGroupData[PlayerInfo[playerid][pMember]][g_iFreeNameChange] && (PlayerInfo[playerid][pDivision] == arrGroupData[PlayerInfo[playerid][pMember]][g_iFreeNameChangeDiv] || arrGroupData[PlayerInfo[playerid][pMember]][g_iFreeNameChangeDiv] == INVALID_DIVISION)))
- {
- if(GetPVarType(playerid, "HasReport")) {
- SendClientMessageEx(playerid, COLOR_GREY, "You can only have 1 active report at a time. (/cancelreport)");
- return 1;
- }
- new String[128];
- SetPVarInt(playerid, "RequestingNameChange", 1);
- SetPVarString(playerid, "NewNameRequest", inputtext);
- SetPVarInt(playerid, "NameChangeCost", 0);
- new playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername, sizeof(playername));
- format( String, sizeof( String ), "You have requested a namechange from %s to %s at no cost, please wait until an admin approves it.", playername, inputtext);
- SendClientMessageEx( playerid, COLOR_YELLOW, String );
- SendReportToQue(playerid, "Name Change Request", 2, 4);
- return 1;
- }
- if(PlayerInfo[playerid][pAdmin] == 1 && PlayerInfo[playerid][pSMod] > 0)
- {
- if(GetPVarType(playerid, "HasReport")) {
- SendClientMessageEx(playerid, COLOR_GREY, "You can only have 1 active report at a time. (/cancelreport)");
- return 1;
- }
- new String[128];
- SetPVarInt(playerid, "RequestingNameChange", 1);
- SetPVarString(playerid, "NewNameRequest", inputtext);
- new playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername, sizeof(playername));
- format( String, sizeof( String ), "You have requested a namechange from %s to %s at no cost (Senior Mod), please wait until an admin approves it.", playername, inputtext);
- SendClientMessageEx( playerid, COLOR_YELLOW, String );
- SendReportToQue(playerid, "Name Change Request", 2, 4);
- return 1;
- }
- if(gettime() >= PlayerInfo[playerid][pNextNameChange])
- {
- if(GetPVarType(playerid, "HasReport")) return SendClientMessageEx(playerid, COLOR_GREY, "You can only have 1 active report at a time. (/cancelreport)");
- new String[128];
- SetPVarInt(playerid, "RequestingNameChange", 1);
- SetPVarString(playerid, "NewNameRequest", inputtext);
- SetPVarInt(playerid, "NameChangeCost", 1);
- new playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername, sizeof(playername));
- format( String, sizeof( String ), "You have requested a namechange from %s to %s for free, please wait until an admin approves it.", playername, inputtext);
- SendClientMessageEx( playerid, COLOR_YELLOW, String );
- SendReportToQue(playerid, "Name Change Request", 2, 4);
- return 1;
- }
- /*
- if(PlayerInfo[playerid][pCredits] >= ShopItems[40][sItemPrice])
- {
- if(GetPVarType(playerid, "HasReport")) return SendClientMessageEx(playerid, COLOR_GREY, "You can only have 1 active report at a time. (/cancelreport)");
- new String[128];
- SetPVarInt(playerid, "RequestingNameChange", 1);
- SetPVarString(playerid, "NewNameRequest", inputtext);
- SetPVarInt(playerid, "NameChangeCost", 2);
- new playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername, sizeof(playername));
- format( String, sizeof( String ), "You have requested a namechange from %s to %s for %s credits, please wait until a General Admin approves it.", playername, inputtext, number_format(ShopItems[40][sItemPrice]));
- SendClientMessageEx( playerid, COLOR_YELLOW, String );
- SendReportToQue(playerid, "Name Change Request (Credits)", 2, 4);
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- }
- */
- new namechangecost;
- switch(PlayerInfo[playerid][pLevel])
- {
- case 1: namechangecost = 10000;
- case 2: namechangecost = 15000;
- case 3: namechangecost = 20000;
- default: namechangecost = (PlayerInfo[playerid][pLevel]-3)*50000;
- }
- if(PlayerInfo[playerid][pCash] >= namechangecost)
- {
- if(GetPVarType(playerid, "HasReport")) return SendClientMessageEx(playerid, COLOR_GREY, "You can only have 1 active report at a time. (/cancelreport)");
- SetPVarInt(playerid, "RequestingNameChange", 1);
- SetPVarString(playerid, "NewNameRequest", inputtext);
- SetPVarInt(playerid, "NameChangeCost", namechangecost);
- SendClientMessageEx(playerid, COLOR_YELLOW, "You have requested a namechange from %s to %s for $%s, please wait until an admin approves it.", GetPlayerNameExt(playerid), inputtext, number_format(namechangecost));
- SendReportToQue(playerid, "Name Change Request (Cash)", 2, 4);
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "You don't have enough money for a name change.");
- }
- }
- }
- else
- {
- SendClientMessageEx( playerid, COLOR_WHITE, "Your name must be longer than 1 character." );
- }
- }
- }
- else if( dialogid == DIALOG_NAMECHANGE2 )
- {
- if(!response || strlen(inputtext) == 0) return Kick(playerid);
- if(strlen(inputtext) >= 20)
- {
- SendClientMessageEx( playerid, COLOR_WHITE, "You can't select a name that's above 20 characters." );
- ShowPlayerDialogEx( playerid, DIALOG_NAMECHANGE2, DIALOG_STYLE_INPUT, "Free name change","This is a roleplay server where you must have a name in this format: Firstname_Lastname.\nFor example: John_Smith or Jimmy_Johnson\n\nAn admin has offered you to change your name to the correct format for free. Please enter your desired name below.\n\nNote: If you press cancel you will be kicked from the server.", "Change", "Cancel" );
- }
- else
- {
- if( strlen(inputtext) >= 1 )
- {
- if(!response)
- {
- ShowPlayerDialogEx( playerid, DIALOG_NAMECHANGE2, DIALOG_STYLE_INPUT, "Free name change","This is a roleplay server where you must have a name in this format: Firstname_Lastname.\nFor example: John_Smith or Jimmy_Johnson\n\nAn admin has offered you to change your name to the correct format for free. Please enter your desired name below.\n\nNote: If you press cancel you will be kicked from the server.", "Change", "Cancel" );
- }
- else
- {
- for(new i = 0; i < strlen( inputtext ); i++)
- {
- if (inputtext[i] == ' ')
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "Please use the '_'(underscore) instead of the ' '(space)");
- ShowPlayerDialogEx( playerid, DIALOG_NAMECHANGE2, DIALOG_STYLE_INPUT, "Free name change","This is a roleplay server where you must have a name in this format: Firstname_Lastname.\nFor example: John_Smith or Jimmy_Johnson\n\nAn admin has offered you to change your name to the correct format for free. Please enter your desired name below.\n\nNote: If you press cancel you will be kicked from the server.", "Change", "Cancel" );
- return 1;
- }
- }
- if( strfind( inputtext, "_", true) == -1 )
- {
- SendClientMessageEx( playerid, COLOR_WHITE, "Name change rejected. Please choose a name in the correct format: Firstname_Lastname." );
- ShowPlayerDialogEx( playerid, DIALOG_NAMECHANGE2, DIALOG_STYLE_INPUT, "Free name change","This is a roleplay server where you must have a name in this format: Firstname_Lastname.\nFor example: John_Smith or Jimmy_Johnson\n\nAn admin has offered you to change your name to the correct format for free. Please enter your desired name below.\n\nNote: If you press cancel you will be kicked from the server.", "Change", "Cancel" );
- return 1;
- }
- else
- {
- if(GetPVarType(playerid, "HasReport")) {
- SendClientMessageEx(playerid, COLOR_GREY, "You can only have 1 active report at a time. (/cancelreport)");
- return 1;
- }
- new String[128];
- DeletePVar(playerid, "marriagelastname");
- SetPVarInt(playerid, "RequestingNameChange", 1);
- SetPVarString(playerid, "NewNameRequest", inputtext);
- SetPVarInt(playerid, "NameChangeCost", 0);
- new playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername, sizeof(playername));
- format( String, sizeof( String ), "You have requested a namechange from %s to %s please wait until an admin approves it.", playername, inputtext);
- SendClientMessageEx( playerid, COLOR_YELLOW, String );
- // format( String, sizeof( String ), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) requested a name change to %s for free (non-RP name) - /approvename %d (accept), or /denyname %d (deny).", playername, playerid, inputtext, playerid, playerid);
- // ABroadCast( COLOR_YELLOW, String, 3 );
- SendReportToQue(playerid, "Name Change Request", 2, 4);
- return 1;
- }
- }
- }
- else
- {
- SendClientMessageEx( playerid, COLOR_WHITE, "Your name must be longer than 1 character." );
- ShowPlayerDialogEx( playerid, DIALOG_NAMECHANGE2, DIALOG_STYLE_INPUT, "Free name change","This is a roleplay server where you must have a name in this format: Firstname_Lastname.\nFor example: John_Smith or Jimmy_Johnson\n\nAn admin has offered you to change your name to the correct format for free. Please enter your desired name below.\n\nNote: If you press cancel you will be kicked from the server.", "Change", "Cancel" );
- }
- }
- }
- if(dialogid == DIALOG_CDLOCKMENU)
- {
- if(response)
- {
- if(GetPVarInt(playerid, "lockmenu") == 1)
- {
- new pvid;
- if (IsNumeric(inputtext))
- {
- pvid = strval(inputtext)-1;
- if(PlayerVehicleInfo[playerid][pvid][pvId] == INVALID_PLAYER_VEHICLE_ID)
- {
- SendClientMessageEx(playerid, COLOR_GRAD4, "ERROR: You don't have a vehicle in this slot.");
- DeletePVar(playerid, "lockmenu");
- return 1;
- }
- if(PlayerVehicleInfo[playerid][pvid][pvAlarm] == 1)
- {
- SendClientMessageEx(playerid, COLOR_GRAD4, "ERROR: You already have this item installed on this vehicle.");
- DeletePVar(playerid, "lockmenu");
- return 1;
- }
- SendClientMessageEx(playerid, COLOR_GRAD4, " You have purchased a standard car alarm!");
- SendClientMessageEx(playerid, COLOR_YELLOW, "HINT: Your alarm will now activate and alert you when someone tries to steal your car.");
- PlayerVehicleInfo[playerid][pvid][pvAlarm] = 1;
- g_mysql_SaveVehicle(playerid, pvid);
- DeletePVar(playerid, "lockmenu");
- new iBusiness = GetPVarInt(playerid, "businessid");
- new cost = GetPVarInt(playerid, "lockcost");
- new iItem = GetPVarInt(playerid, "item")-1;
- Businesses[iBusiness][bInventory]-= StoreItemCost[iItem][ItemValue];
- Businesses[iBusiness][bTotalSales]++;
- Businesses[iBusiness][bSafeBalance] += TaxSale(cost);
- //if(penalty) Businesses[iBusiness][bSafeBalance] -= floatround(cost * BIZ_PENALTY);
- GivePlayerCash(playerid, -cost);
- if (PlayerInfo[playerid][pBusiness] != InBusiness(playerid)) Businesses[iBusiness][bLevelProgress]++;
- SaveBusiness(iBusiness);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- /*if (PlayerInfo[playerid][pDonateRank] >= 1)
- {
- format(string,sizeof(string),"VIP: You have received 20 percent off this product. Instead of paying $%s, you paid $%s.", number_format(Businesses[iBusiness][bItemPrices][iItem]), number_format(cost));
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }*/
- format(string,sizeof(string),"%s(%d) (IP: %s) has bought a Standard Car Alarm in %s (%d) for $%s.",GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), Businesses[iBusiness][bName], iBusiness, number_format(cost));
- Log("logs/business.log", string);
- format(string,sizeof(string),"* You have purchased a Standard Car Alarm from %s for $%s.", Businesses[iBusiness][bName], number_format(cost));
- SendClientMessage(playerid, COLOR_GRAD2, string);
- new playersold = GetPVarInt(playerid, "playersold");
- if(playersold)
- {
- DeletePVar(playerid, "Business_ItemType");
- DeletePVar(playerid, "Business_ItemPrice");
- DeletePVar(playerid, "Business_ItemOfferer");
- DeletePVar(playerid, "Business_ItemOffererSQLId");
- }
- }
- }
- else if(GetPVarInt(playerid, "lockmenu") == 4)
- {
- new pvid;
- if (IsNumeric(inputtext))
- {
- pvid = strval(inputtext)-1;
- if(PlayerVehicleInfo[playerid][pvid][pvId] == INVALID_PLAYER_VEHICLE_ID)
- {
- SendClientMessageEx(playerid, COLOR_GRAD4, "ERROR: You don't have a vehicle in this slot.");
- DeletePVar(playerid, "lockmenu");
- return 1;
- }
- if(PlayerVehicleInfo[playerid][pvid][pvAlarm] == 2)
- {
- SendClientMessageEx(playerid, COLOR_GRAD4, "ERROR: You already have this item installed & working on this vehicle.");
- DeletePVar(playerid, "lockmenu");
- return 1;
- }
- PlayerVehicleInfo[playerid][pvid][pvAlarm] = 2;
- g_mysql_SaveVehicle(playerid, pvid);
- DeletePVar(playerid, "lockmenu");
- GivePlayerCredits(playerid, -ShopItems[39][sItemPrice], 1);
- printf("Price39: %d", ShopItems[39][sItemPrice]);
- AmountSold[39]++;
- AmountMade[39] += ShopItems[39][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold39` = '%d', `AmountMade39` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[39], AmountMade[39]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- format(string, sizeof(string), "You have purchased a Deluxe Car Alarm for %s credits.", number_format(ShopItems[39][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_YELLOW, "HINT: Your alarm will now activate and alert you when someone tries to steal your car.");
- format(string, sizeof(string), "[Deluxe Car Alarm] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[39][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- }
- else if(GetPVarInt(playerid, "lockmenu") == 2)
- {
- new pvid;
- if (IsNumeric(inputtext))
- {
- pvid = strval(inputtext)-1;
- if(PlayerVehicleInfo[playerid][pvid][pvId] == INVALID_PLAYER_VEHICLE_ID)
- {
- SendClientMessageEx(playerid, COLOR_GRAD4, "ERROR: You don't have a vehicle in this slot.");
- SetPVarInt(playerid, "lockmenu", 0);
- return 1;
- }
- if(PlayerVehicleInfo[playerid][pvid][pvLocksLeft] > 0 && PlayerVehicleInfo[playerid][pvid][pvLock] == 2)
- {
- SendClientMessageEx(playerid, COLOR_GRAD4, "ERROR: You already have this item installed & working on this vehicle.");
- DeletePVar(playerid, "lockmenu");
- return 1;
- }
- format(string, sizeof(string), " You have purchased an electronic lock!");
- SendClientMessageEx(playerid, COLOR_GRAD4, string);
- SendClientMessageEx(playerid, COLOR_YELLOW, "HINT: You can now use /pvlock to lock your car.");
- UnLockPlayerVehicle(playerid, PlayerVehicleInfo[playerid][pvid][pvId], PlayerVehicleInfo[playerid][pvid][pvLock]);
- PlayerVehicleInfo[playerid][pvid][pvLock] = 2;
- PlayerVehicleInfo[playerid][pvid][pvLocksLeft] = 5;
- g_mysql_SaveVehicle(playerid, pvid);
- DeletePVar(playerid, "lockmenu");
- new iBusiness = GetPVarInt(playerid, "businessid");
- new cost = GetPVarInt(playerid, "lockcost");
- new iItem = GetPVarInt(playerid, "item")-1;
- Businesses[iBusiness][bInventory]-= StoreItemCost[iItem][ItemValue];
- Businesses[iBusiness][bTotalSales]++;
- Businesses[iBusiness][bSafeBalance] += TaxSale(cost);
- //if(penalty) Businesses[iBusiness][bSafeBalance] -= floatround(cost * BIZ_PENALTY);
- GivePlayerCash(playerid, -cost);
- if (PlayerInfo[playerid][pBusiness] != InBusiness(playerid)) Businesses[iBusiness][bLevelProgress]++;
- SaveBusiness(iBusiness);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- /*if (PlayerInfo[playerid][pDonateRank] >= 1)
- {
- format(string,sizeof(string),"VIP: You have received 20 percent off this product. Instead of paying $%s, you paid $%s.", number_format(Businesses[iBusiness][bItemPrices][iItem]), number_format(cost));
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }*/
- format(string,sizeof(string),"%s(%d) (IP: %s) has bought a Electronic Lock in %s (%d) for $%s.",GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), Businesses[iBusiness][bName], iBusiness, number_format(cost));
- Log("logs/business.log", string);
- format(string,sizeof(string),"* You have purchased a Electronic Lock from %s for $%s.", Businesses[iBusiness][bName], number_format(cost));
- SendClientMessage(playerid, COLOR_GRAD2, string);
- new playersold = GetPVarInt(playerid, "playersold");
- if(playersold)
- {
- DeletePVar(playerid, "Business_ItemType");
- DeletePVar(playerid, "Business_ItemPrice");
- DeletePVar(playerid, "Business_ItemOfferer");
- DeletePVar(playerid, "Business_ItemOffererSQLId");
- }
- }
- }
- else if(GetPVarInt(playerid, "lockmenu") == 3)
- {
- new pvid;
- if (IsNumeric(inputtext))
- {
- pvid = strval(inputtext)-1;
- if(PlayerVehicleInfo[playerid][pvid][pvId] == INVALID_PLAYER_VEHICLE_ID)
- {
- SendClientMessageEx(playerid, COLOR_GRAD4, "ERROR: You don't have a vehicle in this slot.");
- SetPVarInt(playerid, "lockmenu", 0);
- return 1;
- }
- if(PlayerVehicleInfo[playerid][pvid][pvLocksLeft] > 0 && PlayerVehicleInfo[playerid][pvid][pvLock] == 3)
- {
- SendClientMessageEx(playerid, COLOR_GRAD4, "ERROR: You already have this item installed & working on this vehicle.");
- DeletePVar(playerid, "lockmenu");
- return 1;
- }
- format(string, sizeof(string), " You have Purchased an industrial lock!");
- SendClientMessageEx(playerid, COLOR_GRAD4, string);
- SendClientMessageEx(playerid, COLOR_YELLOW, "HINT: You can now use /pvlock to lock your car.");
- PlayerVehicleInfo[playerid][pvid][pvLock] = 3;
- PlayerVehicleInfo[playerid][pvid][pvLocksLeft] = 5;
- g_mysql_SaveVehicle(playerid, pvid);
- DeletePVar(playerid, "lockmenu");
- new iBusiness = GetPVarInt(playerid, "businessid");
- new cost = GetPVarInt(playerid, "lockcost");
- new iItem = GetPVarInt(playerid, "item")-1;
- Businesses[iBusiness][bInventory]-= StoreItemCost[iItem][ItemValue];
- Businesses[iBusiness][bTotalSales]++;
- Businesses[iBusiness][bSafeBalance] += TaxSale(cost);
- //if(penalty) Businesses[iBusiness][bSafeBalance] -= floatround(cost * BIZ_PENALTY);
- GivePlayerCash(playerid, -cost);
- if (PlayerInfo[playerid][pBusiness] != InBusiness(playerid)) Businesses[iBusiness][bLevelProgress]++;
- SaveBusiness(iBusiness);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- /*if (PlayerInfo[playerid][pDonateRank] >= 1)
- {
- format(string,sizeof(string),"VIP: You have received 20 percent off this product. Instead of paying $%s, you paid $%s.", number_format(Businesses[iBusiness][bItemPrices][iItem]), number_format(cost));
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }*/
- format(string,sizeof(string),"%s(%d) (IP: %s) has bought a Industrial Lock in %s (%d) for $%s.",GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), Businesses[iBusiness][bName], iBusiness, number_format(cost));
- Log("logs/business.log", string);
- format(string,sizeof(string),"* You have purchased a Industrial Lock from %s for $%s.",Businesses[iBusiness][bName], number_format(cost));
- SendClientMessage(playerid, COLOR_GRAD2, string);
- new playersold = GetPVarInt(playerid, "playersold");
- if(playersold)
- {
- DeletePVar(playerid, "Business_ItemType");
- DeletePVar(playerid, "Business_ItemPrice");
- DeletePVar(playerid, "Business_ItemOfferer");
- DeletePVar(playerid, "Business_ItemOffererSQLId");
- }
- }
- }
- }
- }
- if(dialogid == DIALOG_LOCKER_OS)
- {
- if(!response) return SendClientMessageEx(playerid, COLOR_GRAD2, "You have exited the locker.");
- if(listitem == 0)
- {
- new Float:health;
- GetHealth(playerid, health);
- new hpint = floatround( health, floatround_round );
- if( hpint >= 100 )
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You already have full health.");
- return 1;
- }
- else {
- SetHealth(playerid, 100);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You have used a first aid kit, you now have 100.0 HP.");
- }
- }
- if(listitem == 1)
- {
- new Float:armour;
- GetArmour(playerid, armour);
- if(armour >= 100)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You already have full armor.");
- return 1;
- }
- else if(GetPlayerCash(playerid) < 10000)
- {
- SendClientMessageEx(playerid, COLOR_GREY,"You don't have $10000");
- return 1;
- }
- else {
- GivePlayerCash(playerid, -10000);
- SetArmour(playerid, 100);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You paid $10000 for a kevlar vest.");
- }
- }
- if(listitem == 2)
- {
- ShowPlayerDialogEx(playerid, 3497, DIALOG_STYLE_INPUT, "Famed Skin Selection","Please enter a Skin ID!\n\nNote: Skin changes are free for famed members.", "Change", "Cancel" );
- }
- if(listitem == 3)
- {
- ShowPlayerDialogEx(playerid, 7484, DIALOG_STYLE_LIST, "Job Center", "Detective\nLawyer\nWhore\nDrugs Dealer\nBodyguard\nMechanic\nArms Dealer\nBoxer\nDrugs Smuggler\nTaxi Driver\nCraftsman\nBartender\nShipment Contractor\nPizza Boy", "Proceed", "Cancel");
- }
- }
- if(dialogid == DIALOG_LOCKER_COS)
- {
- if(!response) return SendClientMessageEx(playerid, COLOR_GRAD2, "You have exited the locker.");
- if(listitem == 0)
- {
- new Float:health;
- GetHealth(playerid, health);
- new hpint = floatround( health, floatround_round );
- if( hpint >= 100 )
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You already have full health.");
- return 1;
- }
- else {
- SetHealth(playerid, 100);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You have used a first aid kit, you now have 100.0 HP.");
- }
- }
- if(listitem == 1)
- {
- new Float:armour;
- GetArmour(playerid, armour);
- if(armour >= 100)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You already have full armor.");
- return 1;
- }
- else if(GetPlayerCash(playerid) < 5000)
- {
- SendClientMessageEx(playerid, COLOR_GREY,"You don't have $5000");
- return 1;
- }
- else {
- GivePlayerCash(playerid, -5000);
- SetArmour(playerid, 100);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You paid $5000 for a kevlar vest.");
- }
- }
- if(listitem == 2)
- {
- ShowPlayerDialogEx(playerid, 3497, DIALOG_STYLE_INPUT, "Famed Skin Selection","Please enter a Skin ID!\n\nNote: Skin changes are free for famed members.", "Change", "Cancel" );
- }
- if(listitem == 3)
- {
- ShowPlayerDialogEx(playerid, 7484, DIALOG_STYLE_LIST, "Job Center", "Detective\nLawyer\nWhore\nDrugs Dealer\nBodyguard\nMechanic\nArms Dealer\nBoxer\nDrugs Smuggler\nTaxi Driver\nCraftsman\nBartender\nShipment Contractor\nPizza Boy", "Proceed", "Cancel");
- }
- }
- if(dialogid == DIALOG_LOCKER_FAMED)
- {
- if(!response) return SendClientMessageEx(playerid, COLOR_GRAD2, "You have exited the locker.");
- if(listitem == 0)
- {
- new Float:health;
- GetHealth(playerid, health);
- new hpint = floatround(health, floatround_round);
- if(hpint >= 100)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You already have full health.");
- return 1;
- }
- else {
- SetHealth(playerid, 100);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You have used a first aid kit, you now have 100.0 HP.");
- }
- }
- if(listitem == 1)
- {
- new Float:armour;
- GetArmour(playerid, armour);
- if(armour >= 100)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You already have full armor.");
- return 1;
- }
- else {
- SetArmour(playerid, 100);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] You have received a Kevlar Vest free of charge.");
- }
- }
- if(listitem == 2)
- {
- if(PlayerInfo[playerid][pAccountRestricted] != 0) return SendClientMessageEx(playerid, COLOR_GRAD1, "Your account is restricted!");
- ShowPlayerDialogEx(playerid, 3498, DIALOG_STYLE_LIST, "Famed Weapon Inventory", "Desert Eagle (Free)\nSemi-Automatic MP5 (Free)\nPump Shotgun (Free)\nCounty Rifle (Free)\nSilenced Pistol (Free)\nJapanese Katana (Free)\nPurple Dildo (Free)\nWhite Dildo (Free)\nBig Vibrator (Free)\nSilver Vibrator (Free)\n", "Take", "Cancel");
- }
- if(listitem == 3)
- {
- ShowPlayerDialogEx(playerid, 3497, DIALOG_STYLE_INPUT, "Famed Skin Selection", "Please enter a Skin ID!\n\nNote: Skin changes are free for famed members.", "Change", "Cancel" );
- }
- if(listitem == 4)
- {
- ShowPlayerDialogEx(playerid, 7484, DIALOG_STYLE_LIST, "Job Center", "Detective\nLawyer\nWhore\nDrugs Dealer\nBodyguard\nMechanic\nArms Dealer\nBoxer\nDrugs Smuggler\nTaxi Driver\nCraftsman\nBartender\nShipment Contractor\nPizza Boy", "Proceed", "Cancel");
- }
- if(listitem == 5)
- {
- if(!response) return SendClientMessageEx(playerid, COLOR_GRAD2, "You have exited the famed locker.");
- if(PlayerInfo[playerid][pWantedLevel] >= 6)
- return SendClientMessageEx(playerid, COLOR_YELLOW, "You cannot use this as Most Wanted!");
- if(PlayerInfo[playerid][pJailTime] > 0)
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "You cannot do this at this time.");
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has attempted to change his name tag color to famed while in jail/prison.", GetPlayerNameEx(playerid));
- ABroadCast(COLOR_YELLOW, string, 2);
- return 1;
- }
- if(GetPVarInt(playerid, "famedTag") == 0)
- {
- SetPlayerColor(playerid, COLOR_FAMED);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] Your name color will now appear as famed.");
- SetPVarInt(playerid, "famedTag", 1);
- return 1;
- }
- else {
- SetPlayerToTeamColor(playerid);
- SendClientMessageEx(playerid, COLOR_YELLOW, "[Famed Locker] Your name color will now appear as normal.");
- SetPVarInt(playerid, "famedTag", 0);
- }
- }
- }
- if(dialogid == 7483) // VIP Locker /viplocker
- {
- if(response)
- {
- if(!IsPlayerInRangeOfPoint(playerid, 7.0, 2555.747314, 1404.106079, 7699.584472) && !IsPlayerInRangeOfPoint(playerid, 7.0, 1832.0533, 1380.7281, 1464.3822) && !IsPlayerInRangeOfPoint(playerid, 7.0, 772.4844, 1715.7213, 1938.0391) && !IsPlayerInRangeOfPoint(playerid, 7.0, 1378.0017, 1747.4668, 927.3564)) SendClientMessageEx(playerid, COLOR_GRAD1, "You're not at a VIP Locker.");
- if(listitem == 0)
- {
- new Float:health;
- GetHealth(playerid, health);
- new hpint = floatround( health, floatround_round );
- if( hpint >= 100 )
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You already have full health.");
- return 1;
- }
- SetHealth(playerid, 100);
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have used a first aid kit, you now have 100.0 HP.");
- }
- if(listitem == 1)
- {
- new Float:armour;
- GetArmour(playerid, armour);
- if(armour >= 100)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You already have full armor.");
- return 1;
- }
- if(PlayerInfo[playerid][pDonateRank] == 1)
- {
- if(GetPlayerCash(playerid) < 15000)
- {
- SendClientMessageEx(playerid, COLOR_GREY,"You can't afford the $15000!");
- return 1;
- }
- GivePlayerCash(playerid, -15000);
- SetArmour(playerid, 100);
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You paid $15000 for a kevlar vest.");
- }
- else if(PlayerInfo[playerid][pDonateRank] == 2)
- {
- if(GetPlayerCash(playerid) < 10000)
- {
- SendClientMessageEx(playerid, COLOR_GREY,"You can't afford the $10000!");
- return 1;
- }
- GivePlayerCash(playerid, -10000);
- SetArmour(playerid, 100);
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You paid $10000 for a kevlar vest.");
- }
- if(PlayerInfo[playerid][pDonateRank] >= 3)
- {
- SetArmour(playerid, 100);
- SetPVarInt(playerid, "Armor", 1);
- }
- }
- if(listitem == 2)
- {
- if(PlayerInfo[playerid][pAccountRestricted] != 0) return SendClientMessageEx(playerid, COLOR_GRAD1, "Your account is restricted!");
- if(PlayerInfo[playerid][pDonateRank] >= 1)
- {
- switch(PlayerInfo[playerid][pDonateRank])
- {
- case 1, 2: ShowPlayerDialogEx(playerid, VIPWEPSMENU, DIALOG_STYLE_LIST, "VIP Weapons", "Desert Eagle (3)\nShotgun (2)\nMP5 (3)\nSilenced Pistol (2)\nGolf Club (1)\nBat (1)\nDildo (1)\nSword (1)\n9mm (2)", "Select", "Cancel");
- default: ShowPlayerDialogEx(playerid, VIPWEPSMENU, DIALOG_STYLE_LIST, "VIP Weapons", "Desert Eagle\nShotgun\nMP5\nSilenced Pistol\nGolf Club\nBat\nDildo\nSword\n9mm", "Select", "Cancel");
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You must be a VIP member to access the gun lockers.");
- }
- }
- if(listitem == 3)
- {
- if(PlayerInfo[playerid][pDonateRank] >= 2)
- {
- ShowModelSelectionMenu(playerid, SkinList, "Change your clothes.");
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You must be at least Silver VIP to access the clothes corner. In the clothes corner you can get ANY skin.");
- }
- }
- if(listitem == 4)
- {
- if(PlayerInfo[playerid][pDonateRank] >= 2)
- {
- ShowPlayerDialogEx(playerid, 7484, DIALOG_STYLE_LIST, "VIP: Job Center", "Detective\nLawyer\nWhore\nDrugs Dealer\nBodyguard\nMechanic\nArms Dealer\nBoxer\nDrugs Smuggler\nTaxi Driver\nCraftsman\nBartender\nShipment Contractor\nPizza Boy", "Proceed", "Cancel");
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You must be at least Silver VIP to access the job center.");
- }
- }
- if(listitem == 5)
- {
- ShowPlayerDialogEx(playerid, 7486, DIALOG_STYLE_LIST, "VIP: VIP Color", "On\nOff", "Proceed", "Cancel");
- }
- }
- }
- if(dialogid == 7484) //This is now the default dialog for job centers in any lockers AKA VIP & Famed
- {
- if(!response) return DeletePVar(playerid, "m_Item");
- switch(listitem)
- {
- case 0: // Detective
- {
- SetPVarInt(playerid, "jobSelection", 1);
- }
- case 1: // Lawyer
- {
- SetPVarInt(playerid, "jobSelection", 2);
- }
- case 2: // Whore
- {
- SetPVarInt(playerid, "jobSelection", 3);
- }
- case 3: // Drugs Dealer
- {
- //SetPVarInt(playerid, "jobSelection", 4);
- }
- case 4: // Bodyguard
- {
- SetPVarInt(playerid, "jobSelection", 8);
- if(GetPVarInt(playerid, "m_Item") == 1) SetPVarInt(playerid, "jobSelection", 7);
- }
- case 5: // Mechanic
- {
- SetPVarInt(playerid, "jobSelection", 7);
- if(GetPVarInt(playerid, "m_Item") == 1) SetPVarInt(playerid, "jobSelection", 9);
- }
- case 6: // Arms Dealer
- {
- SetPVarInt(playerid, "jobSelection", 9);
- if(GetPVarInt(playerid, "m_Item") == 1) SetPVarInt(playerid, "jobSelection", 12);
- }
- case 7: // Boxer
- {
- SetPVarInt(playerid, "jobSelection", 12);
- if(GetPVarInt(playerid, "m_Item") == 1) SetPVarInt(playerid, "jobSelection", 20);
- }
- case 8: // Drugs Smuggler
- {
- SetPVarInt(playerid, "jobSelection", 14);
- }
- case 9: // Taxi Driver
- {
- SetPVarInt(playerid, "jobSelection", 17);
- }
- case 10: // Craftsman
- {
- SetPVarInt(playerid, "jobSelection", 18);
- }
- case 11: // Bartender
- {
- SetPVarInt(playerid, "jobSelection", 19);
- }
- case 12: // Trucker
- {
- SetPVarInt(playerid, "jobSelection", 20);
- }
- case 13: // Pizza Boy
- {
- SetPVarInt(playerid, "jobSelection", 21);
- }
- }
- if(GetPVarInt(playerid, "m_Item") == 1)
- {
- if(GetJobLevel(playerid, GetPVarInt(playerid, "jobSelection")) == 5) return SendClientMessageEx(playerid, COLOR_GRAD2, "Your skill level for this job is already at its highest.");
- format(string, sizeof(string), "Item: %s - %s\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", mItemName[1], GetJobName(GetPVarInt(playerid, "jobSelection")), number_format(PlayerInfo[playerid][pCredits]), number_format(MicroItems[1]), number_format(PlayerInfo[playerid][pCredits]-MicroItems[1]));
- return ShowPlayerDialogEx(playerid, DIALOG_MICROSHOP3, DIALOG_STYLE_MSGBOX, "Micro Shop", string, "Purchase", "Cancel");
- }
- if(GetPVarType(playerid, "m_Item") && GetPVarInt(playerid, "m_Item") == 0) strcat(string, "Micro Shop: Change a Job"); else strcat(string, "Locker: Job Center");
- if(PlayerInfo[playerid][pFamed] > 0 && PlayerInfo[playerid][pDonateRank] < 3)
- {
- ShowPlayerDialogEx(playerid, 7485, DIALOG_STYLE_LIST, string, "Job Slot 1\nJob Slot 2", "Proceed", "Cancel");
- }
- else if(PlayerInfo[playerid][pDonateRank] == 2)
- {
- ShowPlayerDialogEx(playerid, 7485, DIALOG_STYLE_LIST, string, "Job Slot 1\nJob Slot 2", "Proceed", "Cancel");
- }
- else if(PlayerInfo[playerid][pDonateRank] >= 3)
- {
- ShowPlayerDialogEx(playerid, 7485, DIALOG_STYLE_LIST, string, "Job Slot 1\nJob Slot 2\nJob Slot 3", "Proceed", "Cancel");
- }
- else ShowPlayerDialogEx(playerid, 7485, DIALOG_STYLE_LIST, string, "Job Slot 1", "Proceed", "Cancel");
- }
- if(dialogid == 7485)
- {
- if(!response) return DeletePVar(playerid, "m_Item");
- if(GetPVarType(playerid, "m_Item") && GetPVarInt(playerid, "m_Item") == 0)
- {
- SetPVarInt(playerid, "m_Response", listitem);
- format(string, sizeof(string), "Item: %s - %s\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", mItemName[0], GetJobName(GetPVarInt(playerid, "jobSelection")), number_format(PlayerInfo[playerid][pCredits]), number_format(MicroItems[0]), number_format(PlayerInfo[playerid][pCredits]-MicroItems[0]));
- return ShowPlayerDialogEx(playerid, DIALOG_MICROSHOP3, DIALOG_STYLE_MSGBOX, "Micro Shop", string, "Purchase", "Cancel");
- }
- switch(listitem)
- {
- case 0:
- {
- PlayerInfo[playerid][pJob] = GetPVarInt(playerid, "jobSelection");
- SendClientMessageEx(playerid, COLOR_YELLOW, "You have changed your first job!");
- }
- case 1:
- {
- PlayerInfo[playerid][pJob2] = GetPVarInt(playerid, "jobSelection");
- SendClientMessageEx(playerid, COLOR_YELLOW, "You have changed your second job!");
- }
- case 2:
- {
- PlayerInfo[playerid][pJob3] = GetPVarInt(playerid, "jobSelection");
- SendClientMessageEx(playerid, COLOR_YELLOW, "You have changed your third job!");
- }
- }
- }
- if(dialogid == 7486)
- {
- if(!response) return 1;
- if(PlayerInfo[playerid][pWantedLevel] >= 6)
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "You cannot use this as Most Wanted!");
- return 1;
- }
- if(PlayerInfo[playerid][pJailTime] > 0)
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "You cannot do this at this time.");
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has attempted to change to VIP color while jailed.", GetPlayerNameEx(playerid));
- ABroadCast(COLOR_YELLOW, string, 2);
- return 1;
- }
- switch(listitem)
- {
- case 0:
- {
- SetPlayerColor(playerid, COLOR_VIP);
- SendClientMessageEx(playerid, COLOR_YELLOW, "You have turned on your VIP Name Color!");
- }
- case 1:
- {
- SetPlayerToTeamColor(playerid);
- SendClientMessageEx(playerid, COLOR_YELLOW, "You have turned off your VIP Name Color!");
- }
- }
- }
- if(dialogid == RESTAURANTMENU)
- {
- new pvar[25];
- if (response)
- {
- new iBusiness = InBusiness(playerid);
- format(pvar, sizeof(pvar), "Business_MenuItemPrice%d", listitem);
- new iPrice = GetPVarInt(playerid, pvar);
- format(pvar, sizeof(pvar), "Business_MenuItem%d", listitem);
- new iItem = GetPVarInt(playerid, pvar);
- new cost = (PlayerInfo[playerid][pDonateRank] >= 1) ? (floatround(iPrice * 0.8)) : (iPrice);
- if (!iPrice) {
- SendClientMessageEx(playerid, COLOR_GRAD4, "Item is not for sale anymore.");
- }
- else if (Businesses[iBusiness][bInventory] < 1) {
- SendClientMessageEx(playerid, COLOR_GRAD2, "Store does not have any items anymore!");
- }
- else if (iPrice != Businesses[iBusiness][bItemPrices][iItem]) {
- SendClientMessageEx(playerid, COLOR_GRAD4, "Purchase failed because the price for this item has changed.");
- }
- else if (GetPlayerCash(playerid) < cost) {
- SendClientMessageEx(playerid, COLOR_GRAD4, "You can't afford this item!");
- }
- else {
- format(pvar, sizeof(pvar), "Business_MenuItem%d", listitem);
- Businesses[iBusiness][bInventory]--;
- Businesses[iBusiness][bTotalSales]++;
- Businesses[iBusiness][bSafeBalance] += TaxSale(cost);
- //Businesses[iBusiness][bSafeBalance] -= floatround(cost * BIZ_PENALTY);
- GivePlayerCash(playerid, -cost);
- if (PlayerInfo[playerid][pBusiness] != InBusiness(playerid)) Businesses[iBusiness][bLevelProgress]++;
- SaveBusiness(iBusiness);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- if (PlayerInfo[playerid][pDonateRank] >= 1)
- {
- format(string,sizeof(string),"VIP: You have received 20 percent off this product. Instead of paying $%s, you paid $%s.", number_format(Businesses[iBusiness][bItemPrices][listitem]), number_format(cost));
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }
- format(string,sizeof(string),"%s(%d) (IP: %s) has bought a %s in %s (%d) for $%d.",GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid),RestaurantItems[iItem], Businesses[iBusiness][bName], iBusiness, cost);
- Log("logs/business.log", string);
- format(string,sizeof(string),"* You have purchased a %s from %s for $%d.",RestaurantItems[iItem],Businesses[iBusiness][bName], cost);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- printf("%s\n%i", RestaurantItems[iItem], iItem);
- if (strcmp("Starter Meal", RestaurantItems[iItem]) == 0) // starter
- {
- if (PlayerInfo[playerid][pFitness] >= 3)
- PlayerInfo[playerid][pFitness] -= 3;
- else
- PlayerInfo[playerid][pFitness] = 0;
- }
- if (strcmp("Full Meal", RestaurantItems[iItem]) == 0) // full meal
- {
- switch(PlayerInfo[playerid][pBackpack]) {
- case 1: if(PlayerInfo[playerid][pBItems][0] < 1 && PlayerInfo[playerid][pBEquipped]) {
- ShowPlayerDialogEx(playerid, DIALOG_BMEALSTORE, DIALOG_STYLE_MSGBOX, "Eat or Store", "You can store this full meal inside your backpack or you can eat it right now", "Store", "Eat");
- return 1;
- }
- case 2: if(PlayerInfo[playerid][pBItems][0] < 4 && PlayerInfo[playerid][pBEquipped]) {
- ShowPlayerDialogEx(playerid, DIALOG_BMEALSTORE, DIALOG_STYLE_MSGBOX, "Eat or Store", "You can store this full meal inside your backpack or you can eat it right now", "Store", "Eat");
- return 1;
- }
- case 3: if(PlayerInfo[playerid][pBItems][0] < 5 && PlayerInfo[playerid][pBEquipped]) {
- ShowPlayerDialogEx(playerid, DIALOG_BMEALSTORE, DIALOG_STYLE_MSGBOX, "Eat or Store", "You can store this full meal inside your backpack or you can eat it right now", "Store", "Eat");
- return 1;
- }
- }
- }
- SetHealth(playerid, 100.0);
- }
- }
- for (new i; i <= 13; i++)
- {
- format(pvar,sizeof(pvar),"Business_MenuItem%d", i);
- DeletePVar(playerid, pvar);
- format(pvar,sizeof(pvar),"Business_MenuItemPrice%d", i);
- DeletePVar(playerid, pvar);
- }
- }
- if (dialogid == RESTAURANTMENU2)
- {
- if (response)
- {
- new business = InBusiness(playerid);
- if (GetPlayerCash(playerid) < Businesses[business][bItemPrices][listitem])
- {
- return SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
- }
- GivePlayerCash(playerid, -Businesses[business][bItemPrices][listitem]);
- Businesses[business][bSafeBalance] += TaxSale(Businesses[business][bItemPrices][listitem]);
- Businesses[business][bTotalSales]++;
- Businesses[business][bTotalProfits] += Businesses[business][bItemPrices][listitem];
- new buf[128];
- format(buf, sizeof(buf), "You have purchased a '%s'.", RestaurantItems[listitem]);
- SendClientMessageEx(playerid, COLOR_GRAD4, buf);
- }
- return 1;
- }
- if(dialogid == STOREMENU)
- {
- new pvar[25];
- if (response)
- {
- new iBusiness = InBusiness(playerid);
- format(pvar, sizeof(pvar), "Business_MenuItemPrice%d", listitem);
- new iPrice = GetPVarInt(playerid, pvar);
- format(pvar, sizeof(pvar), "Business_MenuItem%d", listitem);
- new iItem = GetPVarInt(playerid, pvar);
- new cost = (PlayerInfo[playerid][pDonateRank] >= 1) ? (floatround(iPrice * 0.8)) : (iPrice);
- if (!iPrice) {
- SendClientMessageEx(playerid, COLOR_GRAD4, "Item is not for sale anymore.");
- }
- else if (Businesses[iBusiness][bInventory] < 1) {
- SendClientMessageEx(playerid, COLOR_GRAD2, "Store does not have any items anymore!");
- }
- else if (iPrice != Businesses[iBusiness][bItemPrices][iItem-1]) {
- SendClientMessageEx(playerid, COLOR_GRAD4, "Purchase failed because the price for this item has changed.");
- }
- else if (GetPlayerCash(playerid) < cost) {
- SendClientMessageEx(playerid, COLOR_GRAD4, "You can't afford this item!");
- }
- else {
- format(pvar, sizeof(pvar), "Business_MenuItem%d", listitem);
- if(iItem == ITEM_ILOCK || iItem == ITEM_SCALARM || iItem == ITEM_ELOCK)
- {
- if(Businesses[iBusiness][bInventory] >= StoreItemCost[iItem-1][ItemValue])
- {
- SetPVarInt(playerid, "lockcost", cost);
- SetPVarInt(playerid, "businessid", iBusiness);
- SetPVarInt(playerid, "item", iItem);
- SetPVarInt(playerid, "penalty", 1);
- GivePlayerStoreItem(playerid, 0, iBusiness, iItem, cost);
- }
- else return SendClientMessageEx(playerid, COLOR_GRAD2, "The store does not have enough stock for that item!");
- }
- else
- {
- GivePlayerStoreItem(playerid, 0, iBusiness, iItem, cost);
- }
- }
- }
- for (new i; i < sizeof(StoreItems); i++)
- {
- format(pvar,sizeof(pvar),"Business_MenuItem%d", i);
- DeletePVar(playerid, pvar);
- format(pvar,sizeof(pvar),"Business_MenuItemPrice%d", i);
- DeletePVar(playerid, pvar);
- }
- }
- if(dialogid == SHOPMENU)
- {
- if(response)
- {
- new biz = InBusiness(playerid);
- if (GetPlayerCash(playerid) < Businesses[biz][bItemPrices][listitem])
- {
- return SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
- }
- Businesses[biz][bTotalSales]++;
- Businesses[biz][bSafeBalance] += TaxSale(Businesses[biz][bItemPrices][listitem]);
- GivePlayerCash(playerid, -Businesses[biz][bItemPrices][listitem]);
- switch (listitem)
- {
- case 0:
- {
- GivePlayerValidWeapon(playerid, WEAPON_DILDO);
- SendClientMessageEx(playerid, COLOR_GRAD4, "Purple Dildo purchased, you can now pleasure yourself.");
- }
- case 1:
- {
- GivePlayerValidWeapon(playerid, WEAPON_VIBRATOR);
- SendClientMessageEx(playerid, COLOR_GRAD4, "Short Vibrator purchased, you can now pleasure yourself.");
- }
- case 2:
- {
- GivePlayerValidWeapon(playerid, WEAPON_VIBRATOR2);
- SendClientMessageEx(playerid, COLOR_GRAD4, "Long Vibrator purchased, you can now pleasure yourself.");
- }
- case 3:
- {
- GivePlayerValidWeapon(playerid, WEAPON_DILDO2);
- SendClientMessageEx(playerid, COLOR_GRAD4, "White Dildo purchased, you can now pleasure yourself.");
- }
- }
- }
- return 1;
- }
- if(dialogid == GIVEKEYS)
- {
- if(response)
- {
- if(PlayerVehicleInfo[playerid][listitem][pvId] == INVALID_PLAYER_VEHICLE_ID) {
- SendClientMessageEx(playerid, COLOR_GRAD2, "You can't give out keys to a non-existent, impounded vehicle or stored vehicle.");
- GiveKeysTo[playerid] = INVALID_PLAYER_ID;
- return 1;
- }
- if(PlayerVehicleInfo[playerid][listitem][pvAllowedPlayerId] != INVALID_PLAYER_ID)
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "You already gave someone the keys of this car.");
- GiveKeysTo[playerid] = INVALID_PLAYER_ID;
- return 1;
- }
- if(PlayerInfo[GiveKeysTo[playerid]][pVehicleKeysFrom] != INVALID_PLAYER_ID)
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "That person already has keys from a different car.");
- GiveKeysTo[playerid] = INVALID_PLAYER_ID;
- return 1;
- }
- PlayerVehicleInfo[playerid][listitem][pvAllowedPlayerId] = GiveKeysTo[playerid];
- PlayerInfo[GiveKeysTo[playerid]][pVehicleKeys] = listitem;
- PlayerInfo[GiveKeysTo[playerid]][pVehicleKeysFrom] = playerid;
- format(string, sizeof(string), "%s has given you the keys for their %s.", GetPlayerNameEx(playerid), GetVehicleName(PlayerVehicleInfo[playerid][listitem][pvId]));
- SendClientMessageEx(GiveKeysTo[playerid], COLOR_GRAD2, string);
- format(string, sizeof(string), "You gave %s the keys for your %s.", GetPlayerNameEx(GiveKeysTo[playerid]), GetVehicleName(PlayerVehicleInfo[playerid][listitem][pvId]));
- SendClientMessageEx(playerid, COLOR_GRAD2, string);
- GiveKeysTo[playerid] = INVALID_PLAYER_ID;
- }
- }
- if(dialogid == REMOVEKEYS)
- {
- if(response)
- {
- if(PlayerVehicleInfo[playerid][listitem][pvId] == INVALID_PLAYER_VEHICLE_ID) {
- SendClientMessageEx(playerid, COLOR_GRAD2, "You can't remove the keys of a non-existent, impounded vehicle or stored vehicle.");
- return 1;
- }
- if(PlayerVehicleInfo[playerid][listitem][pvAllowedPlayerId] != PlayerVehicleInfo[playerid][listitem][pvAllowedPlayerId])
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "This person doesn't have the keys of this car.");
- return 1;
- }
- if(PlayerVehicleInfo[playerid][listitem][pvAllowedPlayerId] == INVALID_PLAYER_ID)
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "You have not given anyone the keys for this car.");
- return 1;
- }
- if (ProxDetectorS(4.0, playerid, PlayerVehicleInfo[playerid][listitem][pvAllowedPlayerId])) {
- PlayerInfo[PlayerVehicleInfo[playerid][listitem][pvAllowedPlayerId]][pVehicleKeys] = INVALID_PLAYER_VEHICLE_ID;
- PlayerInfo[PlayerVehicleInfo[playerid][listitem][pvAllowedPlayerId]][pVehicleKeysFrom] = INVALID_PLAYER_ID;
- format(string, sizeof(string), "%s has taken the keys of their %s.", GetPlayerNameEx(playerid), GetVehicleName(PlayerVehicleInfo[playerid][listitem][pvId]));
- SendClientMessageEx(PlayerVehicleInfo[playerid][listitem][pvAllowedPlayerId], COLOR_GRAD2, string);
- format(string, sizeof(string), "You took the keys of your %s from %s.", GetVehicleName(PlayerVehicleInfo[playerid][listitem][pvId]),GetPlayerNameEx(PlayerVehicleInfo[playerid][listitem][pvAllowedPlayerId]));
- SendClientMessageEx(playerid, COLOR_GRAD2, string);
- PlayerVehicleInfo[playerid][listitem][pvAllowedPlayerId] = INVALID_PLAYER_ID;
- }
- else
- return SendClientMessageEx(playerid, COLOR_GRAD1, "You're not close enough to that player.");
- }
- }
- if(dialogid == MPSPAYTICKETSCOP)
- {
- if(response)
- {
- new
- szMessage[128],
- iTargetID = GetPVarInt(playerid, "vRel");
- if(PlayerVehicleInfo[iTargetID][listitem][pvTicket]) {
- format(szMessage, sizeof(szMessage), "You have paid the $%s ticket on %s's %s.", number_format(PlayerVehicleInfo[iTargetID][listitem][pvTicket]), GetPlayerNameEx(iTargetID), VehicleName[PlayerVehicleInfo[iTargetID][listitem][pvModelId] - 400]);
- SendClientMessageEx(playerid, COLOR_GRAD2, szMessage);
- format(szMessage, sizeof(szMessage), "%s has paid all tickets on your %s (%i).", GetPlayerNameEx(playerid), VehicleName[PlayerVehicleInfo[iTargetID][listitem][pvModelId] - 400], PlayerVehicleInfo[iTargetID][listitem][pvTicket]);
- SendClientMessageEx(iTargetID, COLOR_LIGHTBLUE, szMessage);
- PlayerVehicleInfo[iTargetID][listitem][pvTicket] = 0;
- g_mysql_SaveVehicle(iTargetID, listitem);
- }
- else if(PlayerVehicleInfo[iTargetID][listitem][pvImpounded])
- {
- format(szMessage, sizeof(szMessage), "You have released %s's %s.", GetPlayerNameEx(iTargetID), VehicleName[PlayerVehicleInfo[iTargetID][listitem][pvModelId] - 400]);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, szMessage);
- format(szMessage, sizeof(szMessage), "%s has released your %s from the impound. (/vstorage to spawn it)", GetPlayerNameEx(playerid), VehicleName[PlayerVehicleInfo[iTargetID][listitem][pvModelId] - 400]);
- SendClientMessageEx(iTargetID, COLOR_LIGHTBLUE, szMessage);
- format(szMessage, sizeof(szMessage), "HQ: %s has released %s's %s from the impound.", GetPlayerNameEx(playerid), GetPlayerNameEx(iTargetID), VehicleName[PlayerVehicleInfo[iTargetID][listitem][pvModelId] - 400]);
- SendGroupMessage(GROUP_TYPE_LEA, RADIO, szMessage);
- SendGroupMessage(GROUP_TYPE_TOWING, RADIO, szMessage);
- new rand = random(sizeof(DMVRelease));
- PlayerVehicleInfo[iTargetID][listitem][pvImpounded] = 0;
- PlayerVehicleInfo[iTargetID][listitem][pvSpawned] = 0;
- PlayerVehicleInfo[iTargetID][listitem][pvPosX] = DMVRelease[rand][0];
- PlayerVehicleInfo[iTargetID][listitem][pvPosY] = DMVRelease[rand][1];
- PlayerVehicleInfo[iTargetID][listitem][pvPosZ] = DMVRelease[rand][2];
- PlayerVehicleInfo[iTargetID][listitem][pvPosAngle] = 180.000;
- PlayerVehicleInfo[iTargetID][listitem][pvTicket] = 0;
- g_mysql_SaveVehicle(iTargetID, listitem);
- }
- else SendClientMessageEx(playerid, COLOR_GRAD2, "This vehicle either does not exist, or does not need to be released or have its tickets paid.");
- }
- return 1;
- }
- if(dialogid == MPSPAYTICKETS)
- {
- if(response)
- {
- new
- szMessage[128];
- if(PlayerInfo[playerid][pWantedLevel] != 0)
- {
- format(szMessage, sizeof(szMessage), "%s has attempted to pay/release their vehicles with %i active warrants.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pWantedLevel]);
- SendGroupMessage(GROUP_TYPE_LEA, DEPTRADIO, szMessage);
- return SendClientMessageEx(playerid, COLOR_YELLOW, "The police has been warned that you are wanted, and are on their way.");
- }
- if(PlayerVehicleInfo[playerid][listitem][pvTicket] && PlayerVehicleInfo[playerid][listitem][pvImpounded] == 0) {
- if(GetPlayerCash(playerid) < PlayerVehicleInfo[playerid][listitem][pvTicket]) {
- return SendClientMessageEx(playerid, COLOR_GRAD2, "You don't have enough money on you to pay the ticket.");
- }
- GivePlayerCash(playerid, -PlayerVehicleInfo[playerid][listitem][pvTicket]);
- Tax += PlayerVehicleInfo[playerid][listitem][pvTicket];
- SpeedingTickets += PlayerVehicleInfo[playerid][listitem][pvTicket];
- for(new z; z < MAX_GROUPS; z++)
- {
- if(arrGroupData[z][g_iAllegiance] == 1)
- {
- if(arrGroupData[z][g_iGroupType] == GROUP_TYPE_GOV)
- {
- new str[128];
- format(str, sizeof(str), "%s has paid some vehicle tickets adding $%s to the vault.", GetPlayerNameEx(playerid), number_format((PlayerVehicleInfo[playerid][listitem][pvTicket] / 100) * 30));
- GroupPayLog(z, str);
- break;
- }
- }
- }
- Misc_Save();
- format(szMessage, sizeof(szMessage), "You have paid the $%s ticket on your %s.", number_format(PlayerVehicleInfo[playerid][listitem][pvTicket]), VehicleName[PlayerVehicleInfo[playerid][listitem][pvModelId] - 400]);
- SendClientMessageEx(playerid, COLOR_GRAD2, szMessage);
- PlayerVehicleInfo[playerid][listitem][pvTicket] = 0;
- g_mysql_SaveVehicle(playerid, listitem);
- }
- else if(PlayerVehicleInfo[playerid][listitem][pvImpounded]) {
- new
- iCost = (PlayerVehicleInfo[playerid][listitem][pvPrice] / 20) + PlayerVehicleInfo[playerid][listitem][pvTicket] + (PlayerInfo[playerid][pLevel] * 3000);
- if(GetPlayerCash(playerid) < iCost) {
- return SendClientMessage(playerid, COLOR_GRAD2, "You don't have enough money on you.");
- }
- format(szMessage, sizeof(szMessage), "You have released your %s for $%i.", VehicleName[PlayerVehicleInfo[playerid][listitem][pvModelId] - 400], iCost);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, szMessage);
- GivePlayerCash(playerid, -iCost);
- Tax += iCost;
- SpeedingTickets += iCost;
- for(new z; z < MAX_GROUPS; z++)
- {
- if(arrGroupData[z][g_iAllegiance] == 0 || arrGroupData[z][g_iAllegiance] == 1)
- {
- if(arrGroupData[z][g_iGroupType] == GROUP_TYPE_GOV)
- {
- new str[128];
- format(str, sizeof(str), "%s has paid some vehicle tickets adding $%s to the vault.", GetPlayerNameEx(playerid), number_format((iCost / 100) * 30));
- GroupPayLog(z, str);
- break;
- }
- }
- }
- Misc_Save();
- new rand = random(sizeof(DMVRelease));
- PlayerVehicleInfo[playerid][listitem][pvPosX] = DMVRelease[rand][0];
- PlayerVehicleInfo[playerid][listitem][pvPosY] = DMVRelease[rand][1];
- PlayerVehicleInfo[playerid][listitem][pvPosZ] = DMVRelease[rand][2];
- PlayerVehicleInfo[playerid][listitem][pvImpounded] = 0;
- PlayerVehicleInfo[playerid][listitem][pvSpawned] = 0;
- PlayerVehicleInfo[playerid][listitem][pvPosAngle] = 180.000;
- PlayerVehicleInfo[playerid][listitem][pvTicket] = 0;
- SendClientMessageEx(playerid, COLOR_WHITE, "Your vehicle has been released, type /vstorage to spawn it.");
- g_mysql_SaveVehicle(playerid, listitem);
- }
- else SendClientMessage(playerid, COLOR_GRAD2, "This vehicle either does not exist, or does not need to be released or have its tickets paid.");
- }
- return 1;
- }
- if(dialogid == REPORTSMENU)
- {
- if(response)
- {
- if(CancelReport[playerid] == listitem) return 1;
- new reportid = ListItemReportId[playerid][listitem];
- if(Reports[reportid][BeingUsed] == 0)
- {
- SendClientMessageEx(playerid, COLOR_GREY, " That report ID is not being used!");
- return 1;
- }
- if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
- {
- SendClientMessageEx(playerid, COLOR_GREY, " The reporter has disconnected !");
- Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
- Reports[reportid][BeingUsed] = 0;
- return 1;
- }
- format(string, sizeof(string), "AdmCmd: %s has accepted the report from %s (ID: %i RID: %i).", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]), Reports[reportid][ReportFrom], reportid);
- ABroadCast(COLOR_ORANGE, string, 2);
- AddReportToken(playerid); // Report Tokens
- if(PlayerInfo[playerid][pAdmin] == 1)
- {
- SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, "An admin has accepted your report and is reviewing it, you can /reply to send messages to the admin reviewing your report.");
- }
- else
- {
- format(string, sizeof(string), "%s has accepted your report and is reviewing it, you can /reply to send messages to the admin reviewing your report.", GetPlayerNameEx(playerid));
- SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
- }
- PlayerInfo[playerid][pAcceptReport]++;
- ReportCount[playerid]++;
- ReportHourCount[playerid]++;
- Reports[reportid][ReplyTimerr] = SetTimerEx("ReplyTimer", 30000, 0, "d", reportid);
- Reports[reportid][CheckingReport] = playerid;
- //Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
- Reports[reportid][BeingUsed] = 0;
- Reports[reportid][TimeToExpire] = 0;
- //strmid(Reports[reportid][Report], "None", 0, 4, 4);
- }
- else
- {
- if(CancelReport[playerid] == listitem) return 1;
- new reportid = ListItemReportId[playerid][listitem];
- if(Reports[reportid][BeingUsed] == 0)
- {
- SendClientMessageEx(playerid, COLOR_GREY, " That report ID is not being used!");
- return 1;
- }
- if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
- {
- SendClientMessageEx(playerid, COLOR_GREY, " The reporter has disconnected !");
- Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
- Reports[reportid][BeingUsed] = 0;
- return 1;
- }
- format(string, sizeof(string), "AdmCmd: %s has trashed the report from %s (RID: %i).", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]), reportid);
- ABroadCast(COLOR_ORANGE, string, 2);
- if(PlayerInfo[playerid][pAdmin] == 1)
- {
- SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, "An admin has marked your report invalid. It will not be reviewed.");
- }
- else
- {
- format(string, sizeof(string), "%s has marked your report invalid. It will not be reviewed.", GetPlayerNameEx(playerid));
- SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
- }
- PlayerInfo[playerid][pTrashReport]++;
- Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
- Reports[reportid][BeingUsed] = 0;
- Reports[reportid][TimeToExpire] = 0;
- new reportdialog[2048], itemid = 0;
- for(new i = 0; i < MAX_REPORTS; i++)
- {
- if(Reports[i][BeingUsed] == 1 && itemid < 40)
- {
- ListItemReportId[playerid][itemid] = i;
- itemid++;
- if(strlen((Reports[i][Report])) > 92)
- {
- new firstline[128], secondline[128];
- strmid(firstline, Reports[i][Report], 0, 88);
- strmid(secondline, Reports[i][Report], 88, 128);
- format(reportdialog, sizeof(reportdialog), "%s%s(ID:%i) | Report: %s", reportdialog, GetPlayerNameEx(Reports[i][ReportFrom]), Reports[i][ReportFrom], i, firstline);
- format(reportdialog, sizeof(reportdialog), "%s%s", reportdialog, secondline);
- ListItemReportId[playerid][itemid] = i;
- itemid++;
- }
- else format(reportdialog, sizeof(reportdialog), "%s%s(ID:%i) | Report: %s", reportdialog, GetPlayerNameEx(Reports[i][ReportFrom]), Reports[i][ReportFrom], i, (Reports[i][Report]));
- format(reportdialog, sizeof(reportdialog), "%s\n", reportdialog);
- }
- }
- CancelReport[playerid] = itemid;
- format(reportdialog, sizeof(reportdialog), "%s\n", reportdialog);
- format(reportdialog, sizeof(reportdialog), "%sCancel Reports", reportdialog);
- //SendClientMessageEx(playerid, COLOR_GREEN, "___________________________________________________");
- ShowPlayerDialogEx(playerid, REPORTSMENU, DIALOG_STYLE_LIST, "Reports", reportdialog, "Accept", "Trash");
- //strmid(Reports[reportid][Report], "None", 0, 4, 4);
- }
- }
- if(dialogid == COLORMENU)
- {
- if(response)
- {
- if(listitem == 0)
- {
- SetPlayerColor(playerid,COLOR_DBLUE);
- SendClientMessageEx(playerid, COLOR_DBLUE, "Your color has been set to Blue!");
- }
- if(listitem == 1)
- {
- SetPlayerColor(playerid,COLOR_BLACK);
- SendClientMessageEx(playerid, COLOR_BLACK, "Your color has been set to Black!");
- }
- if(listitem == 2)
- {
- SetPlayerColor(playerid,COLOR_RED);
- SendClientMessageEx(playerid, COLOR_RED, "Your color has been set to Red!");
- }
- if(listitem == 3)
- {
- SetPlayerColor(playerid,TEAM_ORANGE_COLOR);
- SendClientMessageEx(playerid, TEAM_ORANGE_COLOR, "Your color has been set to Orange!");
- }
- if(listitem == 4)
- {
- SetPlayerColor(playerid,COLOR_PINK);
- SendClientMessageEx(playerid, COLOR_PINK, "Your color has been set to Pink!");
- }
- if(listitem == 5)
- {
- SetPlayerColor(playerid,COLOR_PURPLE);
- SendClientMessageEx(playerid, COLOR_PURPLE, "Your color has been set to Purple!");
- }
- if(listitem == 6)
- {
- SetPlayerColor(playerid,COLOR_GREEN);
- SendClientMessageEx(playerid, COLOR_GREEN, "Your color has been set to Green!");
- }
- if(listitem == 7)
- {
- SetPlayerColor(playerid,COLOR_YELLOW);
- SendClientMessageEx(playerid, COLOR_YELLOW, "Your color has been set to Yellow!");
- }
- if(listitem == 8)
- {
- SetPlayerColor(playerid,COLOR_WHITE);
- SendClientMessageEx(playerid, COLOR_WHITE, "Your color has been set to White!");
- }
- if(listitem == 9)
- {
- SetPlayerColor(playerid,TEAM_APRISON_COLOR);
- SendClientMessageEx(playerid, COLOR_WHITE, "Your color has been set to OOC Prisoner Orange!");
- }
- }
- }
- if(dialogid == FIGHTMENU)
- {
- if(response)
- {
- if(GetPlayerCash(playerid) >= 50000)
- {
- if(listitem == 0)
- {
- PlayerInfo[playerid][pFightStyle] = FIGHT_STYLE_BOXING;
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
- SendClientMessageEx(playerid, COLOR_WHITE, " You are now using the boxing fighting style!");
- if(PlayerInfo[playerid][pDonateRank] >= 1)
- {
- GivePlayerCash(playerid, -40000);
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have received 20 percent off this product. Instead of paying $50000, you paid $40000.");
- }
- else
- {
- GivePlayerCash(playerid, -50000);
- }
- }
- if(listitem == 1)
- {
- PlayerInfo[playerid][pFightStyle] = FIGHT_STYLE_ELBOW;
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
- SendClientMessageEx(playerid, COLOR_WHITE, " You are now using the elbow fighting style!");
- if(PlayerInfo[playerid][pDonateRank] >= 1)
- {
- GivePlayerCash(playerid, -40000);
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have received 20 percent off this product. Instead of paying $50000, you paid $40000.");
- }
- else
- {
- GivePlayerCash(playerid, -50000);
- }
- }
- if(listitem == 2)
- {
- PlayerInfo[playerid][pFightStyle] = FIGHT_STYLE_KNEEHEAD;
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
- SendClientMessageEx(playerid, COLOR_WHITE, " You are now using the kneehead fighting style!");
- if(PlayerInfo[playerid][pDonateRank] >= 1)
- {
- GivePlayerCash(playerid, -40000);
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have received 20 percent off this product. Instead of paying $50000, you paid $40000.");
- }
- else
- {
- GivePlayerCash(playerid, -50000);
- }
- }
- if(listitem == 3)
- {
- PlayerInfo[playerid][pFightStyle] = FIGHT_STYLE_KUNGFU;
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
- SendClientMessageEx(playerid, COLOR_WHITE, " You are now using the kungfu fighting style!");
- if(PlayerInfo[playerid][pDonateRank] >= 1)
- {
- GivePlayerCash(playerid, -40000);
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have received 20 percent off this product. Instead of paying $50000, you paid $40000.");
- }
- else
- {
- GivePlayerCash(playerid, -50000);
- }
- }
- if(listitem == 4)
- {
- PlayerInfo[playerid][pFightStyle] = FIGHT_STYLE_GRABKICK;
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
- SendClientMessageEx(playerid, COLOR_WHITE, " You are now using the grabkick fighting style!");
- if(PlayerInfo[playerid][pDonateRank] >= 1)
- {
- GivePlayerCash(playerid, -40000);
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have received 20 percent off this product. Instead of paying $50000, you paid $40000.");
- }
- else
- {
- GivePlayerCash(playerid, -50000);
- }
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, " You do not have the cash for that!");
- return 1;
- }
- if(listitem == 5)
- {
- PlayerInfo[playerid][pFightStyle] = FIGHT_STYLE_NORMAL;
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
- SendClientMessageEx(playerid, COLOR_WHITE, " You are now using the normal fighting style!");
- return 1;
- }
- }
- }
- if(dialogid == DIALOG_LICENSE_BUY && response) // LICENSE BUY DIALOG ~Brian
- {
- switch (listitem)
- {
- /*case 0:
- {
- if(PlayerInfo[playerid][pCarLic] == 0)
- {
- if(GetPlayerCash(playerid) < 5000)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You can not afford to buy a driver's license.");
- return 1;
- }
- GivePlayerCash(playerid,-5000);
- PlayerInfo[playerid][pCarLic] = 1;
- SendClientMessageEx(playerid, COLOR_GREY, "You have successfully acquired a driver's license.");
- }
- else SendClientMessageEx(playerid, COLOR_GREY, "You already have a driver's license.");
- }*/
- case 0:
- {
- if(PlayerInfo[playerid][pBoatLic] == 0)
- {
- if(GetPlayerCash(playerid) < 5000)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You can not afford to buy a boating license.");
- return 1;
- }
- GivePlayerCash(playerid,-5000);
- PlayerInfo[playerid][pBoatLic] = 1;
- SendClientMessageEx(playerid, COLOR_GREY, "You have successfully acquired a boating license.");
- }
- else SendClientMessageEx(playerid, COLOR_GREY, "You already have a boating license.");
- }
- case 1:
- {
- if(PlayerInfo[playerid][pFlyLic] == 0)
- {
- if(PlayerInfo[playerid][pLevel] >=2)
- {
- if(GetPlayerCash(playerid) < 25000)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You can not afford to buy a pilot's license.");
- return 1;
- }
- GivePlayerCash(playerid,-25000);
- PlayerInfo[playerid][pFlyLic] = 1;
- SendClientMessageEx(playerid, COLOR_GREY, "You have successfully acquired a pilot license; you will now be able to pilot aircraft.");
- }
- else SendClientMessageEx(playerid, COLOR_GREY, "You must be level 2 or above to acquire a pilot license.");
- }
- else SendClientMessageEx(playerid, COLOR_GREY, "You already have a pilot license.");
- }
- case 2:
- {
- if(PlayerInfo[playerid][pTaxiLicense] == 0)
- {
- if(GetPlayerCash(playerid) < 35000)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You can not afford to buy a taxi license.");
- return 1;
- }
- GivePlayerCash(playerid,-35000);
- PlayerInfo[playerid][pTaxiLicense] = 1;
- SendClientMessageEx(playerid, COLOR_GREY, "You have successfully acquired a taxi license; you will be able to use /fare in any vehicle, and accept calls for taxis.");
- }
- else SendClientMessageEx(playerid, COLOR_GREY, "You already have a taxi license.");
- }
- }
- }
- if(dialogid == MDC_MAIN && response)
- {
- if(!IsMDCPermitted(playerid)) return SendClientMessageEx(playerid, COLOR_LIGHTBLUE, " Login Failed. You are not permitted to use the MDC!");
- switch( listitem )
- {
- case 0:
- {
- ShowPlayerDialogEx(playerid, MDC_CIVILIANS, DIALOG_STYLE_LIST, "MDC - Logged in | Civilian Options", "*Check Record\n*View Arrest Reports\n*Licenses\n*Warrants\n*Issue Warrant\n*BOLO\n*Create BOLO\n*Delete", "OK", "Cancel");
- }
- case 1: ShowPlayerDialogEx(playerid, MDC_SUSPECT, DIALOG_STYLE_INPUT, "MDC - Register Suspect", "Please enter (a part of) the name of the suspect to register them.", "OK", "Cancel");
- case 2: ShowPlayerDialogEx(playerid, G_LOCKER_CLEARSUSPECT, DIALOG_STYLE_INPUT, arrGroupData[PlayerInfo[playerid][pMember]][g_szGroupName]," Who would you like to clear?","Clear","Return");
- case 3: ShowPlayerDialogEx(playerid, MDC_VEHICLE, DIALOG_STYLE_INPUT, "MDC - Vehicle Registrations", "Please enter (a part of) the name of the person to check their active vehicle registrations.", "OK", "Cancel");
- case 4:
- {
- ShowPlayerDialogEx(playerid, MDC_FIND, DIALOG_STYLE_INPUT, "MDC - Logged in | LEO GPS Location", "Enter the Law Enforcment Official's Name or ID No.", "Enter", "Cancel");
- }
- case 5:
- {
- new groups[1024], item;
- for (new i; i < MAX_GROUPS; i++)
- {
- if (arrGroupData[i][g_szGroupName][0] && arrGroupData[i][g_iGroupType] == GROUP_TYPE_LEA && arrGroupData[i][g_iAllegiance] == arrGroupData[PlayerInfo[playerid][pMember]][g_iAllegiance])
- {
- format(groups, sizeof(groups), "%s*%s\n", groups, arrGroupData[i][g_szGroupName]);
- ListItemTrackId[playerid][item++] = i;
- }
- ShowPlayerDialogEx(playerid, MDC_MEMBERS, DIALOG_STYLE_LIST, "MDC - Logged in | Agency List", groups, "OK", "Cancel");
- }
- }
- case 6: ShowPlayerDialogEx(playerid, MDC_MESSAGE, DIALOG_STYLE_INPUT, "MDC - Logged In | MDC Message", "Enter recipient's Name or ID No.", "OK", "Cancel");
- case 7: ShowPlayerDialogEx(playerid, MDC_SMS, DIALOG_STYLE_INPUT, "MDC - Logged In | SMS", "Enter recipient's phone number.", "OK", "Cancel");
- }
- }
- if(dialogid == MDC_SUSPECT) return cmd_su(playerid, inputtext);
- if(dialogid == MDC_VEHICLE) return cmd_vmdc(playerid, inputtext);
- if(dialogid == MDC_VLOOKUP) return cmd_vlookup(playerid, inputtext);
- if(dialogid == MDC_FIND && response)
- {
- new giveplayerid;
- if(!IsMDCPermitted(playerid)) return SendClientMessageEx(playerid, COLOR_LIGHTBLUE, " Login Failed. You are not permitted to use the MDC!");
- if(sscanf(inputtext, "u", giveplayerid))
- {
- ShowPlayerDialogEx(playerid, MDC_FIND, DIALOG_STYLE_INPUT, "MDC - Logged in | LEO GPS Location", "Enter the Law Enforcment Official's Name or ID No.", "Enter", "Cancel");
- return 1;
- }
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(giveplayerid == playerid)
- {
- ShowPlayerDialogEx(playerid, MDC_FIND, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: You cannot find yourself.\nEnter the Law Enforcment Official's Name or ID No.", "Enter", "Cancel");
- return 1;
- }
- if(IsACop(giveplayerid) && arrGroupData[PlayerInfo[giveplayerid][pMember]][g_iAllegiance] == arrGroupData[PlayerInfo[playerid][pMember]][g_iAllegiance])
- {
- SetPlayerMarkerForPlayer(playerid,giveplayerid,FIND_COLOR);
- FindingPlayer[playerid] = giveplayerid;
- FindTime[playerid] = 1;
- FindTimePoints[playerid] = 30;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, " You can only track other cops!");
- }
- }
- }
- }
- if(dialogid == MDC_CIVILIANS && response)
- { //"*Check Record\n*View Arrest Reports\n*Licenses\n*Warrants\n*Issue Warrant\n*BOLO\n*Create BOLO\n*Delete"
- new WarrantString[512];
- if(!IsMDCPermitted(playerid)) return SendClientMessageEx(playerid, COLOR_LIGHTBLUE, " Login Failed. You are not permitted to use the MDC!");
- if(News[hTaken6] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd6], News[hContact6]);
- strcat(WarrantString, string, sizeof(WarrantString));
- }
- if(News[hTaken7] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd7], News[hContact7]);
- strcat(WarrantString, string, sizeof(WarrantString));
- }
- if(News[hTaken8] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd8], News[hContact8]);
- strcat(WarrantString, string, sizeof(WarrantString));
- }
- if(News[hTaken9] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd9], News[hContact9]);
- strcat(WarrantString, string, sizeof(WarrantString));
- }
- if(News[hTaken10] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd10], News[hContact10]);
- strcat(WarrantString, string, sizeof(WarrantString));
- }
- if(News[hTaken11] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd11], News[hContact11]);
- strcat(WarrantString, string, sizeof(WarrantString));
- }
- if(News[hTaken12] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd12], News[hContact12]);
- strcat(WarrantString, string, sizeof(WarrantString));
- }
- if(News[hTaken13] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd13], News[hContact13]);
- strcat(WarrantString, string, sizeof(WarrantString));
- }
- if(strlen(WarrantString) == 0)
- {
- strcat(WarrantString, "No Warrants at this time.", sizeof(WarrantString));
- }
- switch(listitem)
- {
- case 0: ShowPlayerDialogEx(playerid, MDC_CHECK, DIALOG_STYLE_INPUT, "MDC - Logged in | Records Check", "Enter the Person's Name or ID No.", "Enter", "Cancel");
- case 1: ShowPlayerDialogEx(playerid, MDC_REPORTS, DIALOG_STYLE_INPUT, "MDC - Logged in | Reports Check", "Enter the Person's Name or ID No.", "Enter", "Cancel");
- case 2: ShowPlayerDialogEx(playerid, MDC_LICENSES, DIALOG_STYLE_INPUT, "MDC - Logged in | License Check", "Enter the Person's Name or ID No.", "Enter", "Cancel");
- case 3: ShowPlayerDialogEx(playerid, MDC_WARRANTS, DIALOG_STYLE_LIST, "MDC - Logged in | Warrant List", WarrantString, "Enter", "Cancel");
- case 4: ShowPlayerDialogEx(playerid, MDC_ISSUE_SLOT, DIALOG_STYLE_LIST, "MDC - Logged in | Which Slot would you like to use?", "1\n2\n3\n4\n5\n6\n7\n8", "Enter", "Cancel");
- case 5:
- {
- new BOLOString[512];
- if(News[hTaken14] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd14], News[hContact14]);
- strcat(BOLOString, string, sizeof(BOLOString));
- }
- if(News[hTaken15] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd15], News[hContact15]);
- strcat(BOLOString, string, sizeof(BOLOString));
- }
- if(News[hTaken16] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd16], News[hContact16]);
- strcat(BOLOString, string, sizeof(BOLOString));
- }
- if(News[hTaken17] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd17], News[hContact17]);
- strcat(BOLOString, string, sizeof(BOLOString));
- }
- if(News[hTaken18] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd18], News[hContact18]);
- strcat(BOLOString, string, sizeof(BOLOString));
- }
- if(News[hTaken19] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd19], News[hContact19]);
- strcat(BOLOString, string, sizeof(BOLOString));
- }
- if(News[hTaken20] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd20], News[hContact20]);
- strcat(BOLOString, string, sizeof(BOLOString));
- }
- if(News[hTaken21] == 1)
- {
- format(string, sizeof(string), "%s :: Officer: %s\n", News[hAdd21], News[hContact21]);
- strcat(BOLOString, string, sizeof(BOLOString));
- }
- if(strlen(BOLOString) == 0)
- {
- strcat(BOLOString, "No BOLOs at this time.", sizeof(BOLOString));
- }
- ShowPlayerDialogEx(playerid, MDC_BOLOLIST, DIALOG_STYLE_LIST, "MDC - Logged In | BOLO List", BOLOString, "OK", "Cancel");
- }
- case 6:
- {
- ShowPlayerDialogEx(playerid, MDC_BOLO_SLOT, DIALOG_STYLE_LIST, "MDC - Logged in | Which Slot would you like to use?", "1\n2\n3\n4\n5\n6\n7\n8", "Enter", "Cancel");
- }
- case 7:
- {
- ShowPlayerDialogEx(playerid, MDC_DELETE, DIALOG_STYLE_LIST, "MDC - Logged In | Delete", "*BOLO\n*Warrant", "OK", "Cancel");
- }
- }
- }
- if(dialogid == MDC_MEMBERS && response)
- {
- if(!IsMDCPermitted(playerid)) return SendClientMessageEx(playerid, COLOR_LIGHTBLUE, " Login Failed. You are not permitted to use the MDC!");
- new MemberString[1024], giveplayer[MAX_PLAYER_NAME], badge[11];
- new rank[GROUP_MAX_RANK_LEN], division[GROUP_MAX_DIV_LEN], employer[GROUP_MAX_NAME_LEN];
- new group = ListItemTrackId[playerid][listitem];
- foreach(new i: Player)
- {
- if(PlayerInfo[i][pMember] == group)
- {
- if(strcmp(PlayerInfo[i][pBadge], "None", true) != 0) format(badge, sizeof(badge), "[%s] ", PlayerInfo[i][pBadge]);
- GetPlayerGroupInfo(i, rank, division, employer);
- giveplayer = GetPlayerNameEx(i);
- format(string, sizeof(string), "* %s%s (%s) %s Ph: %d\n", badge, rank, division, giveplayer, PlayerInfo[i][pPnumber]);
- strcat(MemberString, string, sizeof(MemberString));
- }
- }
- if(strlen(MemberString) == 0)
- {
- strcat(MemberString, "No Members online at this time.", sizeof(MemberString));
- }
- format(string, sizeof(string), "MDC - Logged in | %s Members", arrGroupData[group][g_szGroupName]);
- ShowPlayerDialogEx(playerid, DIALOG_NOTHING, DIALOG_STYLE_LIST, string, MemberString, "Select", "Cancel");
- }
- if(dialogid == MDC_WARRANTS && response)
- {
- if(!IsMDCPermitted(playerid)) return SendClientMessageEx(playerid, COLOR_LIGHTBLUE, " Login Failed. You are not permitted to use the MDC!");
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Warrants", inputtext, "OK", "Back");
- }
- if(dialogid == MDC_BOLOLIST && response)
- {
- if(!IsMDCPermitted(playerid)) return SendClientMessageEx(playerid, COLOR_LIGHTBLUE, " Login Failed. You are not permitted to use the MDC!");
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | BOLO Hot Sheet", inputtext, "OK", "Back");
- }
- /* if(dialogid == MDC_CHECK && response)
- {
- if(!IsMDCPermitted(playerid)) return SendClientMessageEx(playerid, COLOR_LIGHTBLUE, " Login Failed. You are not permitted to use the MDC!");
- new giveplayerid = ReturnUser(inputtext);
- new HistoryString[1024];
- new giveplayer[MAX_PLAYER_NAME];
- giveplayer = GetPlayerNameEx(giveplayerid);
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- format(string, sizeof(string), "Name : %s\n", GetPlayerNameEx(giveplayerid));
- strcat(HistoryString, string, sizeof(HistoryString));
- format(string, sizeof(string), "Crime : %s\n", PlayerCrime[giveplayerid][pAccusedof]);
- strcat(HistoryString, string, sizeof(HistoryString));
- format(string, sizeof(string), "Claimant : %s\n", PlayerCrime[giveplayerid][pVictim]);
- strcat(HistoryString, string, sizeof(HistoryString));
- format(string, sizeof(string), "Reported : %s\n", PlayerCrime[giveplayerid][pAccusing]);
- strcat(HistoryString, string, sizeof(HistoryString));
- format(string, sizeof(string), "Accused : %s\n", PlayerCrime[giveplayerid][pBplayer]);
- strcat(HistoryString, string, sizeof(HistoryString));
- if(PlayerInfo[giveplayerid][pProbationTime] != 0)
- {
- format(string, sizeof(string), "Probation : %d minutes left\n", PlayerInfo[giveplayerid][pProbationTime]);
- strcat(HistoryString, string, sizeof(HistoryString));
- }
- for(new i=0; i<MAX_PLAYERVEHICLES; i++)
- {
- if(PlayerVehicleInfo[giveplayerid][i][pvTicket] != 0)
- {
- format(string, sizeof(string), "Vehicle registration: %d | Vehicle Name: %s | Ticket: $%d.\n",PlayerVehicleInfo[giveplayerid][i][pvId],GetVehicleName(PlayerVehicleInfo[giveplayerid][i][pvId]),PlayerVehicleInfo[giveplayerid][i][pvTicket]);
- strcat(HistoryString, string, sizeof(HistoryString));
- }
- }
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_LIST, "MDC - Logged in | Criminal History", HistoryString, "OK", "Cancel");
- format(string, sizeof(string), "** DISPATCH: %s has run a check for warrants on %s **", GetPlayerNameEx(playerid), giveplayer);
- SendRadioMessage(1, COLOR_DBLUE, string);
- SendRadioMessage(2, COLOR_DBLUE, string);
- SendRadioMessage(3, COLOR_DBLUE, string);
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | ERROR ", "There is no record of that person.", "OK", "Cancel");
- return 1;
- }
- }*/
- if(dialogid == MDC_REPORTS && response)
- {
- if(!IsMDCPermitted(playerid)) return SendClientMessageEx(playerid, COLOR_LIGHTBLUE, " Login Failed. You are not permitted to use the MDC!");
- new giveplayerid = ReturnUser(inputtext);
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- DisplayReports(playerid, giveplayerid);
- format(string, sizeof(string), "* %s has run a check for arrest reports on %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- foreach(new i: Player)
- {
- if(PlayerInfo[playerid][pToggledChats][12] == 0)
- {
- if(PlayerInfo[i][pMember] == PlayerInfo[playerid][pMember] && PlayerInfo[playerid][pRank] >= arrGroupData[PlayerInfo[i][pMember]][g_iRadioAccess]) {
- ChatTrafficProcess(i, arrGroupData[PlayerInfo[i][pMember]][g_hRadioColour] * 256 + 255, string, 12);
- }
- }
- }
- //SendGroupMessage(GROUP_TYPE_LEA, COLOR_DBLUE, string);
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | ERROR ", "There is no record of that person.", "OK", "Cancel");
- return 1;
- }
- }
- if(dialogid == MDC_SHOWREPORTS && response)
- {
- new stpos = strfind(inputtext, "(");
- new fpos = strfind(inputtext, ")");
- new reportidstr[6], repid;
- strmid(reportidstr, inputtext, stpos+1, fpos);
- repid = strval(reportidstr);
- return DisplayReport(playerid, repid);
- }
- if(dialogid == DIALOG_JFINECONFIRM)
- {
- if(response)
- {
- SetPVarInt(playerid, "jGroup", listitem);
- format(string, sizeof(string), "Are you sure you want to send a portion of the fine to %s?", arrGroupData[listitem][g_szGroupName]);
- ShowPlayerDialogEx(playerid, DIALOG_JFINE, DIALOG_STYLE_MSGBOX, "Judge Fine - Confirm", string, "Confirm", "Cancel");
- }
- else {
- DeletePVar(playerid, "jGroup");
- DeletePVar(playerid, "jfined");
- DeletePVar(playerid, "judgefine");
- DeletePVar(playerid, "jreason");
- SendClientMessageEx(playerid, COLOR_GRAD2, "Fine Cancelled - retype the judge fine command to start again.");
- }
- }
- if(dialogid == DIALOG_JFINE)
- {
- if(response)
- {
- new iGroupID = GetPVarInt(playerid, "jGroup");
- new giveplayerid = GetPVarInt(playerid, "jfined");
- new judgefine = GetPVarInt(playerid, "judgefine");
- new reason[64];
- GetPVarString(playerid, "jreason", reason, 64);
- new Judicial, Group, Gov;
- GivePlayerCash(giveplayerid, -judgefine);
- Judicial = floatround( judgefine * 0.10 ); // Judicials cut - 10%
- Group = floatround ( judgefine * 0.6); // Arresting Groups Cut - 60%
- Gov = floatround ( judgefine * 0.10); // Government cut = 10%
- // 20% Deleted from economy
- Tax += Gov;
- arrGroupData[PlayerInfo[playerid][pMember]][g_iBudget] += Judicial;
- arrGroupData[iGroupID][g_iBudget] += Group;
- new str[128];
- format(str, sizeof(str), "%s has been fined by $%s by Judge %s. $%s has been sent to the %s Vault.",GetPlayerNameEx(giveplayerid), number_format(judgefine), GetPlayerNameEx(playerid), number_format(Judicial), arrGroupData[PlayerInfo[playerid][pMember]][g_szGroupName]);
- GroupPayLog(PlayerInfo[playerid][pMember], str);
- format(str, sizeof(str), "%s has been fined by $%s by Judge %s. $%s has been sent to the %s Vault.",GetPlayerNameEx(giveplayerid), number_format(judgefine), GetPlayerNameEx(playerid), number_format(Group), arrGroupData[iGroupID][g_szGroupName]);
- GroupPayLog(iGroupID, str);
- for(new z; z < MAX_GROUPS; z++)
- {
- if(arrGroupData[z][g_iAllegiance] == 1)
- {
- if(arrGroupData[z][g_iGroupType] == GROUP_TYPE_GOV)
- {
- format(str, sizeof(str), "%s has been fined by $%s by Judge %s. $%s has been sent to the SA Government Vault.",GetPlayerNameEx(giveplayerid), number_format(judgefine), GetPlayerNameEx(playerid), number_format(Gov));
- GroupPayLog(z, str);
- break;
- }
- }
- }
- format(string, sizeof(string), "You have fined %s $%s, reason: %s", GetPlayerNameEx(giveplayerid), number_format(judgefine), reason);
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "You have been fined $%s by %s, reason: %s", number_format(judgefine), GetPlayerNameEx(playerid), reason);
- SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s has been fined $%s by Judge %s. Commission has been sent to %s.", GetPlayerNameEx(giveplayerid), number_format(judgefine), GetPlayerNameEx(playerid), arrGroupData[iGroupID][g_szGroupName]);
- ABroadCast( COLOR_YELLOW, string, 2);
- format(string, sizeof(string), "%s(%d) has been fined $%s by Judge %s(%d). Commission has been sent to %s.", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), number_format(judgefine), GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), arrGroupData[iGroupID][g_szGroupName]);
- Log("logs/rpspecial.log", string);
- }
- }
- if(dialogid == DIALOG_ARRESTREPORT)
- {
- if(response)
- {
- new moneys = GetPVarInt(playerid, "Arrest_Price"), time = GetPVarInt(playerid, "Arrest_Time"),
- bail = GetPVarInt(playerid, "Arrest_Bail"), bailprice = 15000000, // STATIC BAIL. GetPVarInt(playerid, "Arrest_BailPrice"),
- suspect = GetPVarInt(playerid, "Arrest_Suspect"), arresttype = GetPVarInt(playerid, "Arrest_Type");
- if(strlen(inputtext) < 30 || strlen(inputtext) > 128)
- {
- format(szMiscArray, sizeof(szMiscArray), "Please write a brief arrest report on how %s acted during the arrest.\n\nThis report must be at least 30 characters and no more than 128.", GetPlayerNameEx(suspect));
- return ShowPlayerDialogEx(playerid, DIALOG_ARRESTREPORT, DIALOG_STYLE_INPUT, "Arrest Report", szMiscArray, "Submit", "");
- }
- switch(arresttype)
- {
- case 0, 1: { //arrest
- if(bail && bailprice > 0)
- {
- format(string, sizeof(string), "You have been given the option to post bail. Your bail is set at $%s. (/bail)", number_format(bailprice));
- SendClientMessageEx(suspect, COLOR_RED, string);
- PlayerInfo[suspect][pBailPrice] = bailprice;
- }
- format(string, sizeof(string), "* You have sent %s to the Local PD Jail.", GetPlayerNameEx(suspect));
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- GivePlayerCash(suspect, -moneys);
- new money = floatround(moneys / 3), iGroupID = PlayerInfo[playerid][pMember];
- arrGroupData[iGroupID][g_iBudget] += money;
- new str[164];
- format(str, sizeof(str), "%s has been arrested by %s for %d minutes and fined $%d. $%d has been sent to %s's budget fund.",GetPlayerNameEx(suspect), GetPlayerNameEx(playerid),time, moneys, money, arrGroupData[iGroupID][g_szGroupName]);
- GroupPayLog(iGroupID, str);
- for(new z; z < MAX_GROUPS; z++)
- {
- if(arrGroupData[iGroupID][g_iAllegiance] == 1)
- {
- if(arrGroupData[z][g_iAllegiance] == 1)
- {
- if(arrGroupData[z][g_iGroupType] == GROUP_TYPE_GOV)
- {
- Tax += money;
- format(str, sizeof(str), "%s has been arrested by %s and fined $%d. $%d has been sent to the SA Government Vault.",GetPlayerNameEx(suspect), GetPlayerNameEx(playerid), moneys, money);
- GroupPayLog(z, str);
- break;
- }
- }
- }
- else if(arrGroupData[z][g_iAllegiance] == 2)
- {
- if(arrGroupData[z][g_iAllegiance] == 2)
- {
- if(arrGroupData[z][g_iGroupType] == GROUP_TYPE_GOV)
- {
- TRTax += money;
- format(str, sizeof(str), "%s has been arrested by %s and fined $%d. $%d has been sent to the NE Government Vault.",GetPlayerNameEx(suspect), GetPlayerNameEx(playerid), moneys, money);
- GroupPayLog(z, str);
- break;
- }
- }
- }
- }
- ResetPlayerWeaponsEx(suspect);
- SetPlayerInterior(suspect, ArrestPoints[GetArrestPointID(playerid)][jailInt]);
- //new rand = random(sizeof(LSPDJailSpawns));
- //SetPlayerFacingAngle(suspect, LSPDJailSpawns[rand][3]);
- //SetPlayerPos(suspect, LSPDJailSpawns[rand][0], LSPDJailSpawns[rand][1], LSPDJailSpawns[rand][2]);
- switch(random(2)) {
- case 0: {
- SetPlayerPos(suspect, ArrestPoints[GetArrestPointID(playerid)][JailPos1][0], ArrestPoints[GetArrestPointID(playerid)][JailPos1][1], ArrestPoints[GetArrestPointID(playerid)][JailPos1][2]);
- Player_StreamPrep(suspect, ArrestPoints[GetArrestPointID(playerid)][JailPos1][0], ArrestPoints[GetArrestPointID(playerid)][JailPos1][1], ArrestPoints[GetArrestPointID(playerid)][JailPos1][2], FREEZE_TIME);
- }
- case 1: {
- SetPlayerPos(suspect, ArrestPoints[GetArrestPointID(playerid)][JailPos2][0], ArrestPoints[GetArrestPointID(playerid)][JailPos2][1], ArrestPoints[GetArrestPointID(playerid)][JailPos2][2]);
- Player_StreamPrep(suspect, ArrestPoints[GetArrestPointID(playerid)][JailPos2][0], ArrestPoints[GetArrestPointID(playerid)][JailPos2][1], ArrestPoints[GetArrestPointID(playerid)][JailPos2][2], FREEZE_TIME);
- }
- }
- SetPVarInt(suspect, "ArrestPoint", (GetArrestPointID(playerid) + 1));
- if(PlayerInfo[suspect][pDonateRank] >= 2)
- {
- PlayerInfo[suspect][pJailTime] = ((time*60)*75)/100;
- }
- else
- {
- PlayerInfo[suspect][pJailTime] = time * 60;
- }
- if(PlayerInfo[suspect][pJailTime] > 7200) PlayerInfo[suspect][pJailTime] = 7200;
- DeletePVar(suspect, "IsFrozen");
- PhoneOnline[suspect] = 1;
- PlayerInfo[suspect][pArrested] += 1;
- SetPlayerFree(suspect,playerid, "was arrested");
- PlayerInfo[suspect][pWantedLevel] = 0;
- SetPlayerToTeamColor(suspect);
- SetPlayerWantedLevel(suspect, 0);
- WantLawyer[suspect] = 1;
- TogglePlayerControllable(suspect, 1);
- ClearAnimationsEx(suspect);
- SetPlayerSpecialAction(suspect, SPECIAL_ACTION_NONE);
- PlayerCuffed[suspect] = 0;
- DeletePVar(suspect, "PlayerCuffed");
- PlayerCuffedTime[suspect] = 0;
- SetPlayerInterior(suspect, ArrestPoints[GetArrestPointID(playerid)][jailInt]);
- PlayerInfo[suspect][pInt] = ArrestPoints[GetArrestPointID(playerid)][jailVW];
- PlayerInfo[suspect][pVW] = ArrestPoints[GetArrestPointID(playerid)][jailVW];
- SetPlayerVirtualWorld(suspect, ArrestPoints[GetArrestPointID(playerid)][jailVW]);
- strcpy(PlayerInfo[suspect][pPrisonedBy], GetPlayerNameEx(playerid), MAX_PLAYER_NAME);
- strcpy(PlayerInfo[suspect][pPrisonReason], "[IC] EBCF", 128);
- SetPlayerToTeamColor(suspect);
- SetHealth(suspect, 100);
- }
- case 2: { // /docarrest
- format(string, sizeof(string), "* You have sent %s to DoC.", GetPlayerNameEx(suspect));
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- GivePlayerCash(suspect, -moneys);
- new money = floatround(moneys / 3), iGroupID = PlayerInfo[playerid][pMember];
- arrGroupData[iGroupID][g_iBudget] += money;
- new str[164];
- format(str, sizeof(str), "%s has been arrested by %s for %d minutes and fined $%d. $%d has been sent to %s's budget fund.",GetPlayerNameEx(suspect), GetPlayerNameEx(playerid),time, moneys, money, arrGroupData[iGroupID][g_szGroupName]);
- GroupPayLog(iGroupID, str);
- for(new z; z < MAX_GROUPS; z++)
- {
- if(arrGroupData[iGroupID][g_iAllegiance] == 1)
- {
- if(arrGroupData[z][g_iAllegiance] == 1)
- {
- if(arrGroupData[z][g_iGroupType] == GROUP_TYPE_GOV)
- {
- Tax += money;
- format(str, sizeof(str), "%s has been arrested by %s and fined $%d. $%d has been sent to the SA Government Vault.",GetPlayerNameEx(suspect), GetPlayerNameEx(playerid), moneys, money);
- GroupPayLog(z, str);
- break;
- }
- }
- }
- else if(arrGroupData[z][g_iAllegiance] == 2)
- {
- if(arrGroupData[z][g_iAllegiance] == 2)
- {
- if(arrGroupData[z][g_iGroupType] == GROUP_TYPE_GOV)
- {
- TRTax += money;
- format(str, sizeof(str), "%s has been arrested by %s and fined $%d. $%d has been sent to the NE Government Vault.",GetPlayerNameEx(suspect), GetPlayerNameEx(playerid), moneys, money);
- GroupPayLog(z, str);
- break;
- }
- }
- }
- }
- ResetPlayerWeaponsEx(suspect);
- SetPlayerInterior(suspect, 1);
- PlayerInfo[suspect][pInt] = 1;
- SetPlayerFacingAngle(suspect, 0);
- if(PlayerInfo[suspect][pDonateRank] >= 2)
- {
- PlayerInfo[suspect][pJailTime] = ((time*60)*75)/100;
- }
- else
- {
- PlayerInfo[suspect][pJailTime] = time * 60;
- }
- if(PlayerInfo[suspect][pJailTime] > 7200) PlayerInfo[suspect][pJailTime] = 7200;
- DeletePVar(suspect, "IsFrozen");
- PhoneOnline[suspect] = 1;
- PlayerInfo[suspect][pArrested] += 1;
- SetPlayerFree(suspect,playerid, "was arrested");
- PlayerInfo[suspect][pWantedLevel] = 0;
- SetPlayerToTeamColor(suspect);
- SetPlayerWantedLevel(suspect, 0);
- WantLawyer[suspect] = 1;
- TogglePlayerControllable(suspect, 1);
- ClearAnimationsEx(suspect);
- SetPlayerSpecialAction(suspect, SPECIAL_ACTION_NONE);
- PlayerCuffed[suspect] = 0;
- DeletePVar(suspect, "PlayerCuffed");
- PlayerCuffedTime[suspect] = 0;
- PlayerInfo[suspect][pVW] = 0;
- SetPlayerVirtualWorld(suspect, 0);
- SetHealth(suspect, 100);
- strcpy(PlayerInfo[suspect][pPrisonedBy], GetPlayerNameEx(playerid), MAX_PLAYER_NAME);
- strcpy(PlayerInfo[suspect][pPrisonReason], "[IC] DMCF Arrest", 128);
- SetPlayerToTeamColor(suspect);
- SetHealth(suspect, 100);
- new randcell = random(29);
- PlayerInfo[suspect][pPrisonCell] = randcell;
- SpawnPlayerInPrisonCell(suspect, randcell);
- }
- case 3: // doc judge arrest
- {
- format(string, sizeof(string), "* You have sentenced %s at the DoC courthouse.", GetPlayerNameEx(suspect));
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- GivePlayerCash(suspect, -moneys);
- new money = floatround(moneys / 3), iGroupID = PlayerInfo[playerid][pMember];
- arrGroupData[iGroupID][g_iBudget] += money;
- new str[164];
- format(str, sizeof(str), "%s has been arrested by %s for %d minutes and fined $%d. $%d has been sent to %s's budget fund.",GetPlayerNameEx(suspect), GetPlayerNameEx(playerid),time, moneys, money, arrGroupData[iGroupID][g_szGroupName]);
- GroupPayLog(iGroupID, str);
- for(new z; z < MAX_GROUPS; z++)
- {
- if(arrGroupData[iGroupID][g_iAllegiance] == 1)
- {
- if(arrGroupData[z][g_iAllegiance] == 1)
- {
- if(arrGroupData[z][g_iGroupType] == GROUP_TYPE_GOV)
- {
- Tax += money;
- format(str, sizeof(str), "%s has been arrested by %s and fined $%d. $%d has been sent to the SA Government Vault.",GetPlayerNameEx(suspect), GetPlayerNameEx(playerid), moneys, money);
- GroupPayLog(z, str);
- break;
- }
- }
- }
- else if(arrGroupData[z][g_iAllegiance] == 2)
- {
- if(arrGroupData[z][g_iAllegiance] == 2)
- {
- if(arrGroupData[z][g_iGroupType] == GROUP_TYPE_GOV)
- {
- TRTax += money;
- format(str, sizeof(str), "%s has been arrested by %s and fined $%d. $%d has been sent to the NE Government Vault.",GetPlayerNameEx(suspect), GetPlayerNameEx(playerid), moneys, money);
- GroupPayLog(z, str);
- break;
- }
- }
- }
- }
- if(PlayerInfo[suspect][pDonateRank] >= 2)
- {
- PlayerInfo[suspect][pJailTime] = ((time*60)*75)/100;
- }
- else
- {
- PlayerInfo[suspect][pJailTime] = time * 60;
- }
- PhoneOnline[suspect] = 1;
- PlayerInfo[suspect][pArrested] += 1;
- SetPlayerFree(suspect,playerid, "was arrested");
- PlayerInfo[suspect][pWantedLevel] = 0;
- SetPlayerToTeamColor(suspect);
- SetPlayerWantedLevel(suspect, 0);
- SetPVarInt(playerid, "pTut", 0);
- strcpy(PlayerInfo[suspect][pPrisonedBy], GetPlayerNameEx(playerid), MAX_PLAYER_NAME);
- strcpy(PlayerInfo[suspect][pPrisonReason], "[IC][JUDGE] EBCF Arrest", 128);
- SetPlayerToTeamColor(suspect);
- }
- }
- new iAllegiance;
- if((0 <= PlayerInfo[playerid][pMember] < MAX_GROUPS))
- {
- iAllegiance = arrGroupData[PlayerInfo[playerid][pMember]][g_iAllegiance];
- }
- else iAllegiance = 1;
- mysql_format(MainPipeline, szMiscArray, sizeof(szMiscArray), "INSERT INTO `arrestreports` (`copid`, `suspectid`, `shortreport`, `origin`) VALUES ('%d', '%d', '%e', '%d')", GetPlayerSQLId(playerid), GetPlayerSQLId(suspect), inputtext, iAllegiance);
- mysql_tquery(MainPipeline, szMiscArray, "OnQueryFinish", "i", SENDDATA_THREAD);
- format(szMiscArray, sizeof(szMiscArray), "You have arrested %s for %d minutes with a fine of $%s", GetPlayerNameEx(suspect), time, number_format(moneys));
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, szMiscArray);
- PlayerInfo[suspect][pWantedJailFine] = 0;
- PlayerInfo[suspect][pWantedJailTime] = 0;
- Prison_SetPlayerSkin(suspect);
- for(new x;x<MAX_PLAYERTOYS;x++) {
- if(IsPlayerAttachedObjectSlotUsed(suspect, x))
- {
- if(x == 9 && PlayerInfo[suspect][pBEquipped])
- break;
- RemovePlayerAttachedObject(suspect, x);
- }
- }
- for(new i; i < 10; i++) {
- PlayerHoldingObject[suspect][i] = 0;
- }
- DeletePVar(suspect, "jailcuffs");
- DeletePVar(playerid, "Arrest_Price");
- DeletePVar(playerid, "Arrest_Time");
- DeletePVar(playerid, "Arrest_Bail");
- DeletePVar(playerid, "Arrest_BailPrice");
- DeletePVar(playerid, "Arrest_Suspect");
- }
- }
- if(dialogid == MDC_CHECK && response)
- {
- if(!IsMDCPermitted(playerid)) return SendClientMessageEx(playerid, COLOR_LIGHTBLUE, " Login Failed. You are not permitted to use the MDC!");
- new giveplayerid = ReturnUser(inputtext);
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- DisplayCrimes(playerid, giveplayerid);
- format(string, sizeof(string), "* %s has run a check for warrants on %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- foreach(new i: Player)
- {
- if(PlayerInfo[playerid][pToggledChats][12] == 0)
- {
- if(PlayerInfo[i][pMember] == PlayerInfo[playerid][pMember] && PlayerInfo[playerid][pRank] >= arrGroupData[PlayerInfo[i][pMember]][g_iRadioAccess]) {
- ChatTrafficProcess(i, arrGroupData[PlayerInfo[i][pMember]][g_hRadioColour] * 256 + 255, string, 12);
- }
- }
- }
- //SendGroupMessage(GROUP_TYPE_LEA, COLOR_DBLUE, string);
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | ERROR ", "There is no record of that person.", "OK", "Cancel");
- return 1;
- }
- }
- if(dialogid == MDC_LICENSES && response)
- {
- if(!IsMDCPermitted(playerid)) return SendClientMessageEx(playerid, COLOR_LIGHTBLUE, " Login Failed. You are not permitted to use the MDC!");
- new giveplayerid;
- if(sscanf(inputtext, "u", giveplayerid))
- {
- ShowPlayerDialogEx(playerid, MDC_LICENSES, DIALOG_STYLE_INPUT, "MDC - Logged in | License Check", "Enter the Person's Name or ID No.", "Enter", "Cancel");
- return 1;
- }
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- new LicenseString[256], giveplayer[MAX_PLAYER_NAME];
- GetPlayerName(playerid, sendername, sizeof(sendername));
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), " Name: %s\n", giveplayer);
- strcat(LicenseString, string, sizeof(LicenseString));
- format(string, sizeof(string), "-Drivers License: %s%s.\n", !PlayerInfo[giveplayerid][pCarLic] ? ("Not Passed"):("Expires: "), !PlayerInfo[giveplayerid][pCarLic] ? (""):date(PlayerInfo[giveplayerid][pCarLic], 1));
- strcat(LicenseString, string, sizeof(LicenseString));
- format(string, sizeof(string), "-Flying License: %s.\n", PlayerInfo[giveplayerid][pFlyLic] ? ("Passed"):("Not Passed"));
- strcat(LicenseString, string, sizeof(LicenseString));
- format(string, sizeof(string), "-Sailing License: %s.\n", PlayerInfo[giveplayerid][pBoatLic] ? ("Passed"):("Not Passed"));
- strcat(LicenseString, string, sizeof(LicenseString));
- format(string, sizeof(string), "-Weapon License: %s.\n", PlayerInfo[giveplayerid][pGunLic] ? ("Passed"):("Not Passed"));
- strcat(LicenseString, string, sizeof(LicenseString));
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_LIST, "MDC - Logged in | Criminal History", LicenseString, "OK", "Cancel");
- format(string, sizeof(string), "* %s has ran a license check on %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- foreach(new i: Player)
- {
- if(PlayerInfo[playerid][pToggledChats][12] == 0)
- {
- if(PlayerInfo[i][pMember] == PlayerInfo[playerid][pMember] && PlayerInfo[playerid][pRank] >= arrGroupData[PlayerInfo[i][pMember]][g_iRadioAccess]) {
- ChatTrafficProcess(i, arrGroupData[PlayerInfo[i][pMember]][g_hRadioColour] * 256 + 255, string, 12);
- }
- }
- }
- return 1;
- }
- else return ShowPlayerDialogEx(playerid, MDC_LICENSES, DIALOG_STYLE_INPUT, "MDC - Logged in | Error!", "ERROR: Invalid Name or ID No.\nEnter the Person's Name or ID No.", "Enter", "Cancel");
- }
- else return ShowPlayerDialogEx(playerid, MDC_LICENSES, DIALOG_STYLE_INPUT, "MDC - Logged in | Error!", "ERROR: Invalid Name or ID No.\nEnter the Person's Name or ID No.", "Enter", "Cancel");
- }
- if(dialogid == MDC_MESSAGE && response)
- {
- if(!IsMDCPermitted(playerid)) return SendClientMessageEx(playerid, COLOR_LIGHTBLUE, " Login Failed. You are not permitted to use the MDC!");
- new giveplayerid;
- if(sscanf(inputtext, "u", giveplayerid))
- {
- return ShowPlayerDialogEx(playerid, MDC_MESSAGE, DIALOG_STYLE_INPUT, "MDC - Logged In | Error!", "ERROR: Invalid Recipient\nEnter recipient's Name or ID No.", "OK", "Cancel");
- }
- if (IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- format(string, sizeof(string), " Enter your message to %s ", GetPlayerNameEx(giveplayerid));
- ShowPlayerDialogEx(playerid, MDC_MESSAGE_2, DIALOG_STYLE_INPUT, "MDC - Logged In | MDC Message", string, "OK", "Cancel");
- SetPVarInt(playerid, "MDCMessageRecipient", giveplayerid);
- }
- else return ShowPlayerDialogEx(playerid, MDC_MESSAGE, DIALOG_STYLE_INPUT, "MDC - Logged In | Error!", "ERROR: Invalid Recipient\nEnter recipient's Name or ID No.", "OK", "Cancel");
- }
- else return ShowPlayerDialogEx(playerid, MDC_MESSAGE, DIALOG_STYLE_INPUT, "MDC - Logged In | Error!", "ERROR: Invalid Recipient\nEnter recipient's Name or ID No.", "OK", "Cancel");
- }
- if(dialogid == MDC_SMS && response)
- {
- if(isnull(inputtext) || strval(inputtext) == 0)
- {
- return ShowPlayerDialogEx(playerid, MDC_SMS, DIALOG_STYLE_INPUT, "MDC - Logged In | Error!", "ERROR: Invalid Phone Number\nEnter Recipient's Phone Number", "OK", "Cancel");
- }
- new phonenumb = strval(inputtext);
- format(string, sizeof(string), " Enter your message to %d ", phonenumb);
- ShowPlayerDialogEx(playerid, MDC_SMS_2, DIALOG_STYLE_INPUT, "MDC - Logged In | SMS Message", string, "OK", "Cancel");
- SetPVarInt(playerid, "SMSMessageRecipient", phonenumb);
- }
- if(dialogid == MDC_MESSAGE_2 && response)
- {
- new giveplayerid = GetPVarInt(playerid, "MDCMessageRecipient");
- if(giveplayerid == INVALID_PLAYER_ID) return ShowPlayerDialogEx(playerid, MDC_MESSAGE, DIALOG_STYLE_INPUT, "MDC - Logged In | Error!", "ERROR: Invalid Recipient\nEnter recipient's Name or ID No.", "OK", "Cancel");
- if(giveplayerid == playerid)
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | ERROR ", "You cannot send messages to yourself!", "OK", "Cancel");
- return 1;
- }
- if(ConnectedToPC[giveplayerid] == 1337 || IsPlayerInAnyVehicle(giveplayerid))
- {
- if(!IsMDCPermitted(giveplayerid))
- {
- return ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | ERROR ", "That person is not logged into the MDC.", "OK", "Cancel");
- }
- if(!strlen(inputtext))
- {
- return ShowPlayerDialogEx(playerid, MDC_MESSAGE_2, DIALOG_STYLE_INPUT, "MDC - Logged In | Error!", "ERROR: You must type a message!\nEnter Recipient's Name or ID No.", "OK", "Cancel");
- }
- format(string, sizeof(string), "MDC Message sent to %s:\n%s", GetPlayerNameEx(giveplayerid), inputtext);
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Message Sent! ", string, "OK", "Cancel");
- if(ConnectedToPC[giveplayerid] == 1337)
- {
- format(string, sizeof(string), "MDC Message from %s:\n%s", GetPlayerNameEx(playerid), inputtext);
- ShowPlayerDialogEx(giveplayerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | New Message!", string, "OK", "Cancel");
- format(string, sizeof(string), "MDC Message from %s: %s", GetPlayerNameEx(playerid), inputtext);
- SendClientMessageEx(giveplayerid, COLOR_YELLOW, string);
- }
- else
- {
- format(string, sizeof(string), "MDC Message from %s:\n%s", GetPlayerNameEx(playerid), inputtext);
- ShowPlayerDialogEx(giveplayerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | New Message! ", string, "OK", "Cancel");
- }
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | ERROR ", "That officer is not logged into the MDC.", "OK", "Cancel");
- return 1;
- }
- return 1;
- }
- if(dialogid == MDC_SMS_2 && response)
- {
- new phonenumb = GetPVarInt(playerid, "SMSMessageRecipient");
- if(!strlen(inputtext))
- {
- return ShowPlayerDialogEx(playerid, MDC_SMS_2, DIALOG_STYLE_INPUT, "MDC - Logged In | Error!", "ERROR: You must type a message!\nEnter Recipient's Phone Number", "OK", "Cancel");
- }
- if(phonenumb == 555)
- {
- if(strcmp("yes", inputtext, true) == 0) {
- SendClientMessageEx(playerid, COLOR_WHITE, "Text Message Delivered.");
- SendClientMessageEx(playerid, COLOR_YELLOW, "SMS: I have no idea what you're talking about, Sender: MOLE (555)");
- //SendAudioToPlayer(playerid, 47, 100);
- RingTone[playerid] = 20;
- return 0;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "SMS: A simple 'yes' will do, Sender: MOLE (555)");
- //SendAudioToPlayer(playerid, 47, 100);
- RingTone[playerid] = 20;
- //ChatLog(string);
- return 0;
- }
- }
- foreach(new i: Player)
- {
- if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
- {
- if(PhoneOnline[i] > 0)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "That player's phone is switched off.");
- return 1;
- }
- format(string, sizeof(string), "SMS: %s, Sender: %s (Ph: %d)", inputtext, GetPlayerNameEx(playerid),PlayerInfo[playerid][pPnumber]);
- GetPlayerName(i, sendername, sizeof(sendername));
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Message Sent! ", string, "OK", "Cancel");
- SendClientMessageEx(i, COLOR_YELLOW, string);
- return 1;
- }
- }
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Message Delivery Failed! ", "Message Delivery Failed. Try Again", "OK", "Cancel");
- }
- if(dialogid == MDC_BOLO && response)
- {
- new x_nr = GetPVarInt(playerid, "BOLOISSUESLOT");
- if(x_nr == 1)
- {
- if(News[hTaken14] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_BOLO, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter BOLO Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd14], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact14], string, 0, strlen(string), 255);
- News[hTaken14] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for a BOLO on the MDC -BOLO\nto see the current BOLO List browse to BOLO when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for a BOLO have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 1 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- if(x_nr == 2)
- {
- if(News[hTaken15] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_BOLO, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter BOLO Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd15], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact15], string, 0, strlen(string), 255);
- News[hTaken15] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for a BOLO on the MDC -BOLO\nto see the current BOLO List browse to BOLO when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for a BOLO have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 2 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- if(x_nr == 3)
- {
- if(News[hTaken16] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_BOLO, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter BOLO Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd16], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact16], string, 0, strlen(string), 255);
- News[hTaken16] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for a BOLO on the MDC -BOLO\nto see the current BOLO List browse to BOLO when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for a BOLO have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 3 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- if(x_nr == 4)
- {
- if(News[hTaken17] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_BOLO, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter BOLO Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd17], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact17], string, 0, strlen(string), 255);
- News[hTaken17] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for a BOLO on the MDC -BOLO\nto see the current BOLO List browse to BOLO when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for a BOLO have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 4 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- if(x_nr == 5)
- {
- if(News[hTaken18] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_BOLO, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter BOLO Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd18], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact18], string, 0, strlen(string), 255);
- News[hTaken18] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for a BOLO on the MDC -BOLO\nto see the current BOLO List browse to BOLO when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for a BOLO have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 5 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- if(x_nr == 6)
- {
- if(News[hTaken19] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_BOLO, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter BOLO Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd19], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact19], string, 0, strlen(string), 255);
- News[hTaken19] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for a BOLO on the MDC -BOLO\nto see the current BOLO List browse to BOLO when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for a BOLO have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 6 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- if(x_nr == 7)
- {
- if(News[hTaken20] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_BOLO, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter BOLO Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd20], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact20], string, 0, strlen(string), 255);
- News[hTaken20] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for a BOLO on the MDC -BOLO\nto see the current BOLO List browse to BOLO when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for a BOLO have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 7 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- if(x_nr == 8)
- {
- if(News[hTaken21] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_BOLO, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter BOLO Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd21], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact21], string, 0, strlen(string), 255);
- News[hTaken21] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for a BOLO on the MDC -BOLO\nto see the current BOLO List browse to BOLO when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for a BOLO have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 8 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- }
- if(dialogid == MDC_BOLO_SLOT && response)
- {
- SetPVarInt(playerid, "BOLOISSUESLOT", listitem + 1);
- ShowPlayerDialogEx(playerid, MDC_BOLO, DIALOG_STYLE_INPUT, "MDC - Logged in | Issue Warrant", "Enter BOLO Details", "Enter", "Cancel");
- }
- if(dialogid == MDC_ISSUE_SLOT && response)
- {
- SetPVarInt(playerid, "ISSUESLOT", listitem + 1);
- ShowPlayerDialogEx(playerid, MDC_ISSUE, DIALOG_STYLE_INPUT, "MDC - Logged in | Issue Warrant", "Enter Arrest Warrant Details", "Enter", "Cancel");
- }
- if(dialogid == MDC_END_ID && response)
- {
- ShowPlayerDialogEx(playerid, MDC_MAIN, DIALOG_STYLE_LIST, "MDC - Logged in", "*Civilian Information\n*Register Suspect\n*Clear Suspect\n*Vehicle registrations\n*Find LEO\n*Law Enforcement Agencies\n*MDC Message\n*SMS", "OK", "Cancel");
- }
- if(dialogid == MDC_ISSUE && response)
- {
- new x_nr = GetPVarInt(playerid, "ISSUESLOT");
- if(x_nr == 1)
- {
- if(News[hTaken6] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_ISSUE, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter Arrest Warrant Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd6], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact6], string, 0, strlen(string), 255);
- News[hTaken6] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for an arrest warrant on the MDC -Warrants\nto see the current Warrants browse to Warrants when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for an arrest warrant have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 1 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- if(x_nr == 2)
- {
- if(News[hTaken7] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_ISSUE, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter Arrest Warrant Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd7], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact7], string, 0, strlen(string), 255);
- News[hTaken7] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for an arrest warrant on the MDC -Warrants\nto see the current Warrants browse to Warrants when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for an arrest warrant have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 2 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- if(x_nr == 3)
- {
- if(News[hTaken8] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_ISSUE, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter Arrest Warrant Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd8], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact8], string, 0, strlen(string), 255);
- News[hTaken8] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for an arrest warrant on the MDC -Warrants\nto see the current Warrants browse to Warrants when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for an arrest warrant have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 3 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- if(x_nr == 4)
- {
- if(News[hTaken9] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_ISSUE, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter Arrest Warrant Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd9], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact9], string, 0, strlen(string), 255);
- News[hTaken9] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for an arrest warrant on the MDC -Warrants\nto see the current Warrants browse to Warrants when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for an arrest warrant have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 4 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- if(x_nr == 5)
- {
- if(News[hTaken10] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_ISSUE, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter Arrest Warrant Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd10], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact10], string, 0, strlen(string), 255);
- News[hTaken10] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for an arrest warrant on the MDC -Warrants\nto see the current Warrants browse to Warrants when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for an arrest warrant have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 5 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- if(x_nr == 6)
- {
- if(News[hTaken11] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_ISSUE, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter Arrest Warrant Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd11], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact11], string, 0, strlen(string), 255);
- News[hTaken11] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for an arrest warrant on the MDC -Warrants\nto see the current Warrants browse to Warrants when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for an arrest warrant have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 6 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- if(x_nr == 7)
- {
- if(News[hTaken12] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_ISSUE, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter Arrest Warrant Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd12], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact12], string, 0, strlen(string), 255);
- News[hTaken12] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for an arrest warrant on the MDC -Warrants\nto see the current Warrants browse to Warrants when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for an arrest warrant have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 7 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- if(x_nr == 8)
- {
- if(News[hTaken13] == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(strlen(inputtext) < 9) { ShowPlayerDialogEx(playerid, MDC_ISSUE, DIALOG_STYLE_INPUT, "MDC - Logged in | ERROR", "ERROR: Must Be 9+ characters\nEnter Arrest Warrant Details", "Enter", "Cancel"); return 1; }
- format(string, sizeof(string), "%s",inputtext); strmid(News[hAdd13], string, 0, strlen(string), 255);
- format(string, sizeof(string), "%s",sendername); strmid(News[hContact13], string, 0, strlen(string), 255);
- News[hTaken13] = 1;
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Success! ","* You placed details for an arrest warrant on the MDC -Warrants\nto see the current Warrants browse to Warrants when logged in to the mdc", "OK", "Back");
- SendGroupMessage(GROUP_TYPE_LEA, COLOR_LIGHTBLUE, "** MDC: Details for an arrest warrant have been updated.");
- return 1;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_END_ID, DIALOG_STYLE_MSGBOX, "MDC - Logged in | Error! ", "Spot 8 is already Taken!", "OK", "Back");
- return 1;
- }
- }
- }
- if(dialogid == MDC_DELETE && response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialogEx(playerid, MDC_DEL_BOLO, DIALOG_STYLE_LIST, "MDC - Logged in | Which BOLO Slot would you like to delete?", "1\n2\n3\n4\n5\n6\n7\n8\nALL", "Enter", "Cancel");
- }
- if(listitem == 1)
- {
- ShowPlayerDialogEx(playerid, MDC_DEL_WARRANT, DIALOG_STYLE_LIST, "MDC - Logged in | Which Warrant Slot would you like to delete?", "1\n2\n3\n4\n5\n6\n7\n8\nALL", "Enter", "Cancel");
- }
- }
- if(dialogid == MDC_DEL_BOLO && response)
- {
- new string1[MAX_PLAYER_NAME];
- if(isnull(inputtext))
- {
- ShowPlayerDialogEx(playerid, MDC_DEL_WARRANT, DIALOG_STYLE_LIST, "MDC - Logged in | Which Warrant Slot would you like to delete?", "1\n2\n3\n4\n5\n6\n7\n8\nALL", "Enter", "Cancel");
- return 1;
- }
- if(strcmp(inputtext, "1") == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd14], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact14], string1, 0, strlen(string1), 255);
- News[hTaken14] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Be on the Lookout (1) from the MDC -BOLO.");
- return 1;
- }
- else if(strcmp(inputtext, "2") == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd15], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact15], string1, 0, strlen(string1), 255);
- News[hTaken15] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Be on the Lookout (2) from the MDC -BOLO.");
- return 1;
- }
- else if(strcmp(inputtext, "3") == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd16], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact16], string1, 0, strlen(string1), 255);
- News[hTaken16] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Be on the Lookout (3) from the MDC -BOLO.");
- return 1;
- }
- else if(strcmp(inputtext, "4") == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd17], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact17], string1, 0, strlen(string1), 255);
- News[hTaken17] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Be on the Lookout (4) from the MDC -BOLO.");
- return 1;
- }
- else if(strcmp(inputtext, "5") == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd18], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact18], string1, 0, strlen(string1), 255);
- News[hTaken18] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Be on the Lookout (5) from the MDC -BOLO.");
- return 1;
- }
- else if(strcmp(inputtext, "6") == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd19], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact19], string1, 0, strlen(string1), 255);
- News[hTaken19] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Be on the Lookout (6) from the MDC -BOLO.");
- return 1;
- }
- else if(strcmp(inputtext, "7") == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd20], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact20], string1, 0, strlen(string1), 255);
- News[hTaken20] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Be on the Lookout (7) from the MDC -BOLO.");
- return 1;
- }
- else if(strcmp(inputtext, "8") == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd21], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact21], string1, 0, strlen(string1), 255);
- News[hTaken21] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Be on the Lookout (8) from the MDC -BOLO.");
- return 1;
- }
- else if(strcmp(inputtext,"all",true) == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd14], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact14], string1, 0, strlen(string1), 255);
- News[hTaken14] = 0;
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd15], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact15], string1, 0, strlen(string1), 255);
- News[hTaken15] = 0;
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd16], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact16], string1, 0, strlen(string1), 255);
- News[hTaken16] = 0;
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd17], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact17], string1, 0, strlen(string1), 255);
- News[hTaken17] = 0;
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd18], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact18], string1, 0, strlen(string1), 255);
- News[hTaken18] = 0;
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd19], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact19], string1, 0, strlen(string1), 255);
- News[hTaken19] = 0;
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd20], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact20], string1, 0, strlen(string1), 255);
- News[hTaken20] = 0;
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd21], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact21], string1, 0, strlen(string1), 255);
- News[hTaken21] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted all the details for Be on the Lookout from the MDC -BOLO.");
- return 1;
- }
- }
- if(dialogid == MDC_DEL_WARRANT && response)
- {
- new string1[MAX_PLAYER_NAME];
- if(isnull(inputtext))
- {
- ShowPlayerDialogEx(playerid, MDC_DEL_WARRANT, DIALOG_STYLE_LIST, "MDC - Logged in | Which Warrant Slot would you like to delete?", "1\n2\n3\n4\n5\n6\n7\n8\nALL", "Enter", "Cancel");
- return 1;
- }
- if(strcmp(inputtext,"1",true) == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd6], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact6], string1, 0, strlen(string1), 255);
- News[hTaken6] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Arrest Warrant (1) from the MDC -Warrants.");
- return 1;
- }
- else if(strcmp(inputtext,"2",true) == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd7], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact7], string1, 0, strlen(string1), 255);
- News[hTaken7] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Arrest Warrant (2) from the MDC -Warrants.");
- return 1;
- }
- else if(strcmp(inputtext,"3",true) == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd8], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact8], string1, 0, strlen(string1), 255);
- News[hTaken8] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Arrest Warrant (3) from the MDC -Warrants.");
- return 1;
- }
- else if(strcmp(inputtext,"4",true) == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd9], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact9], string1, 0, strlen(string1), 255);
- News[hTaken9] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Arrest Warrant (4) from the MDC -Warrants.");
- return 1;
- }
- else if(strcmp(inputtext,"5",true) == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd10], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact10], string1, 0, strlen(string1), 255);
- News[hTaken10] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Arrest Warrant (5) from the MDC -Warrants.");
- return 1;
- }
- else if(strcmp(inputtext,"6",true) == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd11], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact11], string1, 0, strlen(string1), 255);
- News[hTaken11] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Arrest Warrant (6) from the MDC -Warrants.");
- return 1;
- }
- else if(strcmp(inputtext,"7",true) == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd12], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact12], string1, 0, strlen(string1), 255);
- News[hTaken12] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Arrest Warrant (7) from the MDC -Warrants.");
- return 1;
- }
- else if(strcmp(inputtext,"8",true) == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd13], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact13], string1, 0, strlen(string1), 255);
- News[hTaken13] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted details for Arrest Warrant (8) from the MDC -Warrants.");
- return 1;
- }
- else if(strcmp(inputtext,"all",true) == 0)
- {
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd6], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact6], string1, 0, strlen(string1), 255);
- News[hTaken6] = 0;
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd7], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact7], string1, 0, strlen(string1), 255);
- News[hTaken7] = 0;
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd8], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact8], string1, 0, strlen(string1), 255);
- News[hTaken8] = 0;
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd9], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact9], string1, 0, strlen(string1), 255);
- News[hTaken9] = 0;
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd10], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact10], string1, 0, strlen(string1), 255);
- News[hTaken10] = 0;
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd11], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact11], string1, 0, strlen(string1), 255);
- News[hTaken11] = 0;
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd12], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact12], string1, 0, strlen(string1), 255);
- News[hTaken12] = 0;
- format(string, sizeof(string), "Nothing"); strmid(News[hAdd13], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one"); strmid(News[hContact13], string1, 0, strlen(string1), 255);
- News[hTaken13] = 0;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You deleted all the details for Arrest Warrants from the MDC -Warrants.");
- return 1;
- }
- }
- if(dialogid == MDC_LOGOUT && response)
- {
- }
- if(dialogid == MDC_CREATE && response)
- {
- }
- if( (dialogid >= MDC_START_ID && dialogid <= MDC_END_ID) && !response)
- {
- if(dialogid == MDC_MAIN)
- {
- ConnectedToPC[playerid] = 0;
- }
- else
- {
- ShowPlayerDialogEx(playerid, MDC_MAIN, DIALOG_STYLE_LIST, "MDC - Logged in", "*Civilian Information\n*Register Suspect\n*Clear Suspect\n*Vehicle registrations\n*Find LEO\n*Law Enforcement Agencies\n*MDC Message\n*SMS", "OK", "Cancel");
- }
- }
- if((dialogid == SELLVIP))
- {
- new
- iTargetID = GetPVarInt(playerid, "VIPSell"),
- iPrice = GetPVarInt(playerid, "VIPCost"),
- logstring[156];
- if(response)
- {
- if(!IsPlayerConnected(iTargetID)) return SendClientMessageEx(playerid, COLOR_GREY, "The other person has disconnected.");
- new iTargetName[MAX_PLAYER_NAME];
- GetPVarString(playerid, "VIPSeller", iTargetName, sizeof(iTargetName));
- if(strcmp(iTargetName, GetPlayerNameEx(iTargetID)) != 0) {
- return SendClientMessageEx(playerid, COLOR_GREY, "The other person has disconnected.");
- }
- new viptype[7];
- if(GetPlayerCash(playerid) >= iPrice)
- {
- if(PlayerInfo[iTargetID][pDonateRank] == 3)
- {
- PlayerInfo[iTargetID][pGVip] = 0;
- PlayerInfo[playerid][pGVip] = 1;
- }
- //Player buying the VIP
- GivePlayerCash(playerid, -GetPVarInt(playerid, "VIPCost"));
- PlayerInfo[playerid][pDonateRank] = PlayerInfo[iTargetID][pDonateRank];
- PlayerInfo[playerid][pVIPExpire] = PlayerInfo[iTargetID][pVIPExpire];
- PlayerInfo[playerid][pTempVIP] = 0;
- PlayerInfo[playerid][pBuddyInvited] = 0;
- PlayerInfo[playerid][pVIPSellable] = 0;
- LoadPlayerDisabledVehicles(iTargetID);
- if(PlayerInfo[playerid][pVIPM] != 0)
- {
- PlayerInfo[playerid][pVIPMO] = PlayerInfo[playerid][pVIPM];
- }
- PlayerInfo[playerid][pVIPM] = PlayerInfo[iTargetID][pVIPM];
- // person selling the vip
- GivePlayerCash(iTargetID, GetPVarInt(playerid, "VIPCost"));
- PlayerInfo[iTargetID][pDonateRank] = 0;
- PlayerInfo[iTargetID][pVIPExpire] = 0;
- PlayerInfo[iTargetID][pVIPMO] = PlayerInfo[iTargetID][pVIPM];
- PlayerInfo[iTargetID][pVIPM] = 0;
- switch(PlayerInfo[playerid][pDonateRank])
- {
- case 1: viptype = "Bronze";
- case 2: viptype = "Silver";
- case 3: viptype = "Gold";
- default: viptype = "Error";
- }
- format(string, sizeof(string), "You have purchased %s VIP from %s for $%d which will expire on %s.", viptype, GetPlayerNameEx(iTargetID), iPrice, date(PlayerInfo[playerid][pVIPExpire], 2));
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "You have sold your %s VIP to %s for $%d.", viptype, GetPlayerNameEx(playerid), iPrice);
- SendClientMessage(iTargetID, COLOR_WHITE, string);
- new iYear, iMonth, iDay, szIP[16], szIP2[16];
- getdate(iYear, iMonth, iDay);
- GetPlayerIp(iTargetID, szIP, sizeof(szIP));
- GetPlayerIp(playerid, szIP2, sizeof(szIP2));
- format(logstring, sizeof(logstring), "[SELLVIP] %s(%d) (IP:%s) has sold %s VIP to %s(%d) (IP:%s) for $%d. (VIPM: %d) - (%d/%d/%d)", GetPlayerNameEx(iTargetID), GetPlayerSQLId(iTargetID), szIP, viptype, GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), szIP2, iPrice, PlayerInfo[playerid][pVIPM], iMonth,iDay,iYear);
- Log("logs/shoplog.log", logstring);
- PlayerInfo[playerid][pVIPSold] = gettime() + 7200;
- PlayerInfo[iTargetID][pVIPSold] = gettime() + 7200;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You don't have enough cash to purchase it!");
- SendClientMessage(iTargetID, COLOR_GREY, "He did not have enough cash to purchase it!");
- }
- DeletePVar(playerid, "VIPSell");
- DeletePVar(playerid, "VIPCost");
- }
- else
- {
- format(string, sizeof(string), "You have declined the offer to purchase VIP from %s.", GetPlayerNameEx(iTargetID));
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s has declined the offer to purchase VIP.", GetPlayerNameEx(playerid));
- SendClientMessage(iTargetID, COLOR_WHITE, string);
- DeletePVar(playerid, "VIPSell");
- DeletePVar(playerid, "VIPCost");
- }
- return 1;
- }
- if((dialogid == DRINKDIALOG))
- {
- if(response)
- {
- ShowPlayerDialogEx(playerid, TIPDIALOG, DIALOG_STYLE_INPUT, "Tipping the Bartender", "How much would you like to tip the bartender for their service?", "OK", "Cancel");
- }
- else
- {
- DrinkOffer[playerid] = INVALID_PLAYER_ID;
- }
- }
- if((dialogid == TIPDIALOG))
- {
- if(response)
- {
- if(GetPlayerCash(playerid) >= strval(inputtext))
- {
- if(strval(inputtext) < 0 || strval(inputtext) > 10000)
- {
- return ShowPlayerDialogEx(playerid, TIPDIALOG, DIALOG_STYLE_INPUT, "Tipping the Bartender", "Must be above $0 or below $10,000.\nHow much would you like to tip the bartender for their service?", "OK", "Cancel");
- }
- format(string, sizeof(string), "** %s gives %s a tip for their service.", GetPlayerNameEx(playerid), GetPlayerNameEx(DrinkOffer[playerid]));
- ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- format(string, sizeof(string), "* %s has given you a tip of $%d for your service.", GetPlayerNameEx(playerid), strval(inputtext));
- SendClientMessageEx(DrinkOffer[playerid], COLOR_LIGHTBLUE, string);
- GivePlayerCash(DrinkOffer[playerid], strval(inputtext));
- GivePlayerCash(playerid, -strval(inputtext));
- new ip[32], ipex[32];
- GetPlayerIp(playerid, ip, sizeof(ip));
- GetPlayerIp(DrinkOffer[playerid], ipex, sizeof(ipex));
- if(strval(inputtext) >= 25000 && (PlayerInfo[DrinkOffer[playerid]][pLevel] <= 3 || PlayerInfo[playerid][pLevel] <= 3 ))
- {
- format(string, sizeof(string), "%s(%d) (IP:%s) has tipped %s(%d) (IP:%s) $%s in this session.", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), ip, GetPlayerNameEx(DrinkOffer[playerid]), GetPlayerSQLId(DrinkOffer[playerid]), ipex, number_format(strval(inputtext)));
- Log("logs/pay.log", string);
- format(string, sizeof(string), "%s (IP:%s) has tipped %s (IP:%s) $%s in this session.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(DrinkOffer[playerid]), ipex, number_format(strval(inputtext)));
- ABroadCast(COLOR_YELLOW, string, 2);
- }
- DrinkOffer[playerid] = INVALID_PLAYER_ID;
- }
- }
- else
- {
- DrinkOffer[playerid] = INVALID_PLAYER_ID;
- }
- }
- else if(dialogid == INTERACTMAIN)
- {
- if(response)
- {
- new name[MAX_PLAYER_NAME+8];
- GetPVarString(playerid, "pInteractName", name, sizeof(name));
- if(listitem == 0)
- {
- ShowPlayerDialogEx(playerid, INTERACTPAY, DIALOG_STYLE_INPUT, name, "Input an amount to pay", "Pay", "Cancel");
- }
- else if(listitem == 1)
- {
- ShowPlayerDialogEx(playerid, INTERACTGIVE, DIALOG_STYLE_LIST, name, "Cannabis\nCrack\nMaterials\nFirework\nHeroin\nRawOpium\nSyringes\nOpiumSeeds\nSprunk", "Select", "Cancel");
- }
- }
- else
- {
- DeletePVar(playerid, "pInteractName");
- DeletePVar(playerid, "pInteractID");
- }
- }
- else if(dialogid == INTERACTPAY)
- {
- if(response)
- {
- new params[24];
- format(params, sizeof(params), "%d %d", GetPVarInt(playerid, "pInteractID"), strval(inputtext));
- DeletePVar(playerid, "pInteractName");
- DeletePVar(playerid, "pInteractID");
- return cmd_pay(playerid, params);
- }
- else
- {
- DeletePVar(playerid, "pInteractName");
- DeletePVar(playerid, "pInteractID");
- }
- }
- else if(dialogid == INTERACTGIVE)
- {
- if(response)
- {
- new name[MAX_PLAYER_NAME+8];
- SetPVarInt(playerid, "pInteractGiveType", listitem);
- GetPVarString(playerid, "pInteractName", name, sizeof(name));
- ShowPlayerDialogEx(playerid, INTERACTGIVE2, DIALOG_STYLE_INPUT, name, "Input an amount to give", "Give", "Cancel");
- }
- else
- {
- DeletePVar(playerid, "pInteractName");
- DeletePVar(playerid, "pInteractID");
- }
- }
- /*else if(dialogid == INTERACTGIVE2)
- {
- if(response)
- {
- new params[24];
- switch(GetPVarInt(playerid, "pInteractGiveType"))
- {
- case 0: format(params, sizeof(params), "%d pot %d", GetPVarInt(playerid, "pInteractID"), strval(inputtext));
- case 1: format(params, sizeof(params), "%d crack %d", GetPVarInt(playerid, "pInteractID"), strval(inputtext));
- case 2: format(params, sizeof(params), "%d materials %d", GetPVarInt(playerid, "pInteractID"), strval(inputtext));
- case 3: format(params, sizeof(params), "%d firework %d", GetPVarInt(playerid, "pInteractID"), strval(inputtext));
- case 4: format(params, sizeof(params), "%d heroin %d", GetPVarInt(playerid, "pInteractID"), strval(inputtext));
- case 5: format(params, sizeof(params), "%d rawopium %d", GetPVarInt(playerid, "pInteractID"), strval(inputtext));
- case 6: format(params, sizeof(params), "%d syringes %d", GetPVarInt(playerid, "pInteractID"), strval(inputtext));
- case 7: format(params, sizeof(params), "%d opiumseeds %d", GetPVarInt(playerid, "pInteractID"), strval(inputtext));
- case 8: format(params, sizeof(params), "%d sprunk %d", GetPVarInt(playerid, "pInteractID"), strval(inputtext));
- case 9: format(params, sizeof(params), "%d ammo1 %d", GetPVarInt(playerid, "pInteractID"), strval(inputtext));
- case 10: format(params, sizeof(params), "%d ammo2 %d", GetPVarInt(playerid, "pInteractID"), strval(inputtext));
- case 11: format(params, sizeof(params), "%d ammo3 %d", GetPVarInt(playerid, "pInteractID"), strval(inputtext));
- case 12: format(params, sizeof(params), "%d ammo4 %d", GetPVarInt(playerid, "pInteractID"), strval(inputtext));
- case 13: format(params, sizeof(params), "%d ammo5 %d", GetPVarInt(playerid, "pInteractID"), strval(inputtext));
- }
- DeletePVar(playerid, "pInteractName");
- DeletePVar(playerid, "pInteractID");
- DeletePVar(playerid, "pInteractGive");
- return cmd_give(playerid, params);
- }
- else
- {
- DeletePVar(playerid, "pInteractName");
- DeletePVar(playerid, "pInteractID");
- DeletePVar(playerid, "pInteractGive");
- }
- }*/
- else if(dialogid == DMRCONFIRM)
- {
- if(response)
- {
- new giveplayerid = GetPVarInt(playerid, "pDMReport");
- SetPVarInt(playerid, "_rAutoM", 5);
- SetPVarInt(playerid, "_rRepID", giveplayerid); format(string, sizeof(string), "You have successfully reported %s.", GetPlayerNameEx(giveplayerid));
- SendClientMessage(playerid, COLOR_WHITE, string);
- if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pSMod] == 1) mysql_format(MainPipeline, string, sizeof(string), "INSERT INTO dm_watchdog (id,reporter,timestamp,superwatch) VALUES (%d,%d,%d,1)", GetPlayerSQLId(giveplayerid), GetPlayerSQLId(playerid), gettime());
- else mysql_format(MainPipeline, string, sizeof(string), "INSERT INTO dm_watchdog (id,reporter,timestamp) VALUES (%d,%d,%d)", GetPlayerSQLId(giveplayerid), GetPlayerSQLId(playerid), gettime());
- mysql_tquery(MainPipeline, string, "OnQueryFinish", "ii", SENDDATA_THREAD, playerid);
- format(string, sizeof(string), "%s(%i) Deathmatching (last shot: %i seconds ago)", GetPlayerNameEx(giveplayerid), giveplayerid, gettime() - ShotPlayer[giveplayerid][playerid]);
- SendReportToQue(playerid, string, 2, 1);
- ShotPlayer[giveplayerid][playerid] = 0;
- SetPVarInt(playerid, "AlertedThisPlayer", giveplayerid);
- SetPVarInt(playerid, "AlertType", 1);
- AlertTime[playerid] = 300;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "DM Report Cancelled");
- }
- DeletePVar(playerid, "pDMReport");
- }
- else if(dialogid == SHOPOBJECT_ORDERID)
- {
- if(response)
- {
- SetPVarString(playerid, "shopobject_orderid", inputtext);
- ShowPlayerDialogEx(playerid, SHOPOBJECT_GIVEPLAYER, DIALOG_STYLE_INPUT, "Shop Objects - player ID", "Please enter the player ID", "OK", "Cancel");
- }
- }
- else if(dialogid == SHOPOBJECT_GIVEPLAYER)
- {
- if(response)
- {
- SetPVarString(playerid, "shopobject_giveplayerid", inputtext);
- new stringg[1024];
- for(new x;x<sizeof(HoldingObjectsShop);x++)
- {
- format(stringg, sizeof(stringg), "%s%s\n", stringg, HoldingObjectsShop[x][holdingmodelname]);
- }
- ShowPlayerDialogEx(playerid, SHOPOBJECT_OBJECTID, DIALOG_STYLE_LIST, "Shop Objects - Object ID", stringg, "Select", "Cancel");
- }
- }
- else if(dialogid == SHOPOBJECT_OBJECTID)
- {
- if(response)
- {
- new giveplayerid;
- new str[MAX_PLAYER_NAME];
- GetPVarString(playerid, "shopobject_giveplayerid", str, MAX_PLAYER_NAME);
- sscanf(str, "u", giveplayerid);
- new stringg[512], icount = GetPlayerToySlots(giveplayerid);
- if(!IsPlayerConnected(giveplayerid) || giveplayerid == INVALID_PLAYER_ID)
- {
- ShowPlayerDialogEx(playerid, SHOPOBJECT_GIVEPLAYER, DIALOG_STYLE_INPUT, "Shop Objects - player ID", "ERROR: That person is not connected \nPlease re-enter the player ID", "OK", "Cancel");
- return 1;
- }
- SetPVarInt(playerid, "shopobject_objectid", listitem);
- for(new x;x<icount;x++)
- {
- new name[24] = "None";
- for(new i;i<sizeof(HoldingObjectsAll);i++)
- {
- if(HoldingObjectsAll[i][holdingmodelid] == PlayerToyInfo[giveplayerid][x][ptModelID])
- {
- format(name, sizeof(name), "%s", HoldingObjectsAll[i][holdingmodelname]);
- }
- }
- format(stringg, sizeof(stringg), "%s(%d) %s (Bone: %s)\n", stringg, x, name, HoldingBones[PlayerToyInfo[giveplayerid][x][ptBone]]);
- }
- ShowPlayerDialogEx(playerid, SHOPOBJECT_TOYSLOT, DIALOG_STYLE_LIST, "Shop Objects - Select a Slot", stringg, "Select", "Cancel");
- }
- }
- else if(dialogid == SHOPOBJECT_TOYSLOT)
- {
- if(response)
- {
- new stringg[128];
- new giveplayerid;
- new str[MAX_PLAYER_NAME];
- GetPVarString(playerid, "shopobject_giveplayerid", str, MAX_PLAYER_NAME);
- sscanf(str, "u", giveplayerid);
- new object = HoldingObjectsShop[GetPVarInt(playerid, "shopobject_objectid")][holdingmodelid];
- new slot = listitem;
- new invoice[64];
- GetPVarString(playerid, "shopobject_orderid", invoice, sizeof(invoice));
- if(!IsPlayerConnected(giveplayerid) || giveplayerid == INVALID_PLAYER_ID)
- {
- ShowPlayerDialogEx(playerid, SHOPOBJECT_GIVEPLAYER, DIALOG_STYLE_INPUT, "Shop Objects - player ID", "ERROR: That person is not connected \nPlease re-enter the player ID", "OK", "Cancel");
- return 1;
- }
- if(!toyCountCheck(giveplayerid)) return SendClientMessageEx(playerid, COLOR_GRAD2, "This player does not have enough free slots");
- format(stringg, sizeof(stringg), "You have given %s object %d in slot %d", GetPlayerNameEx(giveplayerid), object, slot);
- ShowPlayerDialogEx(playerid, SHOPOBJECT_SUCCESS, DIALOG_STYLE_MSGBOX, "Shop Objects - Success", stringg, "OK", "");
- SendClientMessageEx(giveplayerid, COLOR_WHITE, "You have received a new /toys from the shop!");
- format(string, sizeof(string), "[SHOPOBJECTS] %s gave %s(%d) object %d in slot %d - Invoice %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), object, slot, invoice);
- PlayerToyInfo[giveplayerid][slot][ptModelID] = object;
- PlayerToyInfo[giveplayerid][slot][ptBone] = 1;
- PlayerToyInfo[giveplayerid][slot][ptTradable] = 1;
- g_mysql_NewToy(giveplayerid, slot);
- Log("logs/shoplog.log", string);
- }
- }
- else if(dialogid == LISTTOYS_DELETETOY)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pASM] < 1)
- {
- return SendClientMessageEx(playerid, COLOR_GRAD2, "You're not authorized to do that");
- }
- new giveplayerid = GetPVarInt(playerid, "listtoys_giveplayerid");
- SetPVarInt(playerid, "listitem_toyslot", listitem);
- format(string, sizeof(string), "Are you sure you want to delete %s's toy (Model ID: %d) from slot %d?", GetPlayerNameEx(giveplayerid), PlayerToyInfo[giveplayerid][listitem][ptModelID], listitem+1);
- ShowPlayerDialogEx(playerid, LISTTOYS_DELETETOYCONFIRM, DIALOG_STYLE_MSGBOX, "Delete Toy - Are you sure?", string, "Yes", "No");
- }
- }
- else if(dialogid == LISTTOYS_DELETETOYCONFIRM)
- {
- if(response)
- {
- new stringg[128], szQuery[128], giveplayerid = GetPVarInt(playerid, "listtoys_giveplayerid"), slot = GetPVarInt(playerid, "listitem_toyslot");
- new object = PlayerToyInfo[giveplayerid][slot][ptModelID];
- if(!IsPlayerConnected(giveplayerid) || giveplayerid == INVALID_PLAYER_ID)
- {
- ShowPlayerDialogEx(playerid, SHOPOBJECT_GIVEPLAYER, DIALOG_STYLE_MSGBOX, "Delete Toy - Player ID", "ERROR: That player is not connected", "OK", "");
- return 1;
- }
- new toys = 99999;
- for(new i; i < 10; i++)
- {
- if(PlayerHoldingObject[giveplayerid][i] == slot)
- {
- toys = i;
- if(IsPlayerAttachedObjectSlotUsed(giveplayerid, toys))
- {
- PlayerHoldingObject[giveplayerid][i] = 0;
- RemovePlayerAttachedObject(giveplayerid, toys);
- }
- break;
- }
- }
- format(stringg, sizeof(stringg), "You have deleted %s's object %d in slot %d", GetPlayerNameEx(giveplayerid), object, slot+1);
- ShowPlayerDialogEx(playerid, SHOPOBJECT_SUCCESS, DIALOG_STYLE_MSGBOX, "Delete Toy - Success", stringg, "OK", "");
- format(stringg, sizeof(stringg), "Admin %s has deleted your toy (obj model: %d) from slot %d.", GetPlayerNameEx(playerid), object, slot);
- SendClientMessageEx(giveplayerid, COLOR_WHITE, stringg);
- format(string, sizeof(string), "[TOYDELETE] %s deleted %s's(%d) object %d in slot %d", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), object, slot);
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "DELETE FROM `toys` WHERE `id` = %d", PlayerToyInfo[giveplayerid][slot][ptID]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "ii", SENDDATA_THREAD, giveplayerid);
- PlayerToyInfo[giveplayerid][slot][ptModelID] = 0;
- PlayerToyInfo[giveplayerid][slot][ptBone] = 0;
- PlayerToyInfo[giveplayerid][slot][ptSpecial] = 0;
- Log("logs/toydelete.log", string);
- }
- }
- else if(dialogid == MDC_SHOWCRIMES)
- {
- if(response)
- {
- ShowPlayerDialogEx(playerid, MDC_CIVILIANS, DIALOG_STYLE_LIST, "MDC - Logged in | Civilian Options", "*Check Record\n*View Arrest Reports\n*Licenses\n*Warrants\n*Issue Warrant\n*BOLO\n*Create BOLO\n*Delete", "OK", "Cancel");
- }
- }
- else if(dialogid == FLAG_LIST)
- {
- if(response)
- {
- if(!IsPlayerConnected(GetPVarInt(playerid, "viewingflags"))) return SendClientMessage(playerid, -1, "The player whos flags you were managing is no longer connected!");
- if(!GetPVarType(playerid, "ManageFlagID"))
- {
- new stpos = strfind(inputtext, "(");
- new fpos = strfind(inputtext, ")");
- new fid[11];
- strmid(fid, inputtext, stpos+5, fpos);
- SetPVarInt(playerid, "ManageFlagID", strval(fid));
- format(string, sizeof(string), "Managing FlagID: %d", GetPVarInt(playerid, "ManageFlagID"));
- return ShowPlayerDialogEx(playerid, FLAG_LIST, DIALOG_STYLE_LIST, string, "View\nTransfer\nDelete", "Select", "Close");
- }
- else
- {
- if(listitem == -1)
- {
- new target;
- if(sscanf(inputtext, "u", target)) return ShowPlayerDialogEx(playerid, FLAG_LIST, DIALOG_STYLE_INPUT, "FLAG TRANSFER", "Who do you want to transfer the flag to?", "Select", "Cancel");
- if(GetPVarInt(playerid, "viewingflags") == target) return SendClientMessageEx(playerid, COLOR_GRAD2, "ERROR: You cannot transfer to the same person!");
- if(!IsPlayerConnected(target)) return ShowPlayerDialogEx(playerid, FLAG_LIST, DIALOG_STYLE_INPUT, "FLAG TRANSFER - ERROR", "Player is not connected!\nWho do you want to transfer the flag to?", "Select", "Cancel");
- mysql_format(MainPipeline, string, sizeof(string), "SELECT id, flag, issuer, time, type FROM `flags` WHERE `fid` = %i", GetPVarInt(playerid, "ManageFlagID"));
- mysql_tquery(MainPipeline, string, "OnRequestTransferFlag", "iiii", playerid, GetPVarInt(playerid, "ManageFlagID"), target, GetPVarInt(playerid, "viewingflags"));
- }
- if(listitem == 0)
- {
- mysql_format(MainPipeline, string, sizeof(string), "SELECT fid, issuer, flag, time FROM `flags` WHERE fid = %d", GetPVarInt(playerid, "ManageFlagID"));
- mysql_tquery(MainPipeline, string, "FlagQueryFinish", "iii", playerid, GetPVarInt(playerid, "viewingflags"), 0);
- }
- if(listitem == 1)
- {
- ShowPlayerDialogEx(playerid, FLAG_LIST, DIALOG_STYLE_INPUT, "FLAG TRANSFER", "Who do you want to transfer the flag to?", "Select", "Cancel");
- }
- if(listitem == 2)
- {
- mysql_format(MainPipeline, string, sizeof(string), "SELECT flag, issuer, time, type FROM `flags` WHERE `fid` = %i", GetPVarInt(playerid, "ManageFlagID"));
- mysql_tquery(MainPipeline, string, "OnRequestDeleteFlag", "ii", playerid, GetPVarInt(playerid, "ManageFlagID"));
- }
- }
- }
- }
- else if(dialogid == FLAG_DELETE)
- {
- if(response)
- {
- new flagid;
- if(sscanf(inputtext, "d", flagid)) return ShowPlayerDialogEx(playerid, FLAG_DELETE, DIALOG_STYLE_INPUT, "FLAG DELETION", "Which flag would you like to delete?", "Delete Flag", "Close");
- new query[128];
- mysql_format(MainPipeline, query, sizeof(query), "SELECT flag, issuer, time, type FROM `flags` WHERE `fid` = %i", flagid);
- mysql_tquery(MainPipeline, query, "OnRequestDeleteFlag", "ii", playerid, flagid);
- }
- }
- else if(dialogid == FLAG_DELETE2)
- {
- if(response)
- {
- new flagid = GetPVarInt(playerid, "Flag_Delete_ID");
- DeleteFlag(flagid, playerid);
- SendClientMessageEx(playerid, COLOR_YELLOW, " Flag deleted successfully ");
- }
- }
- else if(dialogid == SKIN_LIST)
- {
- if(response)
- {
- new query[128];
- SetPVarInt(playerid, "closetchoiceid", listitem);
- mysql_format(MainPipeline, query, sizeof(query), "SELECT `skinid` FROM `house_closet` WHERE playerid = %d ORDER BY `skinid` ASC", GetPlayerSQLId(playerid));
- mysql_tquery(MainPipeline, query, "SkinQueryFinish", "ii", playerid, Skin_Query_ID);
- }
- }
- else if(dialogid == SKIN_CONFIRM)
- {
- if(response)
- {
- PlayerInfo[playerid][pModel] = GetPVarInt(playerid, "closetskinid");
- DeletePVar(playerid, "closetchoiceid");
- DeletePVar(playerid, "closetskinid");
- }
- else
- {
- SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
- DeletePVar(playerid, "closetchoiceid");
- DeletePVar(playerid, "closetskinid");
- DisplaySkins(playerid);
- }
- }
- else if(dialogid == SKIN_DELETE)
- {
- if(response)
- {
- new query[128];
- SetPVarInt(playerid, "closetchoiceid", listitem);
- mysql_format(MainPipeline, query, sizeof(query), "SELECT `id`, `skinid` FROM `house_closet` WHERE playerid = %d ORDER BY `skinid` ASC", GetPlayerSQLId(playerid));
- mysql_tquery(MainPipeline, query, "SkinQueryFinish", "ii", playerid, Skin_Query_Delete_ID);
- }
- }
- else if(dialogid == SKIN_DELETE2)
- {
- if(response)
- {
- DeleteSkin(GetPVarInt(playerid, "closetskinid"));
- DeletePVar(playerid, "closetchoiceid");
- DeletePVar(playerid, "closetskinid");
- SendClientMessageEx(playerid, COLOR_WHITE, "Clothes removed successfully!");
- }
- else
- {
- DeletePVar(playerid, "closetchoiceid");
- DeletePVar(playerid, "closetskinid");
- DisplaySkins(playerid);
- }
- }
- else if(dialogid == NATION_APP_LIST)
- {
- if(response)
- {
- ShowPlayerDialogEx(playerid, NATION_APP_CHOOSE, DIALOG_STYLE_MSGBOX, "Nation Applications", "What would you like to do with this application?", "Accept", "Deny");
- SetPVarInt(playerid, "Nation_App_ID", listitem);
- }
- }
- else if(dialogid == NATION_APP_CHOOSE)
- {
- if(response)
- {
- switch(arrGroupData[PlayerInfo[playerid][pMember]][g_iAllegiance])
- {
- case 1: mysql_tquery(MainPipeline, "SELECT `id`, `playerid`, `name` FROM `nation_queue` WHERE `nation` = 0 AND `status` = 1 ORDER BY `id` ASC", "NationAppFinish", "ii", playerid, AcceptApp);
- case 2: mysql_tquery(MainPipeline, "SELECT `id`, `playerid`, `name` FROM `nation_queue` WHERE `nation` = 1 AND `status` = 1 ORDER BY `id` ASC", "NationAppFinish", "ii", playerid, AcceptApp);
- }
- }
- else
- {
- switch(arrGroupData[PlayerInfo[playerid][pMember]][g_iAllegiance])
- {
- case 1: mysql_tquery(MainPipeline, "SELECT `id`, `playerid`, `name` FROM `nation_queue` WHERE `nation` = 0 AND `status` = 1 ORDER BY `id` ASC", "NationAppFinish", "ii", playerid, DenyApp);
- case 2: mysql_tquery(MainPipeline, "SELECT `id`, `playerid`, `name` FROM `nation_queue` WHERE `nation` = 1 AND `status` = 1 ORDER BY `id` ASC", "NationAppFinish", "ii", playerid, DenyApp);
- }
- }
- }
- else if(dialogid == DIALOG_911MENU)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: ShowPlayerDialogEx(playerid, DIALOG_911EMERGENCY, DIALOG_STYLE_INPUT, "911 Emergency Services", "Please describe the emergency.", "Enter", "End Call");
- case 1: ShowPlayerDialogEx(playerid, DIALOG_911MEDICAL, DIALOG_STYLE_INPUT, "911 Emergency Services", "Please describe your medical emergency.", "Enter", "End Call");
- case 2: ShowPlayerDialogEx(playerid, DIALOG_911POLICE, DIALOG_STYLE_INPUT, "911 Emergency Services", "Please describe why you require police assistance.", "Enter", "End Call");
- case 3: ShowPlayerDialogEx(playerid, DIALOG_911TOWING, DIALOG_STYLE_INPUT, "911 Emergency Services", "Please describe why you require towing services.", "Enter", "End Call");
- case 4: {
- szMiscArray[0] = 0;
- new icount = GetPlayerVehicleSlots(playerid);
- new szCarLocation[MAX_ZONE_NAME];
- for(new i, iModelID; i < icount; i++)
- {
- if((iModelID = PlayerVehicleInfo[playerid][i][pvModelId] - 400) >= 0)
- {
- Get3DZone(PlayerVehicleInfo[playerid][i][pvPosX], PlayerVehicleInfo[playerid][i][pvPosY], PlayerVehicleInfo[playerid][i][pvPosZ], szCarLocation, sizeof(szCarLocation));
- if(PlayerVehicleInfo[playerid][i][pvImpounded]) {
- format(szMiscArray, sizeof(szMiscArray), "%s\n%s (impounded) | Location: DMV", szMiscArray, VehicleName[iModelID]);
- }
- else if(PlayerVehicleInfo[playerid][i][pvDisabled]) {
- format(szMiscArray, sizeof(szMiscArray), "%s\n%s (disabled) | Location: Unknown", szMiscArray, VehicleName[iModelID]);
- }
- else if(!PlayerVehicleInfo[playerid][i][pvSpawned]) {
- format(szMiscArray, sizeof(szMiscArray), "%s\n%s (stored) | Location: %s", szMiscArray, VehicleName[iModelID], szCarLocation);
- }
- else {
- if(PlayerVehicleInfo[playerid][i][pvAlarmTriggered]) format(szMiscArray, sizeof(szMiscArray), "%s\n%s (alarm triggered) | Location: %s", szMiscArray, VehicleName[iModelID], szCarLocation);
- else format(szMiscArray, sizeof(szMiscArray), "%s\n%s | Location: %s", szMiscArray, VehicleName[iModelID], szCarLocation);
- }
- }
- }
- ShowPlayerDialogEx(playerid, DIALOG_911PICKLOCK, DIALOG_STYLE_LIST, "Vehicle Burglary Report", szMiscArray, "Track", "Cancel");
- }
- case 5: ShowPlayerDialogEx(playerid, DIALOG_911FIRE, DIALOG_STYLE_INPUT, "911 Emergency Services", "Please describe why you require the fire bridgade.", "Enter", "End Call");
- }
- }
- }
- else if(dialogid == DIALOG_911EMERGENCY)
- {
- if(response)
- {
- new zone[MAX_ZONE_NAME], mainzone[MAX_ZONE_NAME];
- if(strlen(inputtext) < 4) return ShowPlayerDialogEx(playerid, DIALOG_911EMERGENCY, DIALOG_STYLE_INPUT, "911 Emergency Services", "Sorry, I don't quite understand. What is the emergency you are experiencing?", "Enter", "End Call");
- else
- {
- GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
- GetPlayerMainZone(playerid, mainzone, MAX_ZONE_NAME);
- SendCallToQueue(playerid, inputtext, zone, mainzone, 0);
- SetPVarInt(playerid, "Has911Call", 1);
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Dispatch: We have alerted all units in the area.");
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Thank you for reporting this incident");
- }
- }
- }
- else if(dialogid == DIALOG_911MEDICAL)
- {
- if(response)
- {
- new zone[MAX_ZONE_NAME], mainzone[MAX_ZONE_NAME];
- if(strlen(inputtext) < 4) return ShowPlayerDialogEx(playerid, DIALOG_911MEDICAL, DIALOG_STYLE_INPUT, "911 Emergency Services", "Sorry, I don't quite understand. What is the medical emergency you are experiencing?", "Enter", "End Call");
- else
- {
- GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
- GetPlayerMainZone(playerid, mainzone, MAX_ZONE_NAME);
- SendCallToQueue(playerid, inputtext, zone, mainzone, 1);
- SetPVarInt(playerid, "Has911Call", 1);
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Dispatch: We have alerted all units in the area.");
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Thank you for reporting this incident");
- }
- }
- }
- else if(dialogid == DIALOG_911POLICE)
- {
- if(response)
- {
- new zone[MAX_ZONE_NAME], mainzone[MAX_ZONE_NAME];
- if(strlen(inputtext) < 4) return ShowPlayerDialogEx(playerid, DIALOG_911POLICE, DIALOG_STYLE_INPUT, "911 Emergency Services", "Sorry, I don't quite understand. Why are you needing police assistance?", "Enter", "End Call");
- else
- {
- GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
- GetPlayerMainZone(playerid, mainzone, MAX_ZONE_NAME);
- SendCallToQueue(playerid, inputtext, zone, mainzone, 2);
- SetPVarInt(playerid, "Has911Call", 1);
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Dispatch: We have alerted all units in the area.");
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Thank you for reporting this incident");
- }
- }
- }
- else if(dialogid == DIALOG_911TOWING)
- {
- if(response)
- {
- new zone[MAX_ZONE_NAME], mainzone[MAX_ZONE_NAME];
- if(strlen(inputtext) < 4) return ShowPlayerDialogEx(playerid, DIALOG_911TOWING, DIALOG_STYLE_INPUT, "911 Emergency Services", "Sorry, I don't quite understand. Why do you need towing assistance?", "Enter", "End Call");
- else
- {
- GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
- GetPlayerMainZone(playerid, mainzone, MAX_ZONE_NAME);
- SendCallToQueue(playerid, inputtext, zone, mainzone, 3);
- SetPVarInt(playerid, "Has911Call", 1);
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Dispatch: We have alerted all units in the area.");
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Thank you for reporting this incident");
- }
- }
- }
- else if(dialogid == DIALOG_911FIRE)
- {
- if(response)
- {
- new zone[MAX_ZONE_NAME], mainzone[MAX_ZONE_NAME];
- if(strlen(inputtext) < 4) return ShowPlayerDialogEx(playerid, DIALOG_911FIRE, DIALOG_STYLE_INPUT, "911 Emergency Services", "Sorry, I don't quite understand. Why do you need assistance?", "Enter", "End Call");
- else
- {
- GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
- GetPlayerMainZone(playerid, mainzone, MAX_ZONE_NAME);
- SendCallToQueue(playerid, inputtext, zone, mainzone, 5);
- SetPVarInt(playerid, "Has911Call", 1);
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Dispatch: We have alerted all units in the area.");
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Thank you for reporting this incident");
- }
- }
- }
- else if(dialogid == DIALOG_HOTLINE)
- {
- if(response)
- {
- new zone[MAX_ZONE_NAME], mainzone[MAX_ZONE_NAME];
- if(strlen(inputtext) < 4) {
- if(GetPVarType(playerid, "BUSICALL")) {
- new i = GetPVarInt(playerid, "BUSICALL");
- format(szMiscArray, sizeof(szMiscArray), "%s's Landline | %d", Businesses[i][bName], Businesses[i][bPhoneNr]);
- }
- else {
- new i = GetPVarInt(playerid, "GRPCALL");
- format(szMiscArray, sizeof(szMiscArray), "{%s}%s's Hotline", Group_NumToDialogHex(arrGroupData[i][g_hDutyColour]), arrGroupData[i][g_szGroupName]);
- }
- return ShowPlayerDialogEx(playerid, DIALOG_HOTLINE, DIALOG_STYLE_INPUT, szMiscArray, "I'm sorry, may I have a bit more information.", "Enter", "End Call");
- }
- else
- {
- GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
- GetPlayerMainZone(playerid, mainzone, MAX_ZONE_NAME);
- if(GetPVarType(playerid, "GRPCALL")) SendCallToQueue(playerid, inputtext, zone, mainzone, 6);
- if(GetPVarType(playerid, "BUSICALL")) SendCallToQueue(playerid, inputtext, zone, mainzone, 7);
- SetPVarInt(playerid, "Has911Call", 1);
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Autoanswer: Thank you for calling our land line.");
- SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "We will be with you shortly.");
- }
- }
- }
- else if(dialogid == DIALOG_SUSPECTMENU)
- {
- if(response)
- {
- if(strcmp(inputtext, "Other (Not Listed)", true) == 0)
- {
- return ShowPlayerDialogEx(playerid, DIALOG_SUSPECTMENU, DIALOG_STYLE_INPUT, "Specify a crime", "Please specify a crime", "Submit", "Cancel");
- }
- if(strlen(inputtext) <= 3)
- {
- return ShowPlayerCrimeDialog(playerid);
- }
- if(inputtext[0] == '-')
- {
- return ShowPlayerCrimeDialog(playerid);
- }
- new iTargetID = GetPVarInt(playerid, "suspect_TargetID");
- new
- szMessage[128];
- ++PlayerInfo[iTargetID][pCrimes];
- new crimeid = -1;
- for(new i; i < sizeof(SuspectCrimes); i++)
- {
- if(strcmp(inputtext, SuspectCrimes[i]) == 0)
- {
- crimeid = i;
- break;
- }
- }
- if(crimeid != -1)
- {
- PlayerInfo[iTargetID][pWantedLevel] += SuspectCrimeInfo[crimeid][1];
- }
- else PlayerInfo[iTargetID][pWantedLevel] += 1;
- if(PlayerInfo[iTargetID][pWantedLevel] > 6)
- {
- PlayerInfo[iTargetID][pWantedLevel] = 6;
- }
- SetPlayerWantedLevel(iTargetID, PlayerInfo[iTargetID][pWantedLevel]);
- if(PlayerInfo[iTargetID][pConnectHours] < 32)
- {
- PlayerInfo[iTargetID][pWantedJailTime] += SuspectCrimeInfo[crimeid][2]/10;
- PlayerInfo[iTargetID][pWantedJailFine] += SuspectCrimeInfo[crimeid][3]/10;
- }
- else
- {
- PlayerInfo[iTargetID][pWantedJailTime] += SuspectCrimeInfo[crimeid][2];
- PlayerInfo[iTargetID][pWantedJailFine] += SuspectCrimeInfo[crimeid][3];
- }
- new szCountry[10], szCrime[128];
- if(arrGroupData[PlayerInfo[playerid][pMember]][g_iAllegiance] == 1)
- {
- format(szCountry, sizeof(szCountry), "[SA] ");
- }
- else if(arrGroupData[PlayerInfo[playerid][pMember]][g_iAllegiance] == 2)
- {
- format(szCountry, sizeof(szCountry), "[NE] ");
- }
- strcat(szCrime, szCountry);
- strcat(szCrime, inputtext);
- AddCrime(playerid, iTargetID, szCrime);
- format(szMessage, sizeof(szMessage), "You've commited a crime ( %s ). Reporter: %s.", szCrime, GetPlayerNameEx(playerid));
- SendClientMessageEx(iTargetID, COLOR_LIGHTRED, szMessage);
- format(szMessage, sizeof(szMessage), "Current wanted level: %d", PlayerInfo[iTargetID][pWantedLevel]);
- SendClientMessageEx(iTargetID, COLOR_YELLOW, szMessage);
- foreach(new i: Player)
- {
- if(IsACop(i) && arrGroupData[PlayerInfo[playerid][pMember]][g_iAllegiance] == arrGroupData[PlayerInfo[i][pMember]][g_iAllegiance]) {
- format(szMessage, sizeof(szMessage), "HQ: All units APB (reporter: %s)",GetPlayerNameEx(playerid));
- SendClientMessageEx(i, TEAM_BLUE_COLOR, szMessage);
- format(szMessage, sizeof(szMessage), "HQ: Crime: %s, suspect: %s", szCrime, GetPlayerNameEx(iTargetID));
- SendClientMessageEx(i, TEAM_BLUE_COLOR, szMessage);
- }
- }
- PlayerInfo[iTargetID][pDefendTime] = 60;
- }
- }
- else if(dialogid == DIALOG_REPORTMENU)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: //Deathmatch
- {
- if(PlayerInfo[playerid][pJailTime] > 0) {
- SendClientMessage(playerid, COLOR_GREY, "You can't report while in prison.");
- }
- else {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTDM, DIALOG_STYLE_INPUT, "Report player - Deathmatch", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- }
- case 1: //Falling
- {
- if(gettime() - LastShot[playerid] < 20)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You have been hurt in the last 20 seconds, abusing this system will result in a temporary ban.");
- }
- else
- {
- new
- Message[128];
- TogglePlayerControllable(playerid, 0);
- SetPVarInt(playerid, "IsFrozen", 1);
- SetPVarInt(playerid, "_rAutoM", 5);
- SetPVarInt(playerid, "_rRepID", playerid);
- format(Message, sizeof(Message), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) has been frozen. (Falling Report)", GetPlayerNameEx(playerid), playerid);
- ABroadCast(COLOR_YELLOW, Message, 2);
- SendReportToQue(playerid, "Falling (Player Frozen)", 2, GetPlayerPriority(playerid));
- SendClientMessageEx(playerid, COLOR_WHITE, "A report has been sent to the available admins, you have been frozen.");
- }
- }
- case 2: //Hacking
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTHACK, DIALOG_STYLE_INPUT, "Report player - Hacking", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 3: //Chicken Running
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTCR, DIALOG_STYLE_INPUT, "Report player - Chicken Running", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 4: //Car Ramming
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTCARRAM, DIALOG_STYLE_INPUT, "Report player - Car Ramming", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 5: //Power Gaming
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTPG, DIALOG_STYLE_INPUT, "Report player - Power Gaming", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 6: //Meta Gaming
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTMG, DIALOG_STYLE_INPUT, "Report player - Meta Gaming", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 7: //Gun Discharge Exploits
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTGDE, DIALOG_STYLE_INPUT, "Report player - Gun Discharge Exploits", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 8: //Spamming
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTSPAM, DIALOG_STYLE_INPUT, "Report player - Spamming", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 9: //Money Farming
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTMF, DIALOG_STYLE_INPUT, "Report player - Money Farming", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 10: //Ban Evader
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTBANEVADE, DIALOG_STYLE_INPUT, "Report player - Ban Evader", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 11: //General Exploits
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTGE, DIALOG_STYLE_INPUT, "Report player - General Exploits", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 12: //Releasing Hitman Names
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTRHN, DIALOG_STYLE_INPUT, "Report player - Releasing Hitman Names", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 13: //Running/Swimming Man Exploit
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTRSE, DIALOG_STYLE_INPUT, "Report player - Running/Swimming Man Exploit", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 14: //Car Surfing
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTCARSURF, DIALOG_STYLE_INPUT, "Report player - Car Surfing", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 15: //NonRp Behavior
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTNRPB, DIALOG_STYLE_INPUT, "Report player - NonRP Behavior", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 16: //Next Page
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTMENU2, DIALOG_STYLE_LIST, "Report Menu [2/2]", "Revenge Killing\nOOC Hit\nServer Advertising\nNonRP Name\nOther/Freetext (PVIP Only)\nHouse Move\nAppeal Admin Action\nPrize Claim\nShop Issue\nNot Listed Here\nRequest CA\nRequest Unmute\nPrevious Page","Select", "Exit");
- }
- }
- }
- }
- else if(dialogid == DIALOG_REPORTMENU2)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: //Revenge Killing
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTRK, DIALOG_STYLE_INPUT, "Report player - Revenge Killing", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 1: //OOC Hit
- {
- ShowPlayerDialogEx(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "OOC Hit", "{FFFFFF}OOC Hits are to be handled on the forums. (Player Complaint)\n\n ng-gaming.net/forums", "Close", "");
- }
- case 2: //Server Advertising
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTSA, DIALOG_STYLE_INPUT, "Report player - Server Advertising", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 3: //Non RP Name
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTNRPN, DIALOG_STYLE_INPUT, "Report player - Non-RP Name", "Enter the name or ID of the player.", "Enter", "Cancel");
- }
- case 4: //Other/Freetext (PVip Only!!)
- {
- if(PlayerInfo[playerid][pDonateRank] >= 4) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTFREE, DIALOG_STYLE_INPUT,"Other / Free Text","Enter the message you want to send to the admin team.","Send","Cancel");
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, "This is a Platinum VIP feature only.");
- }
- }
- case 5: //House Move
- {
- SendReportToQue(playerid, "House Move", 4, GetPlayerPriority(playerid));
- SendClientMessageEx(playerid, COLOR_WHITE, "Your house move request has been sent to the current available admins.");
- }
- case 6: //Appeal Admin Action
- {
- if(gettime() < GetPVarInt(playerid, "_rAppeal")) return SendClientMessageEx(playerid, COLOR_GREY, "You need to wait at least 60 seconds before appealing an admin action.");
- SendReportToQue(playerid,"Appeal Admin Action", 4, GetPlayerPriority(playerid));
- SendClientMessageEx(playerid, COLOR_WHITE, "Your Appeal Admin Action report has been sent to the current available admins.");
- }
- case 7: //Prize Claim
- {
- if(PlayerInfo[playerid][pFlagged] == 0) {
- SendClientMessageEx(playerid, COLOR_GREY, "You do not have any prize claims pending. (Not Flagged)");
- return 1;
- }
- else
- {
- SendReportToQue(playerid, "Prize Claim", 4, 5);
- SendClientMessageEx(playerid, COLOR_WHITE, "Your Prize Claim report has been sent to the current available admins.");
- }
- }
- case 8: //Shop Issue
- {
- ShowPlayerDialogEx(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Shop Issue", "{FFFFFF}You can use /shophelp for additional information.", "Close", "");
- }
- case 9: //Not Listed Here
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTNOTLIST, DIALOG_STYLE_INPUT,"Not Listed","Using this category will receive a slower response from the admin team, please consider using the most appropriate category for a faster response.","Send","Cancel");
- }
- case 10: // Request CA
- {
- if(PlayerInfo[playerid][pRHMutes] >= 4 || PlayerInfo[playerid][pRHMuteTime] > 0) return SendClientMessageEx(playerid, COLOR_GREY, "You are currently banned from requesting help.");
- if(JustReported[playerid] > 0) return SendClientMessageEx(playerid, COLOR_GREY, "Wait 10 seconds after sending a next request!");
- JustReported[playerid]=10;
- format(string, sizeof(string), "** %s(%i) is requesting help, reason: Report Menu. (type /accepthelp %i)", GetPlayerNameEx(playerid), playerid, playerid);
- SendDutyAdvisorMessage(TEAM_AZTECAS_COLOR, string);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You have requested help from a Advisor, wait for a reply.");
- SetPVarInt( playerid, "COMMUNITY_ADVISOR_REQUEST", 1 );
- SetPVarInt( playerid, "HelpTime", 5);
- SetPVarString( playerid, "HelpReason", "Report Menu");
- SetTimerEx( "HelpTimer", 60000, 0, "d", playerid);
- }
- case 11: //Request Unmute
- {
- if(gettime()-GetPVarInt(playerid, "UnmuteTime") < 300) {
- SendClientMessageEx(playerid, COLOR_GREY, "You must wait at least 5 minutes before requesting an unmute.");
- return 1;
- }
- ShowPlayerDialogEx(playerid, DIALOG_UNMUTE, DIALOG_STYLE_LIST, "Requesting Unmute", "Ad Unmute\nNewbie Unmute", "Select", "Exit");
- }
- case 12: //Previous Page
- {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTMENU, DIALOG_STYLE_LIST, "Report Menu [1/2]", "Deathmatch\nHacking\nRevenge Killing\nChicken Running\nCar Ramming\nPower Gaming\nMeta Gaming\nGun Discharge Exploits (QS/CS)\nSpamming\nMoney Farming\nBan Evader\nGeneral Exploits\nReleasing Hitman Names\nRunning Man Exploiter\nCar Surfing\nNonRP Behavior\nNext Page","Select", "Exit");
- }
- }
- }
- }
- else if(dialogid == DIALOG_UNMUTE)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- if(PlayerInfo[playerid][pADMute] == 0) return SendClientMessageEx(playerid, COLOR_GREY, "You are not muted from /ads.");
- SetPVarInt(playerid, "_rAutoM", 1);
- SendReportToQue(playerid, "Ad Unmute", 2, GetPlayerPriority(playerid));
- SendClientMessageEx(playerid, COLOR_WHITE, "Your report has been sent to the current available admins.");
- }
- case 1:
- {
- if(PlayerInfo[playerid][pNMute] == 0) return SendClientMessageEx(playerid, COLOR_GREY, "You are not muted from /newb.");
- SetPVarInt(playerid, "_rAutoM", 2);
- SendReportToQue(playerid, "Newbie Unmute", 2, GetPlayerPriority(playerid));
- SendClientMessageEx(playerid, COLOR_WHITE, "Your report has been sent to the current available admins.");
- }
- }
- }
- }
- else if(dialogid == DIALOG_REPORTDM)
- {
- if(response)
- {
- new
- Player;
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTDM, DIALOG_STYLE_INPUT, "Report player - Deathmatch", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTDM, DIALOG_STYLE_INPUT, "Report player - Deathmatch", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- if(PlayerInfo[playerid][pDMRMuted] != 0) return SendClientMessage(playerid, COLOR_GRAD2, "You are blocked from submitting DM reports.");
- //if(PlayerInfo[playerid][pLevel] < 2) return SendClientMessage(playerid, COLOR_GRAD2, "You must be level 2 to use this command.");
- if(playerid == Player) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on yourself!");
- if(PlayerInfo[Player][pAdmin] >= 2 && PlayerInfo[Player][pTogReports] != 1) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command on admins!");
- if(gettime() - ShotPlayer[Player][playerid] < 300)
- {
- SetPVarInt(playerid, "pDMReport", Player);
- ShowPlayerDialogEx(playerid, DMRCONFIRM, DIALOG_STYLE_MSGBOX, "DM Report", "You personally witnessed the reported player death matching within the last 60 seconds. Abuse of this command could result in a temporary ban.", "Confirm", "Cancel");
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "You have not been shot by that person or have already reported them in the last 5 minutes.");
- SendClientMessage(playerid, COLOR_WHITE, "As a reminder, abuse of this system could lead to punishment up to a temporary ban.");
- }
- }
- }
- else if(dialogid == DIALOG_REPORTRK)
- {
- if(response)
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTRK, DIALOG_STYLE_INPUT, "Report player - Revenge Killing", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTRK, DIALOG_STYLE_INPUT, "Report player - Revenge Killing", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- SetPVarInt(playerid, "_rAutoM", 4);
- SetPVarInt(playerid, "_rRepID", Player);
- format(Message, sizeof(Message), "%s(%i) Revenge Killing", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid, Message, 2, GetPlayerPriority(playerid));
- format(Message, sizeof(Message), "You have submitted a report on %s for Revenge Killing. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- SetPVarInt(playerid, "AlertedThisPlayer", Player);
- SetPVarInt(playerid, "AlertType", 2);
- AlertTime[playerid] = 300;
- }
- }
- }
- else if(dialogid == DIALOG_REPORTCR)
- {
- if(response)
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTCR, DIALOG_STYLE_INPUT, "Report player - Chicken Running", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTCR, DIALOG_STYLE_INPUT, "Report player - Chicken Running", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- SetPVarInt(playerid, "_rAutoM", 5);
- SetPVarInt(playerid, "_rRepID", Player);
- format(Message, sizeof(Message), "%s(%i) Chicken Running", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid,Message, 2, GetPlayerPriority(playerid));
- format(Message, sizeof(Message), "You have submitted a report on %s for Chicken Running. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- }
- }
- }
- else if(dialogid == DIALOG_REPORTCARRAM)
- {
- if(response)
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTCARRAM, DIALOG_STYLE_INPUT, "Report player - Car Ramming", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTCARRAM, DIALOG_STYLE_INPUT, "Report player - Car Ramming", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- SetPVarInt(playerid, "_rAutoM", 5);
- SetPVarInt(playerid, "_rRepID", Player);
- format(Message, sizeof(Message), "%s(%i) Car Ramming", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid,Message, 2, GetPlayerPriority(playerid));
- format(Message, sizeof(Message), "You have submitted a report on %s for Car Ramming. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- SetPVarInt(playerid, "AlertedThisPlayer", Player);
- SetPVarInt(playerid, "AlertType", 4);
- AlertTime[playerid] = 300;
- }
- }
- }
- else if(dialogid == DIALOG_REPORTPG)
- {
- if(response)
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTPG, DIALOG_STYLE_INPUT, "Report player - Power Gaming", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTPG, DIALOG_STYLE_INPUT, "Report player - Power Gaming", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- SetPVarInt(playerid, "_rAutoM", 5);
- SetPVarInt(playerid, "_rRepID", Player);
- format(Message, sizeof(Message), "%s(%i) Power Gaming", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid,Message, 2, GetPlayerPriority(playerid));
- format(Message, sizeof(Message), "You have submitted a report on %s for Power Gaming. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- }
- }
- }
- else if(dialogid == DIALOG_REPORTMG)
- {
- if(response)
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTMG, DIALOG_STYLE_INPUT, "Report player - Meta Gaming", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTMG, DIALOG_STYLE_INPUT, "Report player - Meta Gaming", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- SetPVarInt(playerid, "_rAutoM", 6);
- SetPVarInt(playerid, "_rRepID", Player);
- format(Message, sizeof(Message), "%s(%i) Meta Gaming", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid,Message, 2, GetPlayerPriority(playerid));
- format(Message, sizeof(Message), "You have submitted a report on %s for Meta Gaming. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- }
- }
- }
- else if(dialogid == DIALOG_REPORTSPAM)
- {
- if(response && !GetPVarType(playerid, "HasReport"))
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTSPAM, DIALOG_STYLE_INPUT, "Report player - Spamming", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTSPAM, DIALOG_STYLE_INPUT, "Report player - Spamming", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- SetPVarInt(playerid, "_rAutoM", 6);
- SetPVarInt(playerid, "_rRepID", Player);
- format(Message, sizeof(Message), "%s(%i) Spamming", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid,Message, 2, GetPlayerPriority(playerid));
- format(Message, sizeof(Message), "You have submitted a report on %s for Spamming. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- SetPVarInt(playerid, "AlertedThisPlayer", Player);
- SetPVarInt(playerid, "AlertType", 6);
- AlertTime[playerid] = 300;
- }
- }
- }
- else if(dialogid == DIALOG_REPORTGDE)
- {
- if(response && !GetPVarType(playerid, "HasReport"))
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTGDE, DIALOG_STYLE_INPUT, "Report player - Gun Discharge Exploits", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTGDE, DIALOG_STYLE_INPUT, "Report player - Gun Discharge Exploits", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- SetPVarInt(playerid, "_rAutoM", 5);
- SetPVarInt(playerid, "_rRepID", Player);
- format(Message, sizeof(Message), "%s(%i) Gun Discharge Exploits", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid,Message, 2, GetPlayerPriority(playerid));
- format(Message, sizeof(Message), "You have submitted a report on %s for Gun Discharge Exploits. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- SetPVarInt(playerid, "AlertedThisPlayer", Player);
- SetPVarInt(playerid, "AlertType", 7);
- AlertTime[playerid] = 300;
- }
- }
- }
- else if(dialogid == DIALOG_REPORTHACK)
- {
- if(response && !GetPVarType(playerid, "HasReport"))
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTHACK, DIALOG_STYLE_INPUT, "Report player - Hacking", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTHACK, DIALOG_STYLE_INPUT, "Report player - Hacking", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- SetPVarInt(playerid, "_rAutoM", 5);
- SetPVarInt(playerid, "_rRepID", Player);
- format(Message, sizeof(Message), "%s(%i) Hacking", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid,Message, 2, 2);
- format(Message, sizeof(Message), "You have submitted a report on %s for Hacking. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- }
- }
- }
- else if(dialogid == DIALOG_REPORTMF)
- {
- if(response && !GetPVarType(playerid, "HasReport"))
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTMF, DIALOG_STYLE_INPUT, "Report player - Money Farming", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTMF, DIALOG_STYLE_INPUT, "Report player - Money Farming", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- format(Message, sizeof(Message), "%s(%i) Money Farming", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid,Message, 2, GetPlayerPriority(playerid));
- format(Message, sizeof(Message), "You have submitted a report on %s for Money Farming. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- }
- }
- }
- else if(dialogid == DIALOG_REPORTSA)
- {
- if(response && !GetPVarType(playerid, "HasReport"))
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTSA, DIALOG_STYLE_INPUT, "Report player - Server Advertising", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTSA, DIALOG_STYLE_INPUT, "Report player - Server Advertising", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- SetPVarInt(playerid, "_rAutoM", 6);
- SetPVarInt(playerid, "_rRepID", Player);
- format(Message, sizeof(Message), "%s(%i) Server Advertising", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid,Message, 2, 2);
- format(Message, sizeof(Message), "You have submitted a report on %s for Server Advertising. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- }
- }
- }
- else if(dialogid == DIALOG_REPORTNRPN)
- {
- if(response && !GetPVarType(playerid, "HasReport"))
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTNRPN, DIALOG_STYLE_INPUT, "Report player - NonRP Name", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTNRPN, DIALOG_STYLE_INPUT, "Report player - NonRP Name", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- SetPVarInt(playerid, "_rAutoM", 3);
- SetPVarInt(playerid, "_rRepID", Player);
- format(Message, sizeof(Message), "%s(%i) NonRP Name", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid,Message, 2, GetPlayerPriority(playerid));
- format(Message, sizeof(Message), "You have submitted a report on %s for NonRP Name. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- SetPVarInt(playerid, "AlertedThisPlayer", Player);
- SetPVarInt(playerid, "AlertType", 8);
- AlertTime[playerid] = 300;
- }
- }
- }
- else if(dialogid == DIALOG_REPORTBANEVADE)
- {
- if(response && !GetPVarType(playerid, "HasReport"))
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTBANEVADE, DIALOG_STYLE_INPUT, "Report player - Ban Evader", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTBANEVADE, DIALOG_STYLE_INPUT, "Report player - Ban Evader", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- format(Message, sizeof(Message), "%s(%i) Ban Evader", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid,Message, 2, GetPlayerPriority(playerid));
- format(Message, sizeof(Message), "You have submitted a report on %s for Ban Evader. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- }
- }
- }
- else if(dialogid == DIALOG_REPORTGE)
- {
- if(response && !GetPVarType(playerid, "HasReport"))
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTGE, DIALOG_STYLE_INPUT, "Report player - General Exploits", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTGE, DIALOG_STYLE_INPUT, "Report player - General Exploits", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- SetPVarInt(playerid, "_rAutoM", 5);
- SetPVarInt(playerid, "_rRepID", Player);
- format(Message, sizeof(Message), "%s(%i) General Exploits", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid,Message, 2, GetPlayerPriority(playerid));
- format(Message, sizeof(Message), "You have submitted a report on %s for General Exploits. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- }
- }
- }
- else if(dialogid == DIALOG_REPORTRHN)
- {
- if(response && !GetPVarType(playerid, "HasReport"))
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTRHN, DIALOG_STYLE_INPUT, "Report player - Releasing Hitman Names", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTRHN, DIALOG_STYLE_INPUT, "Report player - Releasing Hitman Names", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- format(Message, sizeof(Message), "%s(%i) Releasing Hitman Names", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid,Message, 2, GetPlayerPriority(playerid));
- format(Message, sizeof(Message), "You have submitted a report on %s for Releasing Hitman Names. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- }
- }
- }
- else if(dialogid == DIALOG_REPORTRSE)
- {
- if(response && !GetPVarType(playerid, "HasReport"))
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTRSE, DIALOG_STYLE_INPUT, "Report player - Running/Swimming Man Exploit", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTRSE, DIALOG_STYLE_INPUT, "Report player - Running/Swimming Man Exploit", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- SetPVarInt(playerid, "_rAutoM", 5);
- SetPVarInt(playerid, "_rRepID", Player);
- format(Message, sizeof(Message), "%s(%i) Running/Swimming Man Exploit", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid,Message, 2, GetPlayerPriority(playerid));
- format(Message, sizeof(Message), "You have submitted a report on %s for Running/Swimming Man Exploit. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- }
- }
- }
- else if(dialogid == DIALOG_REPORTCARSURF)
- {
- if(response && !GetPVarType(playerid, "HasReport"))
- {
- new
- Player,
- Message[128];
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTCARSURF, DIALOG_STYLE_INPUT, "Report player - Car Surfing", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTCARSURF, DIALOG_STYLE_INPUT, "Report player - Car Surfing", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- SetPVarInt(playerid, "_rAutoM", 5);
- SetPVarInt(playerid, "_rRepID", Player);
- format(Message, sizeof(Message), "%s(%i) Car Surfing", GetPlayerNameEx(Player), Player);
- SendReportToQue(playerid,Message, 2, GetPlayerPriority(playerid));
- format(Message, sizeof(Message), "You have submitted a report on %s for Car Surfing. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- SetPVarInt(playerid, "AlertedThisPlayer", Player);
- SetPVarInt(playerid, "AlertType", 10);
- AlertTime[playerid] = 300;
- }
- }
- }
- else if(dialogid == DIALOG_REPORTNRPB)
- {
- if(response && !GetPVarType(playerid, "HasReport"))
- {
- new
- Player;
- if(sscanf(inputtext, "u", Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTNRPB, DIALOG_STYLE_INPUT, "Report player - NonRP Behavior", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- return 1;
- }
- else if(!IsPlayerConnected(Player)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTNRPB, DIALOG_STYLE_INPUT, "Report player - NonRP Behavior", "(Error - Invalid Player) Enter the name or ID of the player.", "Enter", "Cancel");
- }
- else if(Player == playerid) {
- SendClientMessage(playerid, COLOR_GREY, "You can't submit a report on yourself.");
- }
- else {
- SetPVarInt(playerid, "NRPB", Player);
- ShowPlayerDialogEx(playerid, DIALOG_REPORTNRPB2, DIALOG_STYLE_INPUT,"Report player - NonRP Behavior","Explain what the person is doing.","Send","Cancel");
- }
- }
- }
- else if(dialogid == DIALOG_REPORTNRPB2)
- {
- if(response == 1 && !GetPVarType(playerid, "HasReport"))
- {
- if(isnull(inputtext)) return ShowPlayerDialogEx(playerid, DIALOG_REPORTNRPB2, DIALOG_STYLE_INPUT,"Report player - NonRP Behavior","Explain what the person is doing.","Send","Cancel");
- new
- Message[128],
- Player;
- Player = GetPVarInt(playerid, "NRPB");
- SetPVarInt(playerid, "_rAutoM", 5);
- SetPVarInt(playerid, "_rRepID", Player);
- format(Message, sizeof(Message), "%s(%i), %s (nonrp behavior)", GetPlayerNameEx(Player), Player, inputtext);
- SendReportToQue(playerid, Message, 2, GetPlayerPriority(playerid));
- format(Message, sizeof(Message), "You have submitted a report on %s for NonRP Behavior. It has been sent to all available admins.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid, COLOR_WHITE, Message);
- DeletePVar(playerid, "NRPB");
- SetPVarInt(playerid, "AlertedThisPlayer", Player);
- SetPVarInt(playerid, "AlertType", 11);
- AlertTime[playerid] = 300;
- }
- else {
- DeletePVar(playerid, "NRPB");
- }
- }
- else if(dialogid == DIALOG_REPORTFREE)
- {
- if(response == 1 && !GetPVarType(playerid, "HasReport"))
- {
- if(isnull(inputtext)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTFREE, DIALOG_STYLE_INPUT,"Other / Free Text","(Error - No Message) Enter the message you want to send to the admin team.","Send","Cancel");
- }
- SendReportToQue(playerid, inputtext, 2, GetPlayerPriority(playerid));
- SendClientMessageEx(playerid, COLOR_WHITE, "Your message has been sent to the admin team.");
- }
- }
- else if(dialogid == DIALOG_REPORTNOTLIST)
- {
- if(response == 1 && !GetPVarType(playerid, "HasReport"))
- {
- if(isnull(inputtext)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTNOTLIST, DIALOG_STYLE_INPUT,"Not Listed","(Error - No Message) Using this category will receive a slower response from the admin team, please consider using the most appropriate category for a faster response","Send","Cancel");
- }
- SetPVarString(playerid, "ReportNotList", inputtext);
- ShowPlayerDialogEx(playerid, DIALOG_REPORTNOTLIST2, DIALOG_STYLE_MSGBOX, "Not Listed", "Are you sure your report doesn't fit under any other report categories?", "Yes", "No");
- }
- }
- else if(dialogid == DIALOG_REPORTNOTLIST2)
- {
- if(response == 1 && !GetPVarType(playerid, "HasReport"))
- {
- new Message[128];
- GetPVarString(playerid, "ReportNotList", Message, sizeof(Message));
- SendReportToQue(playerid, Message, 2, 5);
- SendClientMessageEx(playerid, COLOR_WHITE, "Your message has been sent to the admin team.");
- }
- }
- else if(dialogid == DIALOG_SPEAKTOADMIN)
- {
- if(response == 1)
- {
- if(isnull(inputtext)) {
- ShowPlayerDialogEx(playerid, DIALOG_REPORTNOTLIST, DIALOG_STYLE_INPUT,"Other / Free Text","(Error - No Message) Using this category will receive a slower response from the admin team, please consider using the most appropriate category for a faster response","Send","Cancel");
- }
- SetPVarString(playerid, "ReportNotList", inputtext);
- ShowPlayerDialogEx(playerid, DIALOG_REPORTNOTLIST2, DIALOG_STYLE_MSGBOX, "Other / Free Text", "Are you sure you need to contact an admin?", "Yes", "No");
- }
- }
- else if(dialogid == DIALOG_REPORTNAME)
- {
- new
- Player;
- Player = GetPVarInt(playerid, "NameChange");
- if(GetPVarInt(Player, "RequestingNameChange") == 0)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "That person isn't requesting a namechange!");
- return 1;
- }
- if(response == 1)
- {
- new newname[MAX_PLAYER_NAME], tmpName[24];
- GetPVarString(Player, "NewNameRequest", newname, MAX_PLAYER_NAME);
- mysql_escape_string(newname, tmpName);
- SetPVarString(Player, "NewNameRequest", tmpName);
- mysql_format(MainPipeline, string, sizeof(string), "SELECT `Username` FROM `accounts` WHERE `Username`='%s'", tmpName);
- mysql_tquery(MainPipeline, string, "OnApproveName", "ii", playerid, Player);
- }
- else
- {
- SendClientMessageEx(Player,COLOR_YELLOW," Your name change request has been denied.");
- format(string, sizeof(string), " You have denied %s's name change request.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid,COLOR_YELLOW,string);
- format(string, sizeof(string), "%s has denied %s's name change request",GetPlayerNameEx(playerid),GetPlayerNameEx(Player));
- ABroadCast(COLOR_YELLOW, string, 3);
- SetPVarInt(Player, "LastNameChange", gettime());
- DeletePVar(Player, "RequestingNameChange");
- }
- }
- else if(dialogid == DIALOG_REPORTTEAMNAME)
- {
- new
- Player;
- Player = GetPVarInt(playerid, "RFLNameChange");
- if(GetPVarInt(Player, "RFLNameRequest") == 0)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "That person isn't requesting a namechange!");
- return 1;
- }
- if(response == 1)
- {
- new newname[25], tmpName[25], query[128];
- GetPVarString(Player, "NewRFLName", newname, MAX_PLAYER_NAME);
- mysql_escape_string(newname, tmpName);
- SetPVarString(Player, "NewRFLName", tmpName);
- mysql_format(MainPipeline, query, sizeof(query), "SELECT `name` FROM `rflteams` WHERE `name` = '%s'", tmpName);
- mysql_tquery(MainPipeline, query, "OnCheckRFLName", "ii", playerid, Player);
- }
- else
- {
- SendClientMessageEx(Player,COLOR_YELLOW," Your team name change request has been denied.");
- format(string, sizeof(string), " You have denied %s's team name change request.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid,COLOR_YELLOW,string);
- format(string, sizeof(string), "%s has denied %s's team name change request",GetPlayerNameEx(playerid),GetPlayerNameEx(Player));
- ABroadCast(COLOR_YELLOW, string, 3);
- DeletePVar(Player, "RFLNameRequest");
- DeletePVar(playerid, "RFLNameChange");
- DeletePVar(Player, "NewRFLName");
- }
- }
- else if(dialogid == DIALOG_DEDICATEDPLAYER)
- {
- if(response)
- {
- new
- szName[MAX_PLAYER_NAME],
- szDialogStr[260],
- szFileStr[32],
- iPos,
- iCount = 0,
- iTime = gettime() - 5184000,
- File: fDedicated = fopen("RewardDedicated.cfg", io_read);
- GetPVarString(playerid, "DedicatedPlayer", szName, sizeof(szName));
- while(fread(fDedicated, szFileStr)) {
- iPos = strfind(szFileStr, "|");
- if(strval(szFileStr[iPos + 1]) > iTime && iCount == 0 && strcmp(szFileStr, szName, false, strlen(szName))==0 ) {
- szFileStr[iPos] = 0;
- strcat(szDialogStr, szFileStr);
- iCount++;
- strcat(szDialogStr, "\n");
- }
- else if(iCount > 0)
- {
- szFileStr[iPos] = 0;
- strcat(szDialogStr, szFileStr);
- iCount++;
- if(iCount == 10) {
- SetPVarString(playerid, "DedicatedPlayer", szFileStr);
- printf("%s - Dedicated Player", szFileStr);
- break;
- }
- strcat(szDialogStr, "\n");
- }
- }
- fclose(fDedicated);
- //szDialogStr[strlen(szDialogStr) - 1] = 0;
- if(iCount == 10)
- {
- ShowPlayerDialogEx(playerid, DIALOG_DEDICATEDPLAYER, DIALOG_STYLE_LIST, "Dedicated Players (over 150 Reward Hours)", szDialogStr, "Next", "Exit");
- }
- else
- {
- ShowPlayerDialogEx(playerid, 0, DIALOG_STYLE_LIST, "Dedicated Players (over 150 Reward Hours)", szDialogStr, "Exit", "");
- }
- return 1;
- }
- }
- else if (dialogid == DIALOG_POSTAMP && response)
- {
- switch (listitem) {
- case REGULAR_MAIL: {
- SetPVarInt(playerid, "LetterTime", 240);
- SetPVarInt(playerid, "LetterCost", 100);
- }
- case PRIORITY_MAIL: {
- SetPVarInt(playerid, "LetterTime", 120);
- SetPVarInt(playerid, "LetterCost", 250);
- }
- case PREMIUM_MAIL: {
- if (PlayerInfo[playerid][pDonateRank] < 3) {
- return SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least Gold VIP for sending Premium Mail.");
- }
- else {
- SetPVarInt(playerid, "LetterCost", 500);
- SetPVarInt(playerid, "LetterNotify", 1);
- }
- }
- case GOVERNMENT_MAIL: {
- if (!IsAGovernment(playerid) && !IsACop(playerid) && !IsAJudge(playerid)) {
- return SendClientMessageEx(playerid, COLOR_GREY, " Only Government agencies can use Government Mail! ");
- }
- if (PlayerInfo[playerid][pRank] < 4) {
- return SendClientMessageEx(playerid, COLOR_GREY, " Only rank 4 or higher can do this.");
- }
- SetPVarInt(playerid, "LetterTime", 60);
- SetPVarInt(playerid, "LetterCost", 500);
- SetPVarInt(playerid, "LetterNotify", 1);
- SetPVarInt(playerid, "LetterGov", 1);
- }
- default:
- return 1;
- }
- if (listitem != GOVERNMENT_MAIL && GetPlayerCash(playerid) < GetPVarInt(playerid, "LetterCost")) {
- DeletePVar(playerid, "LetterTime");
- DeletePVar(playerid, "LetterCost");
- return SendClientMessageEx(playerid, COLOR_GREY, "You can't afford the stamp.");
- }
- ShowPlayerDialogEx(playerid, DIALOG_PORECEIVER, DIALOG_STYLE_INPUT, "Recipient", "{FFFFFF}Please type the name of the recipient (online or offline)", "Next", "Cancel");
- return 1;
- }
- else if (dialogid == DIALOG_PORECEIVER && response)
- {
- if (!strlen(inputtext)) {
- ShowPlayerDialogEx(playerid, DIALOG_PORECEIVER, DIALOG_STYLE_INPUT, "Recipient", "{FF3333}Error: {FFFFFF}Recipient Name Not Entered!\n\nPlease type the name of the recipient (online or offline)", "Next", "Cancel");
- return 1;
- }
- if (strlen(inputtext) > 20) {
- ShowPlayerDialogEx(playerid, DIALOG_PORECEIVER, DIALOG_STYLE_INPUT, "Recipient", "{FF3333}Error: {FFFFFF}Recipient Name Too Long!\n\nPlease type the name of the recipient (online or offline)", "Next", "Cancel");
- return 1;
- }
- if (strcmp(inputtext, GetPlayerNameExt(playerid), true) == 0) {
- ShowPlayerDialogEx(playerid, DIALOG_PORECEIVER, DIALOG_STYLE_INPUT, "Recipient", "{FF3333}Error: {FFFFFF}Invalid Recipient! - Can't send to yourself!\n\nPlease type the name of the recipient (online or offline)", "Next", "Cancel");
- return 1;
- }
- SetPVarString(playerid, "LetterRecipientName", inputtext);
- new giveplayer = ReturnUser(inputtext);
- if(giveplayer == INVALID_PLAYER_ID)
- {
- new szQuery[256];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "SELECT `id`, `AdminLevel`, `TogReports` FROM `accounts` WHERE `Username` = '%e'", inputtext);
- mysql_tquery(MainPipeline, szQuery, "RecipientLookupFinish", "i", playerid);
- }
- else
- {
- if(PlayerInfo[giveplayer][pAdmin] >= 2 && PlayerInfo[giveplayer][pTogReports] != 1)
- {
- ShowPlayerDialogEx(playerid, DIALOG_PORECEIVER, DIALOG_STYLE_INPUT, "Recipient", "{FF3333}Error: {FFFFFF}You can't send a letter to admins!\n\nPlease type the name of the recipient (online or offline)", "Next", "Cancel");
- }
- else
- {
- SetPVarInt(playerid, "LetterRecipient", GetPlayerSQLId(giveplayer));
- ShowPlayerDialogEx(playerid, DIALOG_POMESSAGE, DIALOG_STYLE_INPUT, "Send Letter", "{FFFFFF}Please type the message.", "Send", "Cancel");
- }
- }
- return 1;
- }
- else if (dialogid == DIALOG_POMESSAGE && response)
- {
- if (PlayerInfo[playerid][pAdmin] < 2 && CheckServerAd(inputtext)) {
- format(string,sizeof(string),"Warning: %s may be server advertising via mail: '%s'.", GetPlayerNameEx(playerid),inputtext);
- ABroadCast(COLOR_RED, string, 2);
- format(string,sizeof(string),"Warning: %s(%d) may be server advertising via mail: '%s'.", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), inputtext);
- Log("logs/hack.log", string);
- return 1;
- }
- new query[512], rec[MAX_PLAYER_NAME];
- if (strlen(inputtext) == 0) {
- ShowPlayerDialogEx(playerid, DIALOG_POMESSAGE, DIALOG_STYLE_INPUT, "Send Letter", "{FF3333}Error: {FFFFFF}Message Not Entered!\n\nPlease type the message.", "Send", "Cancel");
- return 1;
- }
- if (strlen(inputtext) > 128) return 1; // Apparently not possible, but just in case
- if (!GetPVarType(playerid, "LetterGov")) {
- if (GetPlayerCash(playerid) < GetPVarInt(playerid, "LetterCost")) {
- return SendClientMessageEx(playerid, COLOR_GREY, "You can't afford the stamp.");
- }
- GivePlayerCash(playerid, -GetPVarInt(playerid, "LetterCost"));
- }
- else {
- DeletePVar(playerid, "LetterGov");
- if (Tax < 500) return SendClientMessageEx(playerid, COLOR_WHITE, "No government funds are available for stamp.");
- Tax -= 500;
- Misc_Save();
- }
- mysql_format(MainPipeline, query,sizeof(query), "INSERT INTO `letters` (`Sender_Id`, `Receiver_Id`, `Date`, `Message`, `Delivery_Min`, `Notify`) VALUES (%d, %d, NOW(), '%e', %d, %d)", GetPlayerSQLId(playerid), GetPVarInt(playerid, "LetterRecipient"), inputtext, GetPVarInt(playerid, "LetterTime"), GetPVarInt(playerid, "LetterNotify"));
- mysql_tquery(MainPipeline, query, "OnQueryFinish", "ii", SENDDATA_THREAD, playerid);
- GetPVarString(playerid, "LetterRecipientName", rec, MAX_PLAYER_NAME);
- if (GetPVarInt(playerid, "LetterTime") == 0)
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "Your letter has been sent. It will be delivered immediately.");
- new xid=ReturnUser(rec);
- if (xid != INVALID_PLAYER_ID)
- {
- if (PlayerInfo[xid][pDonateRank] >= 4 && HasMailbox(xid))
- {
- SendClientMessageEx(xid, COLOR_YELLOW, "A letter has just been delivered to your mailbox.");
- SetPVarInt(xid, "UnreadMails", 1);
- }
- }
- }
- else
- {
- format(string, sizeof(string), "Your letter has been sent. It will be delivered in %d hour(s).", GetPVarInt(playerid, "LetterTime") / 60);
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- }
- PlayerInfo[playerid][pPaper]--;
- DeletePVar(playerid, "LetterCost");
- DeletePVar(playerid, "LetterTime");
- DeletePVar(playerid, "LetterRecipient");
- DeletePVar(playerid, "LetterNotify");
- SetPVarInt(playerid, "MailTime", 30);
- new szLog[256];
- format(szLog, sizeof(szLog), "%s(%d) has sent mail to %s: %s", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), rec, inputtext);
- Log("logs/mail.log", szLog);
- return 1;
- }
- else if (dialogid == DIALOG_POMAILS && response)
- {
- SetPVarInt(playerid, "ReadingMail", ListItemTrackId[playerid][listitem]);
- DisplayMailDetails(playerid, ListItemTrackId[playerid][listitem]);
- }
- else if (dialogid == DIALOG_PODETAIL)
- {
- if (response) // Back
- {
- DisplayMails(playerid);
- }
- else // Trash
- {
- new query[64];
- mysql_format(MainPipeline, query, sizeof(query), "DELETE FROM `letters` WHERE `ID` = %i", GetPVarInt(playerid, "ReadingMail"));
- mysql_tquery(MainPipeline, query, "OnQueryFinish", "i", SENDDATA_THREAD);
- ShowPlayerDialogEx(playerid, DIALOG_POTRASHED, DIALOG_STYLE_MSGBOX, "Info", "You've trashed your mail.", "Back", "Close");
- }
- DeletePVar(playerid, "ReadingMail");
- return 1;
- }
- else if (dialogid == DIALOG_POTRASHED && response)
- {
- DisplayMails(playerid);
- return 1;
- }
- else if (dialogid == DIALOG_STOREPRICES)
- {
- if (!response || (GetPVarInt(playerid, "EditingBusiness") != PlayerInfo[playerid][pBusiness]) || (GetPVarInt(playerid, "EditingBusiness") != InBusiness(playerid)) || PlayerInfo[playerid][pBusinessRank] != 5) {
- DeletePVar(playerid, "EditingBusiness");
- }
- else {
- format(string, sizeof(string), "{FFFFFF}Enter the new sale price for %s\n(Items with the price of $0 will not be for sale)", StoreItems[listitem]);
- ShowPlayerDialogEx(playerid, DIALOG_STOREITEMPRICE, DIALOG_STYLE_INPUT, "Edit Price", string, "Okay", "Cancel");
- SetPVarInt(playerid, "EditingStoreItem", listitem);
- }
- return 1;
- }
- else if (dialogid == DIALOG_BARPRICE)
- {
- if (!response || (GetPVarInt(playerid, "EditingBusiness") != PlayerInfo[playerid][pBusiness]) || (GetPVarInt(playerid, "EditingBusiness") != InBusiness(playerid)) || PlayerInfo[playerid][pBusinessRank] != 5) {
- DeletePVar(playerid, "EditingBusiness");
- }
- else {
- format(string, sizeof(string), "{FFFFFF}Enter the new sale price for %s\n(Items with the price of $0 will not be for sale)", Drinks[listitem]);
- ShowPlayerDialogEx(playerid, DIALOG_BARPRICE2, DIALOG_STYLE_INPUT, "Edit Price", string, "Okay", "Cancel");
- SetPVarInt(playerid, "EditingStoreItem", listitem);
- }
- return 1;
- }
- else if(dialogid == DIALOG_SEXSHOP)
- {
- if (!response || (GetPVarInt(playerid, "EditingBusiness") != PlayerInfo[playerid][pBusiness]) || (GetPVarInt(playerid, "EditingBusiness") != InBusiness(playerid)) || PlayerInfo[playerid][pBusinessRank] != 5) {
- DeletePVar(playerid, "EditingBusiness");
- }
- else {
- format(string, sizeof(string), "{FFFFFF}Enter the new sale price for %s\n(Items with the price of $0 will not be for sale)", Drinks[listitem]);
- ShowPlayerDialogEx(playerid, DIALOG_SEXSHOP2, DIALOG_STYLE_INPUT, "Edit Price", string, "Okay", "Cancel");
- SetPVarInt(playerid, "EditingStoreItem", listitem);
- }
- return 1;
- }
- else if (dialogid == DIALOG_RESTAURANT)
- {
- if (!response || (GetPVarInt(playerid, "EditingBusiness") != PlayerInfo[playerid][pBusiness]) || (GetPVarInt(playerid, "EditingBusiness") != InBusiness(playerid)) || PlayerInfo[playerid][pBusinessRank] != 5)
- {
- DeletePVar(playerid, "EditingBusiness");
- }
- else
- {
- format(string, sizeof(string), "{FFFFFF}Enter the new sale price for %s\n(Items with the price of $0 will not be for sale)", RestaurantItems[listitem]);
- ShowPlayerDialogEx(playerid, DIALOG_RESTAURANT2, DIALOG_STYLE_INPUT, "Edit Price", string, "Okay", "Cancel");
- SetPVarInt(playerid, "EditingStoreItem", listitem);
- }
- }
- else if (dialogid == DIALOG_SEXSHOP2)
- {
- if (PlayerInfo[playerid][pBusiness] != GetPVarInt(playerid, "EditingBusiness") || (GetPVarInt(playerid, "EditingBusiness") != InBusiness(playerid)) || PlayerInfo[playerid][pBusinessRank] != 5) {
- DeletePVar(playerid, "EditingStoreItem");
- DeletePVar(playerid, "EditingBusiness");
- return 1;
- }
- new iBusiness = PlayerInfo[playerid][pBusiness];
- if (response) {
- new iPrice = strval(inputtext), item = GetPVarInt(playerid, "EditingStoreItem");
- if (iPrice < 0 || iPrice > 500000) {
- format(string, sizeof(string), "{FF0000}Error: {DDDDDD}Price is out of range{FFFFFF}\n\nEnter the new sale price for %s", Drinks[item]);
- ShowPlayerDialogEx(playerid, DIALOG_STOREITEMPRICE, DIALOG_STYLE_INPUT, "Edit Price", string, "Okay", "Cancel");
- return 1;
- }
- format(string,sizeof(string), "%s price has been set to $%s!", SexItems[item], number_format(iPrice));
- Businesses[iBusiness][bItemPrices][item] = iPrice;
- SaveBusiness(iBusiness);
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s %s(%d) (IP: %s) has set the %s price to %s in %s ($%d)", GetBusinessRankName(PlayerInfo[playerid][pBusinessRank]), GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), SexItems[item], number_format(iPrice), Businesses[iBusiness][bName], iBusiness);
- new szDialog[302];
- for (new i = 0; i <= 13; i++) format(szDialog, sizeof(szDialog), "%s%s ($%s)\n", szDialog, SexItems[i], number_format(Businesses[iBusiness][bItemPrices][i]));
- ShowPlayerDialogEx(playerid, DIALOG_BARPRICE, DIALOG_STYLE_LIST, "Edit Business Prices", szDialog, "Okay", "Cancel");
- Log("logs/business.log", string);
- }
- DeletePVar(playerid, "EditingStoreItem");
- return 1;
- }
- else if (dialogid == DIALOG_RESTAURANT2)
- {
- if (PlayerInfo[playerid][pBusiness] != GetPVarInt(playerid, "EditingBusiness") || (GetPVarInt(playerid, "EditingBusiness") != InBusiness(playerid)) || PlayerInfo[playerid][pBusinessRank] != 5)
- {
- DeletePVar(playerid, "EditingStoreItem");
- DeletePVar(playerid, "EditingBusiness");
- return 1;
- }
- new business = PlayerInfo[playerid][pBusiness];
- if (response)
- {
- new price = strval(inputtext), item = GetPVarInt(playerid, "EditingStoreItem");
- if (price < 0 || price > 500000)
- {
- format(string, sizeof(string), "{FF0000}Error: {DDDDDD}Price is out of range{FFFFFF}\n\nEnter the new sale price for %s", RestaurantItems[item]);
- ShowPlayerDialogEx(playerid, DIALOG_RESTAURANT2, DIALOG_STYLE_INPUT, "Edit Price", string, "Okay", "Cancel");
- return 1;
- }
- format(string,sizeof(string), "%s price has been set to $%s!", RestaurantItems[item], number_format(price));
- Businesses[business][bItemPrices][item] = price;
- SaveBusiness(business);
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s %s(%d) (IP: %s) has set the %s price to %s in %s ($%d)", GetBusinessRankName(PlayerInfo[playerid][pBusinessRank]), GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), RestaurantItems[item], number_format(price), Businesses[business][bName], business);
- new szDialog[302];
- for (new i = 0; i <= 13; i++) format(szDialog, sizeof(szDialog), "%s%s ($%s)\n", szDialog, RestaurantItems[i], number_format(Businesses[business][bItemPrices][i]));
- ShowPlayerDialogEx(playerid, DIALOG_RESTAURANT, DIALOG_STYLE_LIST, "Edit Business Prices", szDialog, "Okay", "Cancel");
- Log("logs/business.log", string);
- }
- DeletePVar(playerid, "EditingStoreItem");
- return 1;
- }
- else if (dialogid == DIALOG_BARPRICE2)
- {
- if (PlayerInfo[playerid][pBusiness] != GetPVarInt(playerid, "EditingBusiness") || (GetPVarInt(playerid, "EditingBusiness") != InBusiness(playerid)) || PlayerInfo[playerid][pBusinessRank] != 5) {
- DeletePVar(playerid, "EditingStoreItem");
- DeletePVar(playerid, "EditingBusiness");
- return 1;
- }
- new iBusiness = PlayerInfo[playerid][pBusiness];
- if (response) {
- new iPrice = strval(inputtext), item = GetPVarInt(playerid, "EditingStoreItem");
- if (iPrice < 0 || iPrice > 500000) {
- format(string, sizeof(string), "{FF0000}Error: {DDDDDD}Price is out of range{FFFFFF}\n\nEnter the new sale price for %s", Drinks[item]);
- ShowPlayerDialogEx(playerid, DIALOG_STOREITEMPRICE, DIALOG_STYLE_INPUT, "Edit Price", string, "Okay", "Cancel");
- return 1;
- }
- format(string,sizeof(string), "%s price has been set to $%s!", Drinks[item], number_format(iPrice));
- Businesses[iBusiness][bItemPrices][item] = iPrice;
- SaveBusiness(iBusiness);
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s %s(%d) (IP: %s) has set the %s price to $%s in %s (%d)", GetBusinessRankName(PlayerInfo[playerid][pBusinessRank]), GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), Drinks[item], number_format(iPrice), Businesses[iBusiness][bName], iBusiness);
- new szDialog[302];
- for (new i = 0; i <= 13; i++) format(szDialog, sizeof(szDialog), "%s%s ($%s)\n", szDialog, Drinks[i], number_format(Businesses[iBusiness][bItemPrices][i]));
- ShowPlayerDialogEx(playerid, DIALOG_BARPRICE, DIALOG_STYLE_LIST, "Edit Business Prices", szDialog, "Okay", "Cancel");
- Log("logs/business.log", string);
- }
- DeletePVar(playerid, "EditingStoreItem");
- return 1;
- }
- else if (dialogid == DIALOG_STOREITEMPRICE)
- {
- if (PlayerInfo[playerid][pBusiness] != GetPVarInt(playerid, "EditingBusiness") || (GetPVarInt(playerid, "EditingBusiness") != InBusiness(playerid)) || PlayerInfo[playerid][pBusinessRank] != 5) {
- DeletePVar(playerid, "EditingStoreItem");
- DeletePVar(playerid, "EditingBusiness");
- return 1;
- }
- new iBusiness = PlayerInfo[playerid][pBusiness];
- if (response) {
- new iPrice = strval(inputtext), item = GetPVarInt(playerid, "EditingStoreItem");
- if (iPrice < 0 || iPrice > 500000) {
- format(string, sizeof(string), "{FF0000}Error: {DDDDDD}Price is out of range{FFFFFF}\n\nEnter the new sale price for %s", StoreItems[item]);
- ShowPlayerDialogEx(playerid, DIALOG_STOREITEMPRICE, DIALOG_STYLE_INPUT, "Edit Price", string, "OK", "Cancel");
- return 1;
- }
- format(string,sizeof(string), "%s price has been set to $%s!", StoreItems[item], number_format(iPrice));
- Businesses[iBusiness][bItemPrices][item] = iPrice;
- SaveBusiness(iBusiness);
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s %s(%d) (IP: %s) has set the %s price to $%s in %s (%d)", GetBusinessRankName(PlayerInfo[playerid][pBusinessRank]), GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), StoreItems[item], number_format(iPrice), Businesses[iBusiness][bName], iBusiness);
- new szDialog[912];
- for (new i = 0; i < sizeof(StoreItems); i++) format(szDialog, sizeof(szDialog), "%s%s ($%s) (Cost of Good: $%s)\n", szDialog, StoreItems[i], number_format(Businesses[iBusiness][bItemPrices][i]), number_format(floatround(StoreItemCost[i][ItemValue] * BUSINESS_ITEMS_COST)));
- ShowPlayerDialogEx(playerid, DIALOG_STOREPRICES, DIALOG_STYLE_LIST, "Edit 24/7 Prices", szDialog, "OK", "Cancel");
- Log("logs/business.log", string);
- }
- DeletePVar(playerid, "EditingStoreItem");
- return 1;
- }
- else if(dialogid == DIALOG_STORECLOTHINGPRICE)
- {
- new iBusiness = PlayerInfo[playerid][pBusiness];
- if (PlayerInfo[playerid][pBusiness] != GetPVarInt(playerid, "EditingBusiness") || (GetPVarInt(playerid, "EditingBusiness") != InBusiness(playerid)) || PlayerInfo[playerid][pBusinessRank] != 5) {
- DeletePVar(playerid, "EditingStoreItem");
- DeletePVar(playerid, "EditingBusiness");
- return 1;
- }
- if (response) {
- new iPrice = strval(inputtext);
- if (iPrice < 0 || iPrice > 500000) {
- ShowPlayerDialogEx(playerid, DIALOG_STORECLOTHINGPRICE, DIALOG_STYLE_INPUT, "Edit Price", "{FF0000}Error: {DDDDDD}Price is out of range{FFFFFF}\n\nEnter the new sale price for clothing", "Okay", "Cancel");
- return 1;
- }
- format(string,sizeof(string), "Clothing price has been set to $%s!", number_format(iPrice));
- Businesses[iBusiness][bItemPrices][0] = iPrice;
- SaveBusiness(iBusiness);
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s %s(%d) (IP: %s) has set the %s price to $%s in %s (%d)", GetBusinessRankName(PlayerInfo[playerid][pBusinessRank]), GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), "clothing", number_format(iPrice), Businesses[iBusiness][bName], iBusiness);
- Log("logs/business.log", string);
- }
- DeletePVar(playerid, "EditingStoreItem");
- }
- else if (dialogid == DIALOG_GUNPRICES)
- {
- if (!response || (GetPVarInt(playerid, "EditingBusiness") != PlayerInfo[playerid][pBusiness]) || (GetPVarInt(playerid, "EditingBusiness") != InBusiness(playerid)) || PlayerInfo[playerid][pBusinessRank] != 5) {
- DeletePVar(playerid, "EditingBusiness");
- }
- else {
- format(string, sizeof(string), "{FFFFFF}Enter the new sale price for %s\n(Items with the price of $0 will not be for sale)", GetWeaponNameEx(Weapons[listitem][WeaponId]));
- ShowPlayerDialogEx(playerid, DIALOG_GUNSHOPPRICE, DIALOG_STYLE_INPUT, "Edit Price", string, "Okay", "Cancel");
- SetPVarInt(playerid, "EditingStoreItem", listitem);
- }
- return 1;
- }
- else if(dialogid == DIALOG_GUNSHOPPRICE)
- {
- if (PlayerInfo[playerid][pBusiness] != GetPVarInt(playerid, "EditingBusiness") || (GetPVarInt(playerid, "EditingBusiness") != InBusiness(playerid)) || PlayerInfo[playerid][pBusinessRank] != 5) {
- DeletePVar(playerid, "EditingStoreItem");
- DeletePVar(playerid, "EditingBusiness");
- return 1;
- }
- new iBusiness = PlayerInfo[playerid][pBusiness];
- if (response) {
- new iPrice = strval(inputtext), item = GetPVarInt(playerid, "EditingStoreItem");
- if (iPrice < 0 || iPrice > 500000) {
- format(string, sizeof(string), "{FF0000}Error: {DDDDDD}Price is out of range{FFFFFF}\n\nEnter the new sale price for %s", StoreItems[item]);
- ShowPlayerDialogEx(playerid, DIALOG_GUNSHOPPRICE, DIALOG_STYLE_INPUT, "Edit Price", string, "OK", "Cancel");
- return 1;
- }
- format(string,sizeof(string), "%s price has been set to $%s!", GetWeaponNameEx(Weapons[item][WeaponId]), number_format(iPrice));
- Businesses[iBusiness][bItemPrices][item] = iPrice;
- SaveBusiness(iBusiness);
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s %s(%d) (IP: %s) has set the %s price to $%s in %s (%d)", GetBusinessRankName(PlayerInfo[playerid][pBusinessRank]), GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), GetWeaponParam(item, WeaponId), number_format(iPrice), Businesses[iBusiness][bName], iBusiness);
- new szDialog[512];
- for (new i = 0; i < sizeof(Weapons); i++) format(szDialog, sizeof(szDialog), "%s%s ($%s)\n", szDialog, GetWeaponNameEx(Weapons[i][WeaponId]), number_format(Businesses[iBusiness][bItemPrices][i]));
- ShowPlayerDialogEx(playerid, DIALOG_GUNPRICES, DIALOG_STYLE_LIST, "Edit Gun Store Prices", szDialog, "OK", "Cancel");
- Log("logs/business.log", string);
- }
- DeletePVar(playerid, "EditingStoreItem");
- return 1;
- }
- else if (dialogid == DIALOG_GASPRICE)
- {
- if (!response || (GetPVarInt(playerid, "EditingBusiness") != PlayerInfo[playerid][pBusiness]) || PlayerInfo[playerid][pBusinessRank] != 5) {
- }
- else {
- new szSaleText[148], Float:price = floatstr(inputtext);
- if (price < 1 || price > 5000) return SendClientMessageEx(playerid, COLOR_WHITE, "Price can't be lower than $1 or higher than $5,000");
- Businesses[PlayerInfo[playerid][pBusiness]][bGasPrice] = price;
- for (new i; i < MAX_BUSINESS_GAS_PUMPS; i++)
- {
- format(szSaleText,sizeof(szSaleText),"Price Per Gallon: $%.2f\nThis Sale: $%.2f\nGallons: %.3f\nGas Available: %.2f/%.2f gallons", price, Businesses[PlayerInfo[playerid][pBusiness]][GasPumpSalePrice][i], Businesses[PlayerInfo[playerid][pBusiness]][GasPumpSaleGallons][i], Businesses[PlayerInfo[playerid][pBusiness]][GasPumpGallons][i], Businesses[PlayerInfo[playerid][pBusiness]][GasPumpCapacity][i]);
- UpdateDynamic3DTextLabelText(Businesses[PlayerInfo[playerid][pBusiness]][GasPumpSaleTextID][i], COLOR_YELLOW, szSaleText);
- }
- SaveBusiness(PlayerInfo[playerid][pBusiness]);
- format(string, sizeof(string), "Gallon price has been set to %.2f!", price);
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s(%d) (IP: %s) has set the gas price to %f in %s", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), price, Businesses[PlayerInfo[playerid][pBusiness]][bName]);
- Log("logs/business.log", string);
- }
- DeletePVar(playerid, "EditingBusiness");
- return 1;
- }
- else if (dialogid == DIALOG_SWITCHGROUP && response)
- {
- if (!(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pASM] >= 1 || PlayerInfo[playerid][pFactionModerator] >= 1)) return 1;
- new
- iGroupID = listitem;
- if(arrGroupData[iGroupID][g_iGroupType] == GROUP_TYPE_CONTRACT) {
- return SendClientMessage(playerid, COLOR_WHITE, "You can't switch to a contract agency with this command.");
- }
- format(string, sizeof(string), "You have switched to group ID %d (%s).", iGroupID+1, arrGroupData[iGroupID][g_szGroupName]);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- PlayerInfo[playerid][pMember] = iGroupID;
- PlayerInfo[playerid][pRank] = Group_GetMaxRank(iGroupID);
- PlayerInfo[playerid][pLeader] = -1;
- }
- else if (dialogid == DIALOG_MAKELEADER && response)
- {
- if (PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pASM] >= 1 || PlayerInfo[playerid][pFactionModerator] >= 2)
- {
- new
- iGroupID = listitem,
- iTargetID = GetPVarInt(playerid, "MakingLeader");
- if(!arrGroupData[iGroupID][g_szGroupName][0]) { return SendClientMessageEx(playerid, COLOR_GREY, "This group has not been properly set up yet."); }
- PlayerInfo[iTargetID][pLeader] = iGroupID;
- PlayerInfo[iTargetID][pMember] = iGroupID;
- PlayerInfo[iTargetID][pRank] = Group_GetMaxRank(iGroupID);
- PlayerInfo[iTargetID][pDivision] = -1;
- format(string, sizeof(string), "You have been made the leader of the %s by Administrator %s.", arrGroupData[iGroupID][g_szGroupName], GetPlayerNameEx(playerid));
- SendClientMessageEx(iTargetID, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "You have made %s the leader of the %s.", GetPlayerNameEx(iTargetID), arrGroupData[iGroupID][g_szGroupName]);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "%s (%d) has made %s (%d) the leader of the %s.", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerNameEx(iTargetID), GetPlayerSQLId(iTargetID), arrGroupData[iGroupID][g_szGroupName]);
- GroupLog(iGroupID, string);
- }
- else SendClientMessageEx(playerid, COLOR_GRAD2, "You do not have access to this.");
- }
- else if (dialogid == DIALOG_HBADGE && response)
- {
- if (!IsAHitman(playerid)) return 1;
- new iGroupID = listitem;
- if(!arrGroupData[iGroupID][g_szGroupName][0]) { return SendClientMessageEx(playerid, COLOR_GREY, "This group has not been properly set up yet."); }
- switch(listitem)
- {
- case 0..20: {
- format(string, sizeof(string), "You have set your badge to %s", arrGroupData[iGroupID][g_szGroupName]);
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- SetPlayerColor(playerid, arrGroupData[iGroupID][g_hDutyColour] * 256);
- SetPVarInt(playerid, "HitmanBadgeColour", arrGroupData[iGroupID][g_hDutyColour] * 256);
- }
- default: {
- SendClientMessageEx(playerid, COLOR_GREY, "Invalid group specified.");
- }
- }
- }
- else if(dialogid == DIALOG_CDBUY)
- {
- // Account Eating Bug Fix
- if(!IsPlayerInAnyVehicle(playerid))
- {
- TogglePlayerControllable(playerid, 1);
- SendClientMessageEx(playerid,COLOR_GRAD2,"You need to be in the vehicle you wish to purchase.");
- return 1;
- }
- new vehicleid = GetPlayerVehicleID(playerid);
- new playervehicleid = GetPlayerFreeVehicleId(playerid);
- new v = GetBusinessCarSlot(vehicleid);
- new d = GetCarBusiness(vehicleid);
- if(response)
- {
- if(!vehicleCountCheck(playerid))
- {
- TogglePlayerControllable(playerid, 1);
- RemovePlayerFromVehicle(playerid);
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz+1.2);
- return SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You cannot own any additional vehicles. You may purchase additional vehicle slots through /vstorage.");
- }
- if(Businesses[d][bPurchaseX] == 0.0 && Businesses[d][bPurchaseY] == 0.0 && Businesses[d][bPurchaseZ] == 0.0)
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "ERROR: The owner of this Car Dealership hasn't set the purchased vehicles spawn point.");
- RemovePlayerFromVehicle(playerid);
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz+1.2);
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- new randcolor1 = Random(0, 126);
- new randcolor2 = Random(0, 126);
- SetPlayerPos(playerid, Businesses[d][bParkPosX][v], Businesses[d][bParkPosY][v], Businesses[d][bParkPosZ][v]+2);
- TogglePlayerControllable(playerid, 1);
- new cost;
- if(PlayerInfo[playerid][pDonateRank] < 1)
- {
- cost = Businesses[d][bPrice][v];
- if(PlayerInfo[playerid][pCash] < cost)
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "ERROR: You don't have enough money to buy this.");
- RemovePlayerFromVehicle(playerid);
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz+1.2);
- return 1;
- }
- format(string, sizeof(string), " Thank you for buying at %s.", Businesses[d][bName]);
- SendClientMessageEx(playerid, COLOR_GRAD1, string);
- PlayerInfo[playerid][pCash] -= cost;
- cost = Businesses[d][bPrice][v] / 100 * 15;
- Businesses[d][bSafeBalance] += TaxSale( cost );
- }
- else
- {
- cost = Businesses[d][bPrice][v];
- if(PlayerInfo[playerid][pCash] < cost)
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "ERROR: You don't have enough money to buy this.");
- RemovePlayerFromVehicle(playerid);
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz+1.2);
- return 1;
- }
- format(string, sizeof(string), " Thank you for buying at %s.",Businesses[d][bName]);
- SendClientMessageEx(playerid, COLOR_GRAD1, string);
- PlayerInfo[playerid][pCash] -= cost;
- cost = Businesses[d][bPrice][v] / 100 * 15;
- Businesses[d][bSafeBalance] += TaxSale( cost );
- }
- if(PlayerInfo[playerid][pTut] == 15)
- {
- PlayerInfo[playerid][pCarLic] = gettime() + (86400); // temp 1 day license
- PlayerInfo[playerid][pTut]++;
- AdvanceTutorial(playerid);
- }
- Businesses[d][bInventory]--;
- Businesses[d][bTotalSales]++;
- IsPlayerEntering{playerid} = true;
- new car = CreatePlayerVehicle(playerid, playervehicleid, Businesses[d][bModel][v], Businesses[d][bPurchaseX], Businesses[d][bPurchaseY], Businesses[d][bPurchaseZ], Businesses[d][bPurchaseAngle], randcolor1, randcolor2, cost, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
- PutPlayerInVehicle(playerid, car, 0);
- SaveBusiness(d);
- format(string, sizeof(string), "%s(%d) has purchased a %s(%d) from %s for $%s", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), VehicleName[Businesses[d][bModel][v] - 400], Businesses[d][bModel][v], Businesses[d][bName], number_format(Businesses[d][bPrice][v]));
- Log("logs/dealership.log", string);
- }
- else
- {
- RemovePlayerFromVehicle(playerid);
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz+1.2);
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- }
- else if(dialogid == DIALOG_LOADTRUCKOLD) // TRUCKER JOB LOAD TRUCK
- {
- if(response)
- {
- if(listitem == 0) // Legal goods
- {
- ShowPlayerDialogEx(playerid, DIALOG_LOADTRUCKL, DIALOG_STYLE_LIST, "What do you want to transport?","{00F70C}Food & beverages\n{00F70C}Clothing\n{00F70C}Materials\n{00F70C}24/7 Items", "Select", "Cancel");
- }
- if(listitem == 1) // Illegal goods
- {
- new level = PlayerInfo[playerid][pTruckSkill];
- if(level >= 0 && level <= 50)
- {
- ShowPlayerDialogEx(playerid, DIALOG_LOADTRUCKI, DIALOG_STYLE_LIST, "What do you want to transport?","{FF0606}Weapons {FFFFFF}(Level 1 Bonus: Free 9mm)\n{FF0606}Drugs {FFFFFF}(Level 1 Bonus: Free 2 Cannabis, 1 crack)\n{FF0606}Illegal materials {FFFFFF}(Level 1 Bonus: Free 100 materials)", "Select", "Cancel");
- }
- else if(level >= 51 && level <= 100)
- {
- ShowPlayerDialogEx(playerid, DIALOG_LOADTRUCKI, DIALOG_STYLE_LIST, "What do you want to transport?","{FF0606}Weapons {FFFFFF}(Level 2 Bonus: Free Shotgun)\n{FF0606}Drugs {FFFFFF}(Level 2 Bonus: Free 4 Cannabis, 2 crack)\n{FF0606}Illegal materials {FFFFFF}(Level 2 Bonus: Free 200 materials)", "Select", "Cancel");
- }
- else if(level >= 101 && level <= 200)
- {
- ShowPlayerDialogEx(playerid, DIALOG_LOADTRUCKI, DIALOG_STYLE_LIST, "What do you want to transport?","{FF0606}Weapons {FFFFFF}(Level 3 Bonus: Free MP5)\n{FF0606}Drugs {FFFFFF}(Level 3 Bonus: Free 6 Cannabis, 3 crack)\n{FF0606}Illegal materials {FFFFFF}(Level 3 Bonus: Free 400 materials)", "Select", "Cancel");
- }
- else if(level >= 201 && level <= 400)
- {
- ShowPlayerDialogEx(playerid, DIALOG_LOADTRUCKI, DIALOG_STYLE_LIST, "What do you want to transport?","{FF0606}Weapons {FFFFFF}(Level 4 Bonus: Free Deagle)\n{FF0606}Drugs {FFFFFF}(Level 4 Bonus: Free 8 Cannabis, 4 crack)\n{FF0606}Illegal materials {FFFFFF}(Level 4 Bonus: Free 600 materials)", "Select", "Cancel");
- }
- else if(level >= 401)
- {
- ShowPlayerDialogEx(playerid, DIALOG_LOADTRUCKI, DIALOG_STYLE_LIST, "What do you want to transport?","{FF0606}Weapons {FFFFFF}(Level 5 Bonus: Free AK-47)\n{FF0606}Drugs {FFFFFF}(Level 5 Bonus: Free 10 Cannabis, 5 crack)\n{FF0606}Illegal materials {FFFFFF}(Level 5 Bonus: Free 1000 materials)", "Select", "Cancel");
- }
- }
- }
- else
- {
- DeletePVar(playerid, "IsFrozen");
- TogglePlayerControllable(playerid, 1);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You canceled the loading of the shipment, type /loadshipment to try again.");
- }
- }
- else if(dialogid == DIALOG_LOADTRUCKL) // TRUCKER JOB LEGAL GOODS
- {
- if(response)
- {
- if(listitem == 0) // Food & beverages
- {
- SetPVarInt(playerid, "TruckDeliver", 1);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Please wait a moment while the vehicle is being loaded with food & beverages....");
- }
- if(listitem == 1) // Clothing
- {
- SetPVarInt(playerid, "TruckDeliver", 2);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Please wait a moment while the vehicle is being loaded with clothing....");
- }
- if(listitem == 2) // Materials
- {
- SetPVarInt(playerid, "TruckDeliver", 3);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Please wait a moment while the vehicle is being loaded with materials....");
- }
- if(listitem == 3) // 24/7 Items
- {
- SetPVarInt(playerid, "TruckDeliver", 4);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Please wait a moment while the vehicle is being loaded with 24/7 items....");
- }
- SetPVarInt(playerid, "LoadType", 1);
- SetPVarInt(playerid, "LoadTruckTime", 10);
- SetTimerEx("LoadTruckOld", 1000, 0, "d", playerid);
- }
- else
- {
- DeletePVar(playerid, "IsFrozen");
- TogglePlayerControllable(playerid, 1);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You canceled the loading of the shipment, type /loadshipment to try again.");
- }
- }
- else if(dialogid == DIALOG_LOADTRUCKI) // TRUCKER JOB ILLEGAL GOODS
- {
- if(response)
- {
- // 1 = food and bev
- // 2 = clothing
- // 3 = legal mats
- // 4 = 24/7 items
- // 5 = weapons
- // 6 = illegal drugs
- // 7 = illegal materials
- //new level = PlayerInfo[playerid][pTruckSkill];
- if(listitem == 0) // Weapons
- {
- SetPVarInt(playerid, "TruckDeliver", 5);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Please wait a moment while the vehicle is being loaded with weapons....");
- }
- if(listitem == 1) // Drugs
- {
- SetPVarInt(playerid, "TruckDeliver", 6);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Please wait a moment while the vehicle is being loaded with drugs....");
- }
- if(listitem == 2) // Illegal materials
- {
- SetPVarInt(playerid, "TruckDeliver", 7);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Please wait a moment while the vehicle is being loaded with illegal materials....");
- }
- SetPVarInt(playerid, "LoadType", 1);
- SetPVarInt(playerid, "LoadTruckTime", 10);
- SetTimerEx("LoadTruckOld", 1000, 0, "d", playerid);
- }
- else
- {
- DeletePVar(playerid, "IsFrozen");
- TogglePlayerControllable(playerid, 1);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You canceled the loading of the shipment, type /loadshipment to try again.");
- }
- }
- else if(dialogid == DIALOG_ADMINAUCTIONS)
- {
- if(response) {
- SetPVarInt(playerid, "AuctionItem", listitem);
- ShowPlayerDialogEx(playerid, DIALOG_ADMINAUCTIONS2, DIALOG_STYLE_LIST, "Edit Auction", "Auction Enabled\nAuction Item Description\nAuction Expiration\nStarting Bid\nIncease Increment", "Select", "Exit");
- }
- }
- else if(dialogid == DIALOG_ADMINAUCTIONS2)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialogEx(playerid, DIALOG_ADMINAUCTIONS3, DIALOG_STYLE_LIST, "Edit Auction Enabled", "Enabled\nDisabled", "Select", "Exit");
- }
- case 1:
- {
- ShowPlayerDialogEx(playerid, DIALOG_ADMINAUCTIONS4, DIALOG_STYLE_INPUT, "Edit Auction Item Description", "Enter below the item description for the auction.","Change","Exit");
- }
- case 2:
- {
- ShowPlayerDialogEx(playerid, DIALOG_ADMINAUCTIONS5, DIALOG_STYLE_INPUT, "Edit Auction Expiration", "Enter the amount of minutes you want the auction to last for.","Change","Exit");
- }
- case 3:
- {
- ShowPlayerDialogEx(playerid, DIALOG_ADMINAUCTIONS6, DIALOG_STYLE_INPUT, "Edit Auction Starting Bid", "Enter the starting bid amount.","Change","Exit");
- }
- case 4:
- {
- ShowPlayerDialogEx(playerid, DIALOG_ADMINAUCTIONS7, DIALOG_STYLE_INPUT, "Edit Auction Increase Increment", "Enter the increase increment amount.","Change","Exit");
- }
- }
- }
- }
- else if(dialogid == DIALOG_ADMINAUCTIONS3)
- {
- if(response) {
- new
- AuctionItem = GetPVarInt(playerid, "AuctionItem"),
- szMessage[128];
- if(listitem == 0)
- {
- if(Auctions[AuctionItem][Expires] == 0) {
- SendClientMessageEx(playerid, COLOR_GREY, "Before you can start an auction you must set the expiration time.");
- return 1;
- }
- format(szMessage, sizeof(szMessage), "%s(%d) (IP:%s) has edited auction %i enabled to 1 (Enabled)", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), AuctionItem);
- Log("logs/adminauction.log", szMessage);
- Auctions[AuctionItem][InProgress] = 1;
- Auctions[AuctionItem][Timer] = SetTimerEx("EndAuction", 60000, true, "i", AuctionItem);
- SendClientMessageEx(playerid, COLOR_WHITE, "Auction has been enabled, people can start biding.");
- }
- else
- {
- KillTimer(Auctions[AuctionItem][Timer]);
- format(szMessage, sizeof(szMessage), "%s(%d) (IP:%s) has edited auction %i enabled to 0 (disabled)", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), AuctionItem);
- Log("logs/adminauction.log", szMessage);
- Auctions[AuctionItem][InProgress] = 0;
- SendClientMessageEx(playerid, COLOR_WHITE, "Auction has been disabled.");
- }
- SaveAuction(AuctionItem);
- DeletePVar(playerid, "AuctionItem");
- }
- }
- else if(dialogid == DIALOG_ADMINAUCTIONS4)
- {
- if(response)
- {
- new
- AuctionItem = GetPVarInt(playerid, "AuctionItem"),
- szMessage[128];
- if(isnull(inputtext))
- {
- ShowPlayerDialogEx(playerid, DIALOG_ADMINAUCTIONS4, DIALOG_STYLE_INPUT, "Edit Auction Item Description", "Enter below the item description for the auction.","Change","Exit");
- return 1;
- }
- if(strlen(inputtext) > 64)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "The item description can't be longer then 64 characters.");
- ShowPlayerDialogEx(playerid, DIALOG_ADMINAUCTIONS4, DIALOG_STYLE_INPUT, "Edit Auction Item Description", "Enter below the item description for the auction.","Change","Exit");
- return 1;
- }
- format(szMessage, sizeof(szMessage), "%s(%d) (IP:%s) has edited auction %i item description to %s", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), AuctionItem, inputtext);
- Log("logs/adminauction.log", szMessage);
- format(Auctions[AuctionItem][BiddingFor], 64, inputtext);
- SaveAuction(AuctionItem);
- DeletePVar(playerid, "AuctionItem");
- SendClientMessageEx(playerid, COLOR_WHITE, "You have adjusted the auction item description.");
- }
- }
- else if(dialogid == DIALOG_ADMINAUCTIONS5)
- {
- if(response) {
- new
- Time = strval(inputtext),
- AuctionItem = GetPVarInt(playerid, "AuctionItem"),
- szMessage[128];
- if(Time < 0) {
- ShowPlayerDialogEx(playerid, DIALOG_ADMINAUCTIONS5, DIALOG_STYLE_INPUT, "Edit Auction Expiration", "Enter the amount of minutes you want the auction to last for.","Change","Exit");
- SendClientMessageEx(playerid, COLOR_GREY, "The time can't be below 0.");
- return 1;
- }
- format(szMessage, sizeof(szMessage), "%s(%d) (IP:%s) has edited auction %i expire time to %i", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), AuctionItem, Time);
- Log("logs/adminauction.log", szMessage);
- Auctions[AuctionItem][Expires] = Time;
- SaveAuction(AuctionItem);
- DeletePVar(playerid, "AuctionItem");
- SendClientMessageEx(playerid, COLOR_WHITE, "You have adjusted the auction expiration time.");
- }
- }
- else if(dialogid == DIALOG_ADMINAUCTIONS6)
- {
- if(response) {
- new
- Time = strval(inputtext),
- AuctionItem = GetPVarInt(playerid, "AuctionItem"),
- szMessage[128];
- if(Time < 0) {
- ShowPlayerDialogEx(playerid, DIALOG_ADMINAUCTIONS6, DIALOG_STYLE_INPUT, "Edit Auction Starting Bid", "Enter the starting bid amount.","Change","Exit");
- SendClientMessageEx(playerid, COLOR_GREY, "The starting bid can't be below 0.");
- return 1;
- }
- format(szMessage, sizeof(szMessage), "%s(%d) (IP:%s) has edited auction %i starting bid to %i", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), AuctionItem, Time );
- Log("logs/adminauction.log", szMessage);
- Auctions[AuctionItem][Bid] = Time;
- SaveAuction(AuctionItem);
- DeletePVar(playerid, "AuctionItem");
- SendClientMessageEx(playerid, COLOR_WHITE, "You have adjusted the bid starting amount.");
- }
- }
- else if(dialogid == DIALOG_ADMINAUCTIONS7)
- {
- if(response) {
- new
- Time = strval(inputtext),
- AuctionItem = GetPVarInt(playerid, "AuctionItem"),
- szMessage[128];
- if(Time < 0) {
- ShowPlayerDialogEx(playerid, DIALOG_ADMINAUCTIONS7, DIALOG_STYLE_INPUT, "Edit Auction Increase Increment", "Enter the increase increment amount.","Change","Exit");
- SendClientMessageEx(playerid, COLOR_GREY, "The increase increment amount can't be below 0.");
- return 1;
- }
- format(szMessage, sizeof(szMessage), "%s(%d) (IP:%s) has edited auction %i increment to %i", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), AuctionItem, Time );
- Log("logs/adminauction.log", szMessage);
- Auctions[AuctionItem][Increment] = Time;
- SaveAuction(AuctionItem);
- DeletePVar(playerid, "AuctionItem");
- SendClientMessageEx(playerid, COLOR_WHITE, "You have adjusted the increase increment amount.");
- }
- }
- else if(dialogid == DIALOG_AUCTIONS)
- {
- if(response) {
- if(Auctions[listitem][InProgress] == 1) {
- new
- szInfo[200];
- format(szInfo, sizeof(szInfo), "{00BFFF}Item: {FFFFFF}%s\n\n{00BFFF}Current Bid: {FFFFFF}$%i\n\n{00BFFF}Bidder: {FFFFFF}%s\n\n{00BFFF}Expires: {FFFFFF}%s", Auctions[listitem][BiddingFor], Auctions[listitem][Bid], Auctions[listitem][Wining], Auctions[listitem][Expires]);
- ShowPlayerDialogEx(playerid, DIALOG_AUCTIONS2, DIALOG_STYLE_MSGBOX, "{00BFFF}Auction Information", szInfo, "Bid", "Exit");
- SetPVarInt(playerid, "AuctionItem", listitem);
- }
- else SendClientMessageEx(playerid, COLOR_GREY, "That auction isn't currently available.");
- }
- }
- else if(dialogid == DIALOG_AUCTIONS2)
- {
- if(response) {
- new
- AuctionItem = GetPVarInt(playerid, "AuctionItem");
- if(Auctions[AuctionItem][InProgress] == 1) {
- new
- szInfo[128];
- format(szInfo, sizeof(szInfo), "You are bidding on %s. The current bid is $%i, to place a bid it must be higher then the current one.", Auctions[AuctionItem][BiddingFor], Auctions[AuctionItem][Bid]);
- ShowPlayerDialogEx(playerid, DIALOG_AUCTIONS3, DIALOG_STYLE_INPUT, "Auction - Bidding",szInfo,"Place Bid","Exit");
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, "That auction isn't currently available.");
- DeletePVar(playerid, "AuctionItem");
- }
- }
- }
- else if(dialogid == DIALOG_AUCTIONS3)
- {
- if(response) {
- new
- BidPlaced = strval(inputtext),
- AuctionItem = GetPVarInt(playerid, "AuctionItem");
- if(GetPlayerCash(playerid) < BidPlaced) {
- SendClientMessageEx(playerid, COLOR_GREY, "You can't bid money you don't have.");
- return 1;
- }
- if(BidPlaced < 1) {
- SendClientMessageEx(playerid, COLOR_GREY, "You can't place a bid under $1.");
- return 1;
- }
- if(BidPlaced < Auctions[AuctionItem][Bid]+Auctions[AuctionItem][Increment]) {
- new szMessage[128];
- format(szMessage, sizeof(szMessage), "You need to bid at least %i over the current bid of %i.", Auctions[AuctionItem][Increment], Auctions[AuctionItem][Bid]);
- SendClientMessageEx(playerid, COLOR_GREY, szMessage);
- return 1;
- }
- if(Auctions[AuctionItem][InProgress] == 1) {
- if(BidPlaced > Auctions[AuctionItem][Bid]) {
- SetPVarInt(playerid, "BidPlaced", BidPlaced);
- HigherBid(playerid);
- }
- else SendClientMessageEx(playerid, COLOR_GREY, "That bid is to low, a higher amount is needed to place the bid.");
- }
- else SendClientMessageEx(playerid, COLOR_GREY, "That auction isn't currently available.");
- }
- }
- if(dialogid == DIALOG_CGAMESADMINMENU)
- {
- if(response) {
- switch(listitem)
- {
- case 0:
- {
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSELECTPOKER);
- }
- case 1:
- {
- }
- case 2:
- {
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESCREDITS);
- }
- }
- }
- }
- if(dialogid == DIALOG_CGAMESSELECTPOKER)
- {
- if(response) {
- SetPVarInt(playerid, "tmpEditPokerTableID", listitem+1);
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPOKER);
- } else {
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESADMINMENU);
- }
- }
- if(dialogid == DIALOG_CGAMESSETUPPOKER)
- {
- if(response) {
- new tableid = GetPVarInt(playerid, "tmpEditPokerTableID")-1;
- if(PokerTable[tableid][pkrPlaced] == 0) {
- switch(listitem)
- {
- case 0: // Place Poker Table
- {
- new szString[128];
- format(szString, sizeof(szString), "Press '{3399FF}~k~~PED_SPRINT~{FFFFFF}' to place poker table.");
- SendClientMessage(playerid, COLOR_WHITE, szString);
- SetPVarInt(playerid, "tmpPlacePokerTable", 1);
- }
- }
- } else {
- switch(listitem)
- {
- case 0: // Edit Poker Table
- {
- SetPVarFloat(playerid, "tmpPkrX", PokerTable[tableid][pkrX]);
- SetPVarFloat(playerid, "tmpPkrY", PokerTable[tableid][pkrY]);
- SetPVarFloat(playerid, "tmpPkrZ", PokerTable[tableid][pkrZ]);
- SetPVarFloat(playerid, "tmpPkrRX", PokerTable[tableid][pkrRX]);
- SetPVarFloat(playerid, "tmpPkrRY", PokerTable[tableid][pkrRY]);
- SetPVarFloat(playerid, "tmpPkrRZ", PokerTable[tableid][pkrRZ]);
- EditObject(playerid, PokerTable[tableid][pkrObjectID]);
- new szString[128];
- format(szString, sizeof(szString), "You have selected Poker Table %d, You may now customize it's position/rotation.", tableid);
- SendClientMessage(playerid, COLOR_WHITE, szString);
- }
- case 1: // Destroy Poker Table
- {
- DestroyPokerTable(tableid);
- new szString[64];
- format(szString, sizeof(szString), "You have deleted Poker Table %d.", tableid);
- SendClientMessage(playerid, COLOR_WHITE, szString);
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSELECTPOKER);
- }
- }
- }
- } else {
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSELECTPOKER);
- }
- }
- if(dialogid == DIALOG_CGAMESCREDITS)
- {
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESADMINMENU);
- }
- if(dialogid == DIALOG_CGAMESSETUPPGAME)
- {
- if(response) {
- switch(listitem)
- {
- case 0: // Buy-In Max
- {
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME2);
- }
- case 1: // Buy-In Min
- {
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME3);
- }
- case 2: // Blind
- {
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME4);
- }
- case 3: // Limit
- {
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME5);
- }
- case 4: // Password
- {
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME6);
- }
- case 5: // Round Delay
- {
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME7);
- }
- case 6: // Start Game
- {
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESBUYINPOKER);
- }
- }
- } else {
- LeavePokerTable(playerid);
- }
- }
- if(dialogid == DIALOG_CGAMESSETUPPGAME2)
- {
- if(response) {
- if(strval(inputtext) < 1 || strval(inputtext) > 10000) {
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME2);
- }
- if(strval(inputtext) <= PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrBuyInMin]) {
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME2);
- }
- PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrBuyInMax] = strval(inputtext);
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME);
- } else {
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME);
- }
- }
- if(dialogid == DIALOG_CGAMESSETUPPGAME3)
- {
- if(response) {
- if(strval(inputtext) < 1 || strval(inputtext) > 10000) {
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME3);
- }
- if(strval(inputtext) >= PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrBuyInMax]) {
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME3);
- }
- PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrBuyInMin] = strval(inputtext);
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME);
- } else {
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME);
- }
- }
- if(dialogid == DIALOG_CGAMESSETUPPGAME4)
- {
- if(response) {
- if(strval(inputtext) < 1 || strval(inputtext) > 10000) {
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME4);
- }
- PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrBlind] = strval(inputtext);
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME);
- } else {
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME);
- }
- }
- if(dialogid == DIALOG_CGAMESSETUPPGAME5)
- {
- if(response) {
- if(strval(inputtext) < 2 || strval(inputtext) > 6) {
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME5);
- }
- PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrLimit] = strval(inputtext);
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME);
- } else {
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME);
- }
- }
- if(dialogid == DIALOG_CGAMESSETUPPGAME6)
- {
- if(response) {
- new tableid = GetPVarInt(playerid, "pkrTableID")-1;
- strmid(PokerTable[tableid][pkrPass], inputtext, 0, strlen(inputtext), 32);
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME);
- } else {
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME);
- }
- }
- if(dialogid == DIALOG_CGAMESSETUPPGAME7)
- {
- if(response) {
- if(strval(inputtext) < 15 || strval(inputtext) > 120) {
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME7);
- }
- PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrSetDelay] = strval(inputtext);
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME);
- } else {
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME);
- }
- }
- if(dialogid == DIALOG_CGAMESBUYINPOKER)
- {
- if(response) {
- if(strval(inputtext) < PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrBuyInMin] || strval(inputtext) > PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrBuyInMax] || strval(inputtext) > GetPlayerCash(playerid)) {
- return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESBUYINPOKER);
- }
- PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrActivePlayers]++;
- SetPVarInt(playerid, "pkrChips", GetPVarInt(playerid, "pkrChips")+strval(inputtext));
- //SetPVarInt(playerid, "cgChips", GetPVarInt(playerid, "cgChips")-strval(inputtext));
- GivePlayerCashEx(playerid, TYPE_ONHAND, -strval(inputtext));
- format(string, sizeof(string), "%s(%d) (IP:%s) has bought in with the amount of $%s (%d)", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(GetPVarInt(playerid, "pkrChips")), GetPVarInt(playerid, "pkrTableID")-1);
- Log("logs/poker.log", string);
- if(PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrActive] == 3 && PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrRound] == 0 && PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrDelay] >= 6) {
- SetPVarInt(playerid, "pkrStatus", 1);
- }
- else if(PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrActive] < 3) {
- SetPVarInt(playerid, "pkrStatus", 1);
- }
- if(PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrActive] == 1 && GetPVarInt(playerid, "pkrRoomLeader")) {
- PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrActive] = 2;
- SelectTextDraw(playerid, COLOR_YELLOW);
- }
- } else {
- return LeavePokerTable(playerid);
- }
- }
- if(dialogid == DIALOG_CGAMESCALLPOKER)
- {
- if(response) {
- new tableid = GetPVarInt(playerid, "pkrTableID")-1;
- new actualBet = PokerTable[tableid][pkrActiveBet]-GetPVarInt(playerid, "pkrCurrentBet");
- if(actualBet > GetPVarInt(playerid, "pkrChips")) {
- PokerTable[tableid][pkrPot] += GetPVarInt(playerid, "pkrChips");
- SetPVarInt(playerid, "pkrChips", 0);
- SetPVarInt(playerid, "pkrCurrentBet", PokerTable[tableid][pkrActiveBet]);
- } else {
- PokerTable[tableid][pkrPot] += actualBet;
- SetPVarInt(playerid, "pkrChips", GetPVarInt(playerid, "pkrChips")-actualBet);
- SetPVarInt(playerid, "pkrCurrentBet", PokerTable[tableid][pkrActiveBet]);
- }
- SetPVarString(playerid, "pkrStatusString", "Call");
- PokerRotateActivePlayer(tableid);
- ApplyAnimation(playerid, "CASINO", "cards_raise", 4.1, 0, 1, 1, 1, 1, 1);
- }
- DeletePVar(playerid, "pkrActionChoice");
- }
- if(dialogid == DIALOG_CGAMESRAISEPOKER)
- {
- if(response) {
- new tableid = GetPVarInt(playerid, "pkrTableID")-1;
- new actualRaise = strval(inputtext)-GetPVarInt(playerid, "pkrCurrentBet");
- if(strval(inputtext) >= PokerTable[tableid][pkrActiveBet]+PokerTable[tableid][pkrBlind]/2 && strval(inputtext) <= GetPVarInt(playerid, "pkrCurrentBet")+GetPVarInt(playerid, "pkrChips")) {
- PokerTable[tableid][pkrPot] += actualRaise;
- PokerTable[tableid][pkrActiveBet] = strval(inputtext);
- SetPVarInt(playerid, "pkrChips", GetPVarInt(playerid, "pkrChips")-actualRaise);
- SetPVarInt(playerid, "pkrCurrentBet", PokerTable[tableid][pkrActiveBet]);
- SetPVarString(playerid, "pkrStatusString", "Raise");
- PokerTable[tableid][pkrRotations] = 0;
- PokerRotateActivePlayer(tableid);
- ApplyAnimation(playerid, "CASINO", "cards_raise", 4.1, 0, 1, 1, 1, 1, 1);
- } else {
- ShowCasinoGamesMenu(playerid, DIALOG_CGAMESRAISEPOKER);
- }
- }
- DeletePVar(playerid, "pkrActionChoice");
- }
- if(dialogid == DIALOG_CHARGEPLAYER)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCredits] < GetPVarInt(playerid, "FineAmount"))
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to be fined.");
- new reason[60];
- GetPVarString(playerid, "FineReason", reason, 60);
- format(string, sizeof(string), "AdmCmd: %s(%d) was fined %s credits by %s, reason: %s", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), number_format(GetPVarInt(playerid, "FineAmount")), GetPlayerNameEx(GetPVarInt(playerid, "FineBy")), reason);
- Log("logs/admin.log", string);
- format(string, sizeof(string), "[CHARGEPLAYER] [User: %s(%i)] [IP: %s] [Credits: %s] [Charged: %s]", GetPlayerNameEx(playerid), PlayerInfo[playerid][pId], GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(GetPVarInt(playerid, "FineAmount")));
- Log("logs/credits.log", string);
- GivePlayerCredits(playerid, -GetPVarInt(playerid, "FineAmount"), 1);
- format(string, sizeof(string), "You were charged %s credits for %s by %s.", number_format(GetPVarInt(playerid, "FineAmount")), reason, GetPlayerNameEx(GetPVarInt(playerid, "FineBy")));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- format(string, sizeof(string), "You charged %s %s credits for %s.", GetPlayerNameEx(playerid), number_format(GetPVarInt(playerid, "FineAmount")), reason);
- SendClientMessageEx(GetPVarInt(playerid, "FineBy"), COLOR_CYAN, string);
- }
- else
- {
- SendClientMessageEx(GetPVarInt(playerid, "FineBy"), COLOR_CYAN, "The player has declined the charge.");
- }
- DeletePVar(playerid, "FineAmount");
- DeletePVar(playerid, "FineBy");
- DeletePVar(playerid, "FineReason");
- }
- if(dialogid == DIALOG_EDITSHOPMENU)
- {
- if(response)
- {
- if(listitem == 0)
- {
- new shopstring[4500];
- format(shopstring, sizeof(shopstring),
- "Gold VIP (Credits: %s)\n\
- Gold VIP Renewal (Credits: %s)\n\
- Silver VIP (Credits: %s)\n\
- Bronze VIP (Credits: %s)\n\
- Toys (Credits: %s)\n\
- Vehicles (Credits: %s)\n\
- Poker Table (Credits: %s)\n\
- Boombox (Credits: %s)", number_format(ShopItems[0][sItemPrice]), number_format(ShopItems[1][sItemPrice]), number_format(ShopItems[2][sItemPrice]), number_format(ShopItems[3][sItemPrice]), number_format(ShopItems[4][sItemPrice]),
- number_format(ShopItems[5][sItemPrice]), number_format(ShopItems[6][sItemPrice]), number_format(ShopItems[7][sItemPrice]));
- format(shopstring, sizeof(shopstring), "%s\n\
- Paintball Tokens (Credits %s)\n\
- EXP Token (Credits: %s)\n\
- Fireworks x5 (Credits: %s)\n\
- Renewal Regular (Credits: %s)\n\
- Renewal Standard (Credits: %s)\n\
- Renewal Premium (Credits: %s)\n\
- House (Credits: %s)\n\
- House Interior Change (Credits: %s)\n\
- House Move (Credits: %s)\n\
- (Micro) Reset Gift Timer (Credits: %s)",shopstring, number_format(ShopItems[8][sItemPrice]), number_format(ShopItems[9][sItemPrice]), number_format(ShopItems[10][sItemPrice]),
- number_format(ShopItems[11][sItemPrice]), number_format(ShopItems[12][sItemPrice]), number_format(ShopItems[13][sItemPrice]), number_format(ShopItems[14][sItemPrice]),
- number_format(ShopItems[15][sItemPrice]), number_format(ShopItems[16][sItemPrice]), number_format(ShopItems[17][sItemPrice]));
- format(shopstring, sizeof(shopstring),
- "%s\n(Micro) Advanced Healthcare (Credits: %s)\n\
- (Micro) Super Advanced Healthcare (Credits: %s)\n\
- (Micro) Rent a Car (Credits: %s)\n\
- Platinum VIP (Credits: %s)\n\
- Custom License Plate (Credits: %s)\n\
- Additional Vehicle Slot (Credits: %s)", shopstring, number_format(ShopItems[18][sItemPrice]), number_format(ShopItems[19][sItemPrice]), number_format(ShopItems[20][sItemPrice]),
- number_format(ShopItems[21][sItemPrice]), number_format(ShopItems[22][sItemPrice]), number_format(ShopItems[23][sItemPrice]));
- format(shopstring, sizeof(shopstring),
- "%s\nGarage - Small (Credits: %s)\n\
- Garage - Medium (Credits: %s)\n\
- Garage - Large (Credits: %s)\n\
- Garage - Extra Large (Credits: %s)\n\
- Additional Toy Slot (Credits: %s)\n\
- Hunger Voucher (Credits: %s)\n\
- Spawn at Gold VIP+ room (Credits: %s)", shopstring, number_format(ShopItems[24][sItemPrice]), number_format(ShopItems[25][sItemPrice]), number_format(ShopItems[26][sItemPrice]),
- number_format(ShopItems[27][sItemPrice]), number_format(ShopItems[28][sItemPrice]), number_format(ShopItems[29][sItemPrice]), number_format(ShopItems[30][sItemPrice]));
- format(shopstring, sizeof(shopstring),
- "%s\n\
- Restricted Last Name (NEW) (Credits: %s)\n\
- Restricted Last Name (CHANGE) (Credits: %s)\n\
- Custom User Title (NEW) (Credits: %s)\n\
- Custom User Title (CHANGE) (Credits: %s)\n\
- Teamspeak User Channel (Credits: %s)\n\
- Small Backpack (Credits: %s)\n\
- Medium Backpack (Credits: %s)\n\
- Large Backpack (Credits: %s)\n\
- Deluxe Car Alarm (Credits: %s)\n\
- Name Changes (Credits: %s)\n\
- Furniture Pack - Bronze (Credits: %s)\n\
- Furniture Pack - Silver (Credits: %s)\n\
- Furniture Pack - Gold (Credits: %s)",
- shopstring, number_format(ShopItems[31][sItemPrice]), number_format(ShopItems[32][sItemPrice]), number_format(ShopItems[33][sItemPrice]), number_format(ShopItems[34][sItemPrice]),
- number_format(ShopItems[35][sItemPrice]),number_format(ShopItems[36][sItemPrice]),number_format(ShopItems[37][sItemPrice]),number_format(ShopItems[38][sItemPrice]),number_format(ShopItems[39][sItemPrice]), number_format(ShopItems[40][sItemPrice]),
- number_format(ShopItems[41][sItemPrice]), number_format(ShopItems[42][sItemPrice]), number_format(ShopItems[43][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOP, DIALOG_STYLE_LIST, "Edit Shop Prices", shopstring, "Edit", "Exit");
- }
- if(listitem == 1)
- {
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS, DIALOG_STYLE_LIST, "Edit Business Shop", "Add Business\nEdit Business\nView Businesses Sold", "Select", "Exit");
- }
- if(listitem == 2)
- {
- for(new i; i < MAX_MICROITEMS; i++)
- {
- format(szMiscArray, sizeof(szMiscArray), "%s\n%s (Credits: %s)", szMiscArray, mItemName[i], number_format(MicroItems[i]));
- }
- ShowPlayerDialogEx(playerid, DIALOG_EDITMICROSHOP, DIALOG_STYLE_LIST, "Edit Micro Shop Prices", szMiscArray, "Edit", "Exit");
- }
- }
- }
- if(dialogid == DIALOG_EDITSHOP)
- {
- if(response) {
- new item[30];
- SetPVarInt(playerid, "EditingPrice", listitem);
- switch(listitem)
- {
- case 0: item = "Gold VIP";
- case 1: item = "Gold VIP Renewal";
- case 2: item = "Silver VIP";
- case 3: item = "Bronze VIP";
- case 4: item = "Toys";
- case 5: item = "Vehicles";
- case 6: item = "Poker Table";
- case 7: item = "Boombox";
- case 8: item = "Paintball Tokens";
- case 9: item = "EXP Token";
- case 10: item = "Fireworks x5";
- case 11: item = "Renewal Regular";
- case 12: item = "Renewal Standard";
- case 13: item = "Renewal Premium";
- case 14: item = "House";
- case 15: item = "House Interior Change";
- case 16: item = "House Move";
- case 17: item = "(Micro) Reset Gift Timer";
- case 18: item = "(Micro) Advanced Health Care";
- case 19: item = "(Micro) Super Health Care";
- case 20: item = "(Micro) Rent a Car";
- case 21: item = "Platinum VIP";
- case 22: item = "License Plate";
- case 23: item = "Additional Vehicle Slot";
- case 24: item = "Garage - Small";
- case 25: item = "Garage - Medium";
- case 26: item = "Garage - Large";
- case 27: item = "Garage - Extra Large";
- case 28: item = "Additional Toy Slot";
- case 29: item = "Hunger Voucher";
- case 30: item = "Spawn at Gold VIP+ room";
- case 31: item = "Restricted Last Name (NEW)";
- case 32: item = "Restricted Last Name (CHANGE)";
- case 33: item = "Custom User Title (NEW)";
- case 34: item = "Custom User Title (CHANGE)";
- case 35: item = "Teamspeak User Channel";
- case 36: item = "Small Backpack";
- case 37: item = "Medium Backpack";
- case 38: item = "Large Backpack";
- case 39: item = "Deluxe Car Alarm";
- case 40: item = "Name Changes";
- case 41: item = "Furniture Slots Pack - Bronze";
- case 42: item = "Furniture Slots Pack - Silver";
- case 43: item = "Furniture Slots Pack - Gold";
- }
- format(string, sizeof(string), "You are currently editing the price of %s. The current credit cost is %d.", item, ShopItems[listitem][sItemPrice]);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOP2, DIALOG_STYLE_INPUT, "Editing Price", string, "Change", "Back");
- }
- }
- if(dialogid == DIALOG_EDITSHOP2)
- {
- if(response) {
- new
- Prices = strval(inputtext),
- item[30];
- switch(GetPVarInt(playerid, "EditingPrice"))
- {
- case 0: item = "Gold VIP";
- case 1: item = "Gold VIP Renewal";
- case 2: item = "Silver VIP";
- case 3: item = "Bronze VIP";
- case 4: item = "Toys";
- case 5: item = "Vehicles";
- case 6: item = "Poker Table";
- case 7: item = "Boombox";
- case 8: item = "Paintball Tokens";
- case 9: item = "EXP Token";
- case 10: item = "Fireworks x5";
- case 11: item = "Renewal Regular";
- case 12: item = "Renewal Standard";
- case 13: item = "Renewal Premium";
- case 14: item = "House";
- case 15: item = "House Interior Change";
- case 16: item = "House Move";
- case 17: item = "(Micro) Reset Gift Timer";
- case 18: item = "(Micro) Advanced Health Care";
- case 19: item = "(Micro) Super Health Care";
- case 20: item = "(Micro) Rent a Car";
- case 21: item = "Platinum VIP";
- case 22: item = "License Plate";
- case 23: item = "Additional Vehicle Slot";
- case 24: item = "Garage - Small";
- case 25: item = "Garage - Medium";
- case 26: item = "Garage - Large";
- case 27: item = "Garage - Extra Large";
- case 28: item = "Additional Toy Slot";
- case 29: item = "Hunger Voucher";
- case 30: item = "Spawn at Gold VIP+ room";
- case 31: item = "Restricted Last Name (NEW)";
- case 32: item = "Restricted Last Name (CHANGE)";
- case 33: item = "Custom User Title (NEW)";
- case 34: item = "Custom User Title (CHANGE)";
- case 35: item = "Teamspeak User Channel";
- case 36: item = "Small Backpack";
- case 37: item = "Medium Backpack";
- case 38: item = "Large Backpack";
- case 39: item = "Deluxe Car Alarm";
- case 40: item = "Name Changes";
- case 41: item = "Furniture Slots Pack - Bronze";
- case 42: item = "Furniture Slots Pack - Silver";
- case 43: item = "Furniture Slots Pack - Gold";
- }
- if(isnull(inputtext) || Prices <= 0) {
- format(string, sizeof(string), "The price can't be below 0.\n\nYou are currently editing the price of %s. The current credit cost is %d.", item, ShopItems[GetPVarInt(playerid, "EditingPrice")][sItemPrice]);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOP2, DIALOG_STYLE_INPUT, "Editing Price", string, "Change", "Back");
- }
- else
- {
- SetPVarInt(playerid, "EditingPriceValue", Prices);
- format(string,sizeof(string),"Are you sure you want to edit the cost of %s?\n\nOld Cost: %d\nNew Cost: %d", item, ShopItems[GetPVarInt(playerid, "EditingPrice")][sItemPrice], Prices);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOP3, DIALOG_STYLE_MSGBOX, "Confirmation", string, "Confirm", "Cancel");
- return 1;
- }
- }
- format(szMiscArray, sizeof(szMiscArray),
- "Gold VIP (Credits: %s)\n\
- Gold VIP Renewal (Credits: %s)\n\
- Silver VIP (Credits: %s)\n\
- Bronze VIP (Credits: %s)\n\
- Toys (Credits: %s)\n\
- Vehicles (Credits: %s)\n\
- Poker Table (Credits: %s)\n\
- Boombox (Credits: %s)", number_format(ShopItems[0][sItemPrice]), number_format(ShopItems[1][sItemPrice]), number_format(ShopItems[2][sItemPrice]), number_format(ShopItems[3][sItemPrice]), number_format(ShopItems[4][sItemPrice]),
- number_format(ShopItems[5][sItemPrice]), number_format(ShopItems[6][sItemPrice]), number_format(ShopItems[7][sItemPrice]));
- format(szMiscArray, sizeof(szMiscArray), "%s\n\
- Paintball Tokens (Credits %s)\n\
- EXP Token (Credits: %s)\n\
- Fireworks x5 (Credits: %s)\n\
- Renewal Regular (Credits: %s)\n\
- Renewal Standard (Credits: %s)\n\
- Renewal Premium (Credits: %s)\n\
- House (Credits: %s)\n\
- House Interior Change (Credits: %s)\n\
- House Move (Credits: %s)\n\
- (Micro) Reset Gift Timer (Credits: %s)", szMiscArray, number_format(ShopItems[8][sItemPrice]), number_format(ShopItems[9][sItemPrice]), number_format(ShopItems[10][sItemPrice]),
- number_format(ShopItems[11][sItemPrice]), number_format(ShopItems[12][sItemPrice]), number_format(ShopItems[13][sItemPrice]), number_format(ShopItems[14][sItemPrice]), number_format(ShopItems[15][sItemPrice]),
- number_format(ShopItems[16][sItemPrice]), number_format(ShopItems[17][sItemPrice]));
- format(szMiscArray, sizeof(szMiscArray),
- "%s\n(Micro) Advanced Healthcare (Credits: %s)\n\
- (Micro) Super Advanced Healthcare (Credits: %s)\n\
- (Micro) Rent a Car (Credits: %s)\n\
- Platinum VIP (Credits: %s)\n\
- Custom License Plate (Credits: %s)\n\
- Additional Vehicle Slot (Credits: %s)", szMiscArray, number_format(ShopItems[18][sItemPrice]), number_format(ShopItems[19][sItemPrice]), number_format(ShopItems[20][sItemPrice]), number_format(ShopItems[21][sItemPrice]),
- number_format(ShopItems[22][sItemPrice]), number_format(ShopItems[23][sItemPrice]));
- format(szMiscArray, sizeof(szMiscArray),
- "%s\nGarage - Small (Credits: %s)\n\
- Garage - Medium (Credits: %s)\n\
- Garage - Large (Credits: %s)\n\
- Garage - Extra Large (Credits: %s)\n\
- Additional Toy Slot (Credits: %s)\n\
- Hunger Voucher (Credits: %s)\n\
- Spawn at Gold VIP+ room (Credits: %s)", szMiscArray, number_format(ShopItems[24][sItemPrice]), number_format(ShopItems[25][sItemPrice]), number_format(ShopItems[26][sItemPrice]),
- number_format(ShopItems[27][sItemPrice]), number_format(ShopItems[28][sItemPrice]), number_format(ShopItems[29][sItemPrice]), number_format(ShopItems[30][sItemPrice]));
- format(szMiscArray, sizeof(szMiscArray),
- "%s\n\
- Restricted Last Name (NEW) (Credits: %s)\n\
- Restricted Last Name (CHANGE) (Credits: %s)\n\
- Custom User Title (NEW) (Credits: %s)\n\
- Custom User Title (CHANGE) (Credits: %s)\n\
- Teamspeak User Channel (Credits: %s)\n\
- Small Backpack (Credits: %s)\n\
- Medium Backpack (Credits: %s)\n\
- Large Backpack (Credits: %s)\n\
- Deluxe Car Alarm (Credits: %s)\n\
- Name Changes (Credits: %s)\n\
- Furniture Pack - Bronze (Credits: %s)\n\
- Furniture Pack - Silver (Credits: %s)\n\
- Furniture Pack - Gold (Credits: %s)",
- szMiscArray, number_format(ShopItems[31][sItemPrice]), number_format(ShopItems[32][sItemPrice]), number_format(ShopItems[33][sItemPrice]), number_format(ShopItems[34][sItemPrice]),
- number_format(ShopItems[35][sItemPrice]),number_format(ShopItems[36][sItemPrice]),number_format(ShopItems[37][sItemPrice]),number_format(ShopItems[38][sItemPrice]),number_format(ShopItems[39][sItemPrice]), number_format(ShopItems[40][sItemPrice]),
- number_format(ShopItems[41][sItemPrice]), number_format(ShopItems[42][sItemPrice]), number_format(ShopItems[43][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOP, DIALOG_STYLE_LIST, "Edit Shop Prices", szMiscArray, "Edit", "Exit");
- }
- if(dialogid == DIALOG_EDITSHOP3)
- {
- if(response)
- {
- new item[30];
- switch(GetPVarInt(playerid, "EditingPrice"))
- {
- case 0: item = "Gold VIP";
- case 1: item = "Gold VIP Renewal";
- case 2: item = "Silver VIP";
- case 3: item = "Bronze VIP";
- case 4: item = "Toys";
- case 5: item = "Vehicles";
- case 6: item = "Poker Table";
- case 7: item = "Boombox";
- case 8: item = "Paintball Tokens";
- case 9: item = "EXP Token";
- case 10: item = "Fireworks x5";
- case 11: item = "Renewal Regular";
- case 12: item = "Renewal Standard";
- case 13: item = "Renewal Premium";
- case 14: item = "House";
- case 15: item = "House Interior Change";
- case 16: item = "House Move";
- case 17: item = "(Micro) Reset Gift Timer";
- case 18: item = "(Micro) Advanced Health Care";
- case 19: item = "(Micro) Super Health Care";
- case 20: item = "(Micro) Rent a Car";
- case 21: item = "Platinum VIP";
- case 22: item = "License Plate";
- case 23: item = "Additional Vehicle Slot";
- case 24: item = "Garage - Small";
- case 25: item = "Garage - Medium";
- case 26: item = "Garage - Large";
- case 27: item = "Garage - Extra Large";
- case 28: item = "Additional Toy Slot";
- case 29: item = "Hunger Voucher";
- case 30: item = "Spawn at Gold VIP+ room";
- case 31: item = "Restricted Last Name (NEW)";
- case 32: item = "Restricted Last Name (CHANGE)";
- case 33: item = "Custom User Title (NEW)";
- case 34: item = "Custom User Title (CHANGE)";
- case 35: item = "Teamspeak User Channel";
- case 36: item = "Small Backpack";
- case 37: item = "Medium Backpack";
- case 38: item = "Large Backpack";
- case 39: item = "Deluxe Car Alarm";
- case 40: item = "Name Changes";
- case 41: item = "Furniture Slots Pack - Bronze";
- case 42: item = "Furniture Slots Pack - Silver";
- case 43: item = "Furniture Slots Pack - Gold";
- }
- if(GetPVarInt(playerid, "EditingPriceValue") == 0)
- SetPVarInt(playerid, "EditingPriceValue", 999999);
- Price[GetPVarInt(playerid, "EditingPrice")] = GetPVarInt(playerid, "EditingPriceValue");
- ShopItems[GetPVarInt(playerid, "EditingPrice")][sItemPrice] = GetPVarInt(playerid, "EditingPriceValue");
- format(string, sizeof(string), "You have successfully edited the price of %s to %d.", item, GetPVarInt(playerid, "EditingPriceValue"));
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "[EDITSHOPPRICES] [User: %s(%i)] [IP: %s] [%s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), item, number_format(ShopItems[GetPVarInt(playerid, "EditingPrice")][sItemPrice]));
- Log("logs/editshop.log", string), print(string);
- g_mysql_SavePrices();
- return 1;
- }
- DeletePVar(playerid, "EditingPrice");
- DeletePVar(playerid, "EditingPriceValue");
- SendClientMessageEx(playerid, COLOR_GREY, "You have canceled the price change.");
- }
- if(dialogid == DIALOG_ENTERPIN)
- {
- if(response)
- {
- if(isnull(inputtext) || strlen(inputtext) > 4 || !IsNumeric(inputtext))
- {
- ShowPlayerDialogEx(playerid, DIALOG_ENTERPIN, DIALOG_STYLE_INPUT, "Pin Number", "Enter your pin number to access credit shops.", "Confirm", "Exit");
- return 1;
- }
- SetPVarString(playerid, "PinNumber", inputtext);
- mysql_format(MainPipeline, string, sizeof(string), "SELECT `Pin` FROM `accounts` WHERE `Username` = '%e'", GetPlayerNameExt(playerid));
- mysql_tquery(MainPipeline, string, "OnPinCheck2", "i", playerid);
- }
- }
- if(dialogid == DIALOG_CREATEPIN)
- {
- if(response)
- {
- if(strlen(inputtext) > 4 || !IsNumeric(inputtext))
- return ShowPlayerDialogEx(playerid, DIALOG_CREATEPIN, DIALOG_STYLE_INPUT, "Pin Number", "Error: A pin must be numbers only, and have at least 4 digits. \nCreate a pin number so you can secure your account credits.", "Create", "Exit");
- if(GetPVarType(playerid, "ChangePin"))
- {
- if(isnull(inputtext))
- return ShowPlayerDialogEx(playerid, DIALOG_CREATEPIN, DIALOG_STYLE_INPUT, "Change Pin Number", "Enter a new pin number to change your current one.", "Change", "Cancel");
- }
- else
- {
- if(isnull(inputtext))
- return ShowPlayerDialogEx(playerid, DIALOG_CREATEPIN, DIALOG_STYLE_INPUT, "Pin Number", "Create a pin number so you can secure your account credits.", "Create", "Exit");
- }
- SetPVarString(playerid, "PinConfirm", inputtext);
- ShowPlayerDialogEx(playerid, DIALOG_CREATEPIN2, DIALOG_STYLE_INPUT, "Pin Number", "Enter your pin number again to confirm it.", "Create", "Exit");
- }
- else if(GetPVarType(playerid, "ChangePin")) DeletePVar(playerid, "ChangePin");
- }
- if(dialogid == DIALOG_VIEWSALE)
- {
- if(response)
- {
- mysql_format(MainPipeline, string, sizeof(string), "SELECT * FROM `sales` WHERE `id` = '%d'", Selected[playerid][listitem]);
- SetPVarInt(playerid, "checkingsale", Selected[playerid][listitem]);
- mysql_tquery(MainPipeline, string, "CheckSales2", "i", playerid);
- }
- }
- if(dialogid == DIALOG_VIEWSALE2)
- {
- if(response)
- {
- mysql_format(MainPipeline, string, sizeof(string), "SELECT * FROM `sales` WHERE `id` = '%d'", GetPVarInt(playerid, "checkingsale"));
- mysql_tquery(MainPipeline, string, "CheckSales3", "i", playerid);
- }
- }
- if(dialogid == DIALOG_CREATEPIN2)
- {
- if(response)
- {
- if(isnull(inputtext))
- return ShowPlayerDialogEx(playerid, DIALOG_CREATEPIN2, DIALOG_STYLE_INPUT, "Pin Number", "Enter your pin number again to confirm it.", "Create", "Exit");
- new confirm[128];
- GetPVarString(playerid, "PinConfirm", confirm, 128);
- if(strcmp(inputtext, confirm, true) != 0)
- {
- if(GetPVarType(playerid, "ChangePin"))
- {
- ShowPlayerDialogEx(playerid, DIALOG_CREATEPIN, DIALOG_STYLE_INPUT, "Pin Number", "Enter a new pin number to change your current one.", "Change", "Cancel");
- }
- else
- {
- ShowPlayerDialogEx(playerid, DIALOG_CREATEPIN, DIALOG_STYLE_INPUT, "Pin Number", "Error: Pin numbers did not match.\n\nCreate a pin number so you can secure your account credits.", "Create", "Exit");
- }
- DeletePVar(playerid, "PinConfirm");
- }
- else
- {
- format(string, sizeof(string), "Your new pin number is '%s.'", inputtext);
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- new passbuffer[258];
- WP_Hash(passbuffer, sizeof(passbuffer), inputtext);
- new query[256];
- mysql_format(MainPipeline, query, sizeof(query), "UPDATE `accounts` SET `Pin`='%s' WHERE `id` = %d", passbuffer, GetPlayerSQLId(playerid));
- mysql_tquery(MainPipeline, query, "OnQueryFinish", "ii", SENDDATA_THREAD, playerid);
- DeletePVar(playerid, "PinConfirm");
- DeletePVar(playerid, "ChangePin");
- }
- }
- }
- if(dialogid == DIALOG_MISCSHOP && response)
- {
- SetPVarInt(playerid, "MiscShop", listitem+1);
- switch(listitem)
- {
- case 0:
- {
- format(string, sizeof(string), "Item: Poker Table\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[6][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[6][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Misc Shop", string, "Purchase", "Cancel");
- }
- case 1:
- {
- format(string, sizeof(string), "Item: Boombox\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[7][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[7][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Misc Shop", string, "Purchase", "Cancel");
- }
- case 2:
- {
- format(string, sizeof(string), "Item: 100 Paintball Tokens\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]),number_format(ShopItems[8][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[8][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Misc Shop", string, "Purchase", "Cancel");
- }
- case 3:
- {
- format(string, sizeof(string), "Item: EXP Token\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]),number_format(ShopItems[9][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[9][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Misc Shop", string, "Purchase", "Cancel");
- }
- case 4:
- {
- format(string, sizeof(string), "Item: Fireworks x5\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]),number_format(ShopItems[10][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[10][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Misc Shop", string, "Purchase", "Cancel");
- }
- case 5:
- {
- format(string, sizeof(string), "Item: Custom License Plate\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]),number_format(ShopItems[22][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[22][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Misc Shop", string, "Purchase", "Cancel");
- }
- case 6:
- {
- SetPVarInt(playerid, "MiscShop", 10);
- format(string, sizeof(string), "Item: Restricted Last Name (NEW)\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]),number_format(ShopItems[31][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[31][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Misc Shop", string, "Purchase", "Cancel");
- }
- case 7:
- {
- SetPVarInt(playerid, "MiscShop", 11);
- format(string, sizeof(string), "Item: Restricted Last Name (CHANGE)\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]),number_format(ShopItems[32][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[32][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Misc Shop", string, "Purchase", "Cancel");
- }
- case 8:
- {
- SetPVarInt(playerid, "MiscShop", 12);
- format(string, sizeof(string), "Item: Custom User Title (NEW)\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]),number_format(ShopItems[33][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[33][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Misc Shop", string, "Purchase", "Cancel");
- }
- case 9:
- {
- SetPVarInt(playerid, "MiscShop", 13);
- format(string, sizeof(string), "Item: Custom User Title (CHANGE)\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]),number_format(ShopItems[34][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[34][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Misc Shop", string, "Purchase", "Cancel");
- }
- case 10:
- {
- SetPVarInt(playerid, "MiscShop", 14);
- format(string, sizeof(string), "Item: Teamspeak User Channel\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]),number_format(ShopItems[35][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[35][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Misc Shop", string, "Purchase", "Cancel");
- }
- case 11:
- {
- new bdialog[145];
- format(bdialog, sizeof(bdialog), "Small Backpack (Credits: {FFD700}%s{A9C4E4})\nMedium Backpack (Credits: {FFD700}%s{A9C4E4})\nLarge Backpack (Credits: {FFD700}%s{A9C4E4})",
- number_format(ShopItems[36][sItemPrice]), number_format(ShopItems[37][sItemPrice]), number_format(ShopItems[38][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_BACKPACKS, DIALOG_STYLE_LIST, "Misc Shop", bdialog, "Select", "Cancel");
- }
- case 12:
- {
- SetPVarInt(playerid, "MiscShop", 18);
- format(string, sizeof(string), "Item: Deluxe Car Alarm\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]),number_format(ShopItems[39][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[39][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Misc Shop", string, "Purchase", "Cancel");
- }
- }
- }
- if(dialogid == DIALOG_BACKPACKS && response)
- {
- new bdialog[170];
- switch(listitem)
- {
- case 0:
- {
- SetPVarInt(playerid, "MiscShop", 15); // small backpack
- format(bdialog, sizeof(bdialog), "Item: Small Backpack\nFood Storage: 1 Meal\nNarcotics Storage: 30 Grams\nFirearms Storage: 1 Weapon\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]),number_format(ShopItems[36][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[36][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Misc Shop", bdialog, "Purchase", "Cancel");
- }
- case 1:
- {
- SetPVarInt(playerid, "MiscShop", 16); // med backpack
- format(bdialog, sizeof(bdialog), "Item: Medium Backpack\nFood Storage: 3 Meals\nNarcotics Storage: 50 Grams\nFirearms Storage: 2 Weapons\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]),number_format(ShopItems[37][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[37][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Misc Shop", bdialog, "Purchase", "Cancel");
- }
- case 2:
- {
- SetPVarInt(playerid, "MiscShop", 17); // large backpack
- format(bdialog, sizeof(bdialog), "Item: Large Backpack\nFood Storage: 5 Meals\nNarcotics Storage: 80 Grams\nFirearms Storage: 4 Weapons\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]),number_format(ShopItems[38][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[38][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Misc Shop", bdialog, "Purchase", "Cancel");
- }
- }
- }
- if(dialogid == DIALOG_MISCSHOP2 && response)
- {
- if(GetPVarInt(playerid, "MiscShop") == 1)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[6][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- else if(PlayerInfo[playerid][pTable] == 1)
- return SendClientMessageEx(playerid, COLOR_GREY, "You already own a poker table.");
- else
- {
- AmountSold[6]++;
- AmountMade[6] += ShopItems[6][sItemPrice];
- //ShopItems[6][sSold]++;
- //ShopItems[6][sMade] += ShopItems[6][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold6` = '%d', `AmountMade6` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[6], AmountMade[6]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- GivePlayerCredits(playerid, -ShopItems[6][sItemPrice], 1);
- printf("Price6: %d", 250);
- PlayerInfo[playerid][pTable] = 1;
- format(string, sizeof(string), "[SHOPMISC] [User: %s(%i)] [IP: %s] [Credits: %s] [Pokertable] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[6][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- format(string, sizeof(string), "You have purchased a pokertable for %s credits.", number_format(ShopItems[6][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- DeletePVar(playerid, "MiscShop");
- }
- }
- else if(GetPVarInt(playerid, "MiscShop") == 2)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[7][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- else if(PlayerInfo[playerid][pBoombox] == 1)
- return SendClientMessageEx(playerid, COLOR_GREY, "You already own a boombox.");
- else
- {
- AmountSold[7]++;
- AmountMade[7] += ShopItems[7][sItemPrice];
- //ShopItems[7][sSold]++;
- //ShopItems[7][sMade] += ShopItems[7][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold7` = '%d', `AmountMade7` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[7], AmountMade[7]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- GivePlayerCredits(playerid, -ShopItems[7][sItemPrice], 1);
- printf("Price7: %d", ShopItems[7][sItemPrice]);
- PlayerInfo[playerid][pBoombox] = 1;
- format(string, sizeof(string), "[SHOPMISC] [User: %s(%i)] [IP: %s] [Credits: %s] [Boombox] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[7][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- format(string, sizeof(string), "You have purchased a boombox for %s credits.", number_format(ShopItems[7][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- DeletePVar(playerid, "MiscShop");
- }
- }
- else if(GetPVarInt(playerid, "MiscShop") == 3)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[8][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- AmountSold[8]++;
- AmountMade[8] += ShopItems[8][sItemPrice];
- //ShopItems[8][sSold]++;
- //ShopItems[8][sMade] += ShopItems[8][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold8` = '%d', `AmountMade8` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[8], AmountMade[8]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- GivePlayerCredits(playerid, -ShopItems[8][sItemPrice], 1);
- printf("Price8: %d", ShopItems[8][sItemPrice]);
- PlayerInfo[playerid][pPaintTokens] += 100;
- format(string, sizeof(string), "[SHOPMISC] [User: %s(%i)] [IP: %s] [Credits: %s] [100 Paintball Tokens] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[8][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- format(string, sizeof(string), "You have purchased 100 paintball tokens for %s credits.", number_format(ShopItems[8][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- DeletePVar(playerid, "MiscShop");
- }
- else if(GetPVarInt(playerid, "MiscShop") == 4)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[9][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- AmountSold[9]++;
- AmountMade[9] += ShopItems[9][sItemPrice];
- //ShopItems[9][sSold]++;
- //ShopItems[9][sMade] += ShopItems[9][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold9` = '%d', `AmountMade9` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[9], AmountMade[9]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- GivePlayerCredits(playerid, -ShopItems[9][sItemPrice], 1);
- printf("Price9: %d", ShopItems[9][sItemPrice]);
- PlayerInfo[playerid][pEXPToken] += 1;
- format(string, sizeof(string), "[SHOPMISC] [User: %s(%i)] [IP: %s] [Credits: %s] [EXP Token] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[9][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- format(string, sizeof(string), "You have purchased a EXP Token for %s credits.", number_format(ShopItems[9][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- DeletePVar(playerid, "MiscShop");
- }
- else if(GetPVarInt(playerid, "MiscShop") == 5)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[10][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- AmountSold[10]++;
- AmountMade[10] += ShopItems[10][sItemPrice];
- //ShopItems[10][sSold]++;
- //ShopItems[10][sMade] += ShopItems[10][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold10` = '%d', `AmountMade10` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[10], AmountMade[10]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- GivePlayerCredits(playerid, -ShopItems[10][sItemPrice], 1);
- printf("Price10: %d", ShopItems[10][sItemPrice]);
- PlayerInfo[playerid][pFirework] += 5;
- format(string, sizeof(string), "[SHOPMISC] [User: %s(%i)] [IP: %s] [Credits: %s] [Firework X5] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[10][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- format(string, sizeof(string), "You have purchased 5 fireworks for %s credits.", number_format(ShopItems[10][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- DeletePVar(playerid, "MiscShop");
- }
- else if(GetPVarInt(playerid, "MiscShop") == 6)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[22][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[22][sItemPrice], 1);
- printf("Price22: %d", ShopItems[22][sItemPrice]);
- AmountSold[22]++;
- AmountMade[22] += ShopItems[22][sItemPrice];
- //ShopItems[22][sSold]++;
- //ShopItems[22][sMade] += ShopItems[22][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold22` = '%d', `AmountMade22` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[22], AmountMade[22]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- AddFlag(playerid, INVALID_PLAYER_ID, "Purchased Custom License Plate (Credits)");
- SendReportToQue(playerid, "Custom License Plate (Credits)", 2, 2);
- format(string, sizeof(string), "You have purchased a custom license plate for %s credits.", number_format(ShopItems[22][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_CYAN, "Contact a senior admin to have the custom license plate issued.");
- format(string, sizeof(string), "[Custom License Plate] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[22][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- else if(GetPVarInt(playerid, "MiscShop") == 7) // Vehicle Slots
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[23][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[23][sItemPrice], 1);
- printf("Price23: %d", ShopItems[23][sItemPrice]);
- AmountSold[23]++;
- AmountMade[23] += ShopItems[23][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold23` = '%d', `AmountMade23` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[23], AmountMade[23]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- format(string, sizeof(string), "You have purchased a additional vehicle slot for %s credits.", number_format(ShopItems[23][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- PlayerInfo[playerid][pVehicleSlot] += 1;
- LoadPlayerDisabledVehicles(playerid);
- format(string, sizeof(string), "[Additional Vehicle Slot] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[23][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- else if(GetPVarInt(playerid, "MiscShop") == 8) // Toy Slots
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[28][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[28][sItemPrice], 1);
- printf("Price28: %d", ShopItems[28][sItemPrice]);
- AmountSold[28]++;
- AmountMade[28] += ShopItems[28][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold28` = '%d', `AmountMade28` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[28], AmountMade[28]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- format(string, sizeof(string), "You have purchased a additional toy slot for %s credits.", number_format(ShopItems[28][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- PlayerInfo[playerid][pToySlot] += 1;
- LoadPlayerDisabledVehicles(playerid);
- format(string, sizeof(string), "[Additional Toy Slot] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[28][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- else if(GetPVarInt(playerid, "MiscShop") == 9) // Spawn at Gold VIP+ room
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[30][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[30][sItemPrice], 1);
- printf("Price30: %d", ShopItems[30][sItemPrice]);
- AmountSold[30]++;
- AmountMade[30] += ShopItems[30][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold30` = '%d', `AmountMade30` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[30], AmountMade[30]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- format(string, sizeof(string), "You have purchased a spawn at the Gold VIP+ room, you will be able to use it after your next death.", number_format(ShopItems[30][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- PlayerInfo[playerid][pVIPSpawn] = 1;
- OnPlayerStatsUpdate(playerid);
- format(string, sizeof(string), "[Spawn at Gold VIP+ room] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[30][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- else if(GetPVarInt(playerid, "MiscShop") == 10) // Restricted Last Name (NEW)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[31][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[31][sItemPrice], 1);
- printf("Price31: %d", ShopItems[31][sItemPrice]);
- AmountSold[31]++;
- AmountMade[31] += ShopItems[31][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold31` = '%d', `AmountMade31` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[31], AmountMade[31]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- AddFlag(playerid, INVALID_PLAYER_ID, "Purchased Restricted Last Name (NEW) (Credits)");
- format(string, sizeof(string), "You have purchased a Restricted Last Name (NEW) for %s credits.", number_format(ShopItems[31][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_GREY, "Contact a member of Customer Relations to have the Restricted Last Name (NEW) issued.");
- format(string, sizeof(string), "[Restricted Last Name (NEW)] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[31][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- else if(GetPVarInt(playerid, "MiscShop") == 11) // Restricted Last Name (CHANGE)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[32][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[32][sItemPrice], 1);
- printf("Price32: %d", ShopItems[32][sItemPrice]);
- AmountSold[32]++;
- AmountMade[32] += ShopItems[32][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold32` = '%d', `AmountMade32` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[32], AmountMade[32]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- AddFlag(playerid, INVALID_PLAYER_ID, "Purchased Restricted Last Name (CHANGE) (Credits)");
- format(string, sizeof(string), "You have purchased a Restricted Last Name (CHANGE) for %s credits.", number_format(ShopItems[32][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_GREY, "Contact a member of Customer Relations to have the Restricted Last Name (CHANGED) issued.");
- format(string, sizeof(string), "[Restricted Last Name (CHANGE)] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[32][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- else if(GetPVarInt(playerid, "MiscShop") == 12) // Custom User Title (NEW)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[33][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[33][sItemPrice], 1);
- printf("Price33: %d", ShopItems[33][sItemPrice]);
- AmountSold[33]++;
- AmountMade[33] += ShopItems[33][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold33` = '%d', `AmountMade33` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[33], AmountMade[33]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- AddFlag(playerid, INVALID_PLAYER_ID, "Purchased Custom User Title (NEW) (Credits)");
- format(string, sizeof(string), "You have purchased a Custom User Title (NEW) for %s credits.", number_format(ShopItems[33][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_GREY, "Contact a member of Customer Relations to have the Custom User Title (NEW) issued.");
- format(string, sizeof(string), "[Custom User Title (NEW)] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[33][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- else if(GetPVarInt(playerid, "MiscShop") == 13) // Custom User Title (CHANGE)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[34][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[34][sItemPrice], 1);
- printf("Price34: %d", ShopItems[34][sItemPrice]);
- AmountSold[34]++;
- AmountMade[34] += ShopItems[34][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold34` = '%d', `AmountMade34` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[34], AmountMade[34]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- AddFlag(playerid, INVALID_PLAYER_ID, "Purchased Custom User Title (CHANGE) (Credits)");
- format(string, sizeof(string), "You have purchased a Restricted Custom User Title (CHANGE) for %s credits.", number_format(ShopItems[34][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_GREY, "Contact a member of Customer Relations to have the Custom User Title (CHANGE) issued.");
- format(string, sizeof(string), "[Custom User Title (CHANGE)] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[34][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- else if(GetPVarInt(playerid, "MiscShop") == 14) // Teamspeak User Channel
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[35][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[35][sItemPrice], 1);
- printf("Price35: %d", ShopItems[35][sItemPrice]);
- AmountSold[35]++;
- AmountMade[35] += ShopItems[35][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold35` = '%d', `AmountMade35` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[35], AmountMade[35]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- AddFlag(playerid, INVALID_PLAYER_ID, "Purchased Teamspeak User Channel (Credits)");
- format(string, sizeof(string), "You have purchased a Teamspeak User Channel for %s credits.", number_format(ShopItems[35][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_GREY, "Contact a member of Customer Relations to have the Teamspeak User Channel issued.");
- format(string, sizeof(string), "[Teamspeak User Channel] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[35][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- else if(GetPVarInt(playerid, "MiscShop") == 15) // Small Backpack
- {
- if(PlayerInfo[playerid][pBackpack] > 0) return SendClientMessageEx(playerid, COLOR_GREY, "You can only purchase one backpack at a time, use /sellbackpack.");
- if(PlayerInfo[playerid][pCredits] < ShopItems[36][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[36][sItemPrice], 1);
- printf("Price35: %d", ShopItems[36][sItemPrice]);
- AmountSold[36]++;
- AmountMade[36] += ShopItems[36][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold36` = '%d', `AmountMade36` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[36], AmountMade[36]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- if(PlayerHoldingObject[playerid][9] != 0 || IsPlayerAttachedObjectSlotUsed(playerid, 9))
- RemovePlayerAttachedObject(playerid, 9), PlayerHoldingObject[playerid][9] = 0;
- SetPlayerAttachedObject(playerid, 9, 371, 1, -0.002, -0.140999, -0.01, 8.69999, 88.8, -8.79993, 1.11, 0.963);
- PlayerInfo[playerid][pBEquipped] = 1;
- PlayerInfo[playerid][pBStoredV] = INVALID_PLAYER_VEHICLE_ID;
- PlayerInfo[playerid][pBStoredH] = INVALID_HOUSE_ID;
- PlayerInfo[playerid][pBackpack] = 1;
- format(string, sizeof(string), "You have purchased a Small Backpack for %s credits.", number_format(ShopItems[36][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_GREY, "Use /backpackhelp to see the list of commands.");
- format(string, sizeof(string), "[Small Backpack] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[36][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- else if(GetPVarInt(playerid, "MiscShop") == 16) // Medium Backpack
- {
- if(PlayerInfo[playerid][pBackpack] > 0) return SendClientMessageEx(playerid, COLOR_GREY, "You can only purchase one backpack at a time, use /sellbackpack.");
- if(PlayerInfo[playerid][pCredits] < ShopItems[37][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[37][sItemPrice], 1);
- printf("Price35: %d", ShopItems[37][sItemPrice]);
- AmountSold[37]++;
- AmountMade[37] += ShopItems[37][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold37` = '%d', `AmountMade37` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[37], AmountMade[37]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- if(PlayerHoldingObject[playerid][9] != 0 || IsPlayerAttachedObjectSlotUsed(playerid, 9))
- RemovePlayerAttachedObject(playerid, 9), PlayerHoldingObject[playerid][9] = 0;
- SetPlayerAttachedObject(playerid, 9, 371, 1, -0.002, -0.140999, -0.01, 8.69999, 88.8, -8.79993, 1.11, 0.963);
- PlayerInfo[playerid][pBEquipped] = 1;
- PlayerInfo[playerid][pBStoredV] = INVALID_PLAYER_VEHICLE_ID;
- PlayerInfo[playerid][pBStoredH] = INVALID_HOUSE_ID;
- PlayerInfo[playerid][pBackpack] = 2;
- format(string, sizeof(string), "You have purchased a Medium Backpack for %s credits.", number_format(ShopItems[37][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_GREY, "Use /backpackhelp to see the list of commands.");
- format(string, sizeof(string), "[Medium Backpack] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[37][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- else if(GetPVarInt(playerid, "MiscShop") == 17) // Large Backpack
- {
- if(PlayerInfo[playerid][pBackpack] > 0) return SendClientMessageEx(playerid, COLOR_GREY, "You can only purchase one backpack at a time, use /sellbackpack.");
- if(PlayerInfo[playerid][pCredits] < ShopItems[38][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[38][sItemPrice], 1);
- printf("Price35: %d", ShopItems[38][sItemPrice]);
- AmountSold[38]++;
- AmountMade[38] += ShopItems[38][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold38` = '%d', `AmountMade38` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[38], AmountMade[38]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- if(PlayerHoldingObject[playerid][9] != 0 || IsPlayerAttachedObjectSlotUsed(playerid, 9))
- RemovePlayerAttachedObject(playerid, 9), PlayerHoldingObject[playerid][9] = 0;
- SetPlayerAttachedObject(playerid, 9, 3026, 1, -0.254999, -0.109, -0.022999, 10.6, -1.20002, 3.4, 1.265, 1.242, 1.062);
- PlayerInfo[playerid][pBEquipped] = 1;
- PlayerInfo[playerid][pBStoredV] = INVALID_PLAYER_VEHICLE_ID;
- PlayerInfo[playerid][pBStoredH] = INVALID_HOUSE_ID;
- PlayerInfo[playerid][pBackpack] = 3;
- format(string, sizeof(string), "You have purchased a Large Backpack for %s credits.", number_format(ShopItems[38][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_GREY, "Use /backpackhelp to see the list of commands.");
- format(string, sizeof(string), "[Large Backpack] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[38][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- else if(GetPVarInt(playerid, "MiscShop") == 18) // Deluxe Car Alarm
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[39][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- if(GetPlayerVehicleCount(playerid) != 0)
- {
- SetPVarInt(playerid, "lockmenu", 4);
- for(new i=0; i<MAX_PLAYERVEHICLES; i++)
- {
- if(PlayerVehicleInfo[playerid][i][pvId] != INVALID_PLAYER_VEHICLE_ID)
- {
- format(string, sizeof(string), "Vehicle %d | Name: %s.",i+1,GetVehicleName(PlayerVehicleInfo[playerid][i][pvId]));
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- }
- }
- return ShowPlayerDialogEx(playerid, DIALOG_CDLOCKMENU, DIALOG_STYLE_INPUT, "24-7;"," Select a vehicle you wish to install this on:", "Select", "Cancel");
- }
- else return SendClientMessageEx(playerid, COLOR_WHITE, "You don't have any cars - where we can install this item?");
- }
- else if(GetPVarInt(playerid, "MiscShop") == 19) // Furniture Bronze
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[41][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- if(PlayerInfo[playerid][pFurnitureSlots] >= MAX_FURNITURE_SLOTS) return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot buy anymore furniture slots.");
- PlayerInfo[playerid][pFurnitureSlots] += 25;
- if(PlayerInfo[playerid][pFurnitureSlots] > MAX_FURNITURE_SLOTS) {
- PlayerInfo[playerid][pFurnitureSlots] = MAX_FURNITURE_SLOTS;
- SendClientMessageEx(playerid, COLOR_GRAD1, "Your furniture slots have been maximized.");
- }
- format(szMiscArray, sizeof(szMiscArray), "You have purchased a Furniture Pack - Bronze for %s credits.", number_format(ShopItems[41][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, szMiscArray);
- SendClientMessageEx(playerid, COLOR_GREY, "Use /furniturehelp to see the list of commands.");
- format(szMiscArray, sizeof(szMiscArray), "[Furniture Pack - Bronze] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[41][sItemPrice]));
- Log("logs/credits.log", szMiscArray), print(szMiscArray);
- GivePlayerCredits(playerid, -ShopItems[41][sItemPrice], 1);
- printf("Price43: %d", ShopItems[41][sItemPrice]);
- AmountSold[41]++;
- AmountMade[41] += ShopItems[41][sItemPrice];
- mysql_format(MainPipeline, szMiscArray, sizeof(szMiscArray), "UPDATE `sales` SET `TotalSold41` = '%d', `AmountMade41` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[41], AmountMade[41]);
- mysql_tquery(MainPipeline, szMiscArray, "OnQueryFinish", "i", SENDDATA_THREAD);
- }
- else if(GetPVarInt(playerid, "MiscShop") == 20) // Furniture Bronze
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[42][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- if(PlayerInfo[playerid][pFurnitureSlots] >= MAX_FURNITURE_SLOTS) return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot buy anymore furniture slots.");
- PlayerInfo[playerid][pFurnitureSlots] += 40;
- if(PlayerInfo[playerid][pFurnitureSlots] > MAX_FURNITURE_SLOTS) {
- PlayerInfo[playerid][pFurnitureSlots] = MAX_FURNITURE_SLOTS;
- SendClientMessageEx(playerid, COLOR_GRAD1, "Your furniture slots have been maximized.");
- }
- format(szMiscArray, sizeof(szMiscArray), "You have purchased a Furniture Pack - Silver for %s credits.", number_format(ShopItems[42][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, szMiscArray);
- SendClientMessageEx(playerid, COLOR_GREY, "Use /furniturehelp to see the list of commands.");
- format(szMiscArray, sizeof(szMiscArray), "[Furniture Pack - Silver] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[42][sItemPrice]));
- Log("logs/credits.log", szMiscArray), print(szMiscArray);
- GivePlayerCredits(playerid, -ShopItems[42][sItemPrice], 1);
- printf("Price43: %d", ShopItems[42][sItemPrice]);
- AmountSold[42]++;
- AmountMade[42] += ShopItems[42][sItemPrice];
- mysql_format(MainPipeline, szMiscArray, sizeof(szMiscArray), "UPDATE `sales` SET `TotalSold42` = '%d', `AmountMade42` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[42], AmountMade[42]);
- mysql_tquery(MainPipeline, szMiscArray, "OnQueryFinish", "i", SENDDATA_THREAD);
- }
- else if(GetPVarInt(playerid, "MiscShop") == 21) // Furniture Gold
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[43][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- if(PlayerInfo[playerid][pFurnitureSlots] >= MAX_FURNITURE_SLOTS) return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot buy anymore furniture slots.");
- PlayerInfo[playerid][pFurnitureSlots] += 50;
- if(PlayerInfo[playerid][pFurnitureSlots] > MAX_FURNITURE_SLOTS) {
- PlayerInfo[playerid][pFurnitureSlots] = MAX_FURNITURE_SLOTS;
- SendClientMessageEx(playerid, COLOR_GRAD1, "Your furniture slots have been maximized.");
- }
- format(szMiscArray, sizeof(szMiscArray), "You have purchased a Furniture Pack - Gold for %s credits.", number_format(ShopItems[43][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, szMiscArray);
- SendClientMessageEx(playerid, COLOR_GREY, "Use /furniturehelp to see the list of commands.");
- format(szMiscArray, sizeof(szMiscArray), "[Furniture Pack] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[43][sItemPrice]));
- Log("logs/credits.log", szMiscArray), print(szMiscArray);
- GivePlayerCredits(playerid, -ShopItems[43][sItemPrice], 1);
- printf("Price43: %d", ShopItems[43][sItemPrice]);
- AmountSold[43]++;
- AmountMade[43] += ShopItems[43][sItemPrice];
- mysql_format(MainPipeline, szMiscArray, sizeof(szMiscArray), "UPDATE `sales` SET `TotalSold43` = '%d', `AmountMade43` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[43], AmountMade[43]);
- mysql_tquery(MainPipeline, szMiscArray, "OnQueryFinish", "i", SENDDATA_THREAD);
- }
- DeletePVar(playerid, "MiscShop");
- }
- if(dialogid == DIALOG_SHOPHELPMENU)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: //VIP Shop
- {
- SetPVarInt(playerid, "ShopCheckpoint", listitem+1);
- ShowPlayerDialogEx(playerid, DIALOG_SHOPHELPMENU8, DIALOG_STYLE_MSGBOX, "VIP Shop", "To purchase Bronze VIP, Silver VIP or Gold VIP you use /vipshop at one of the VIP points located outside each VIP Club.\n You can renew your Gold VIP by using /vipshop however you need to make sure that you have renewable Gold VIP.\n You can read the benefits of VIP on the Shop Control Panel or listed within /vipshop.", "Checkpoint", "Exit");
- }
- case 1:
- {
- ShowPlayerDialogEx(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "House Shop", "To purchase a house, change your house interior, or buy a house move from the shop, you can use /houseshop anywhere. \nYou can read more information regarding houses on the Shop Control Panel.", "Exit", "");
- }
- case 2:
- {
- ShowPlayerDialogEx(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Business Shop", "Want to buy a business or renew your current one? Use the command /businessshop and this will allow you to purchase a business or renew your current one.\n It is important that you read the business rules on the forums and read more about businesses on the Shop Control Panel. Note: The Purchase Business will list the available businesses for sale at that time.", "Exit", "");
- }
- case 3:
- {
- ShowPlayerDialogEx(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Toy Shop", "To purchase a custom toy use /toyshop at a clothing shop. This allows you to see the selection of toys available and purchase one by simply clicking on it!\n After purchasing the toy will be put in your toy slot.", "Exit", "");
- }
- case 4:
- {
- ShowPlayerDialogEx(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Miscellaneous Shop", "To buy miscellaneous products such as poker tables and EXP tokens, visit any 24/7 business and use the /miscshop command.\n This will pop-up all the available miscellaneous products that are for sale. Keep an eye out as there are always new additions!", "Exit", "");
- }
- case 5:
- {
- ShowPlayerDialogEx(playerid, DIALOG_SHOPHELPMENU2, DIALOG_STYLE_MSGBOX, "Car Shop", "To purchase a custom car, you can use /carshop at locations from shipping docks and other locations.\n Using /carshop allows you to see the selection of cars available and purchase one by simply clicking on it!\n The car will be put into your car slot after you purchase.", "Checkpoint", "Exit");
- }
- case 6:
- {
- ShowPlayerDialogEx(playerid, DIALOG_SHOPHELPMENU3, DIALOG_STYLE_MSGBOX, "Plane Shop", "To purchase a custom car, you can use /carshop at locations from shipping docks and other locations.\n Using /carshop allows you to see the selection of cars available and purchase one by simply clicking on it!\n The car will be put into your car slot after you purchase.", "Checkpoint", "Exit");
- }
- case 7:
- {
- ShowPlayerDialogEx(playerid, DIALOG_SHOPHELPMENU5, DIALOG_STYLE_MSGBOX, "Boat Shop", "To purchase a custom car, you can use /carshop at locations from shipping docks and other locations.\n Using /carshop allows you to see the selection of cars available and purchase one by simply clicking on it!\n The car will be put into your car slot after you purchase.", "Checkpoint", "Exit");
- }
- }
- }
- }
- if(dialogid == DIALOG_SHOPHELPMENU8)
- {
- if(response)
- {
- ShowPlayerDialogEx(playerid, DIALOG_SHOPHELPMENU9, DIALOG_STYLE_LIST, "Boat Shop Locater", "Los Santos\nSan Fierro\nLas Venturas", "Locate", "Cancel");
- }
- }
- if(dialogid == DIALOG_SHOPHELPMENU9)
- {
- if(response)
- {
- if(CheckPointCheck(playerid))
- return SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
- SetPVarInt(playerid, "ShopCheckpoint", 1);
- switch(listitem)
- {
- case 0: SetPlayerCheckpoint(playerid, 1811.3344, -1569.4244, 13.4811, 5.0);
- case 1: SetPlayerCheckpoint(playerid, -2443.6013, 499.7480, 30.0906, 5.0);
- case 2: SetPlayerCheckpoint(playerid, 1934.1083, 1364.5004, 9.2578, 5.0);
- }
- }
- }
- if(dialogid == DIALOG_SHOPHELPMENU5)
- {
- if(response)
- {
- ShowPlayerDialogEx(playerid, DIALOG_SHOPHELPMENU6, DIALOG_STYLE_LIST, "Boat Shop Locater", "Los Santos\nSan Fierro\nBayside", "Locate", "Cancel");
- }
- }
- if(dialogid == DIALOG_SHOPHELPMENU6)
- {
- if(response)
- {
- if(CheckPointCheck(playerid))
- return SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
- SetPVarInt(playerid, "ShopCheckpoint", 1);
- switch(listitem)
- {
- case 0: SetPlayerCheckpoint(playerid, 723.1553, -1494.4547, 1.9343, 5.0);
- case 1: SetPlayerCheckpoint(playerid, -2975.8950, 505.1325, 2.4297, 5.0);
- case 2: SetPlayerCheckpoint(playerid, -2214.1636, 2422.4763, 2.496, 5.0);
- }
- }
- }
- if(dialogid == DIALOG_SHOPHELPMENU3)
- {
- if(response)
- {
- ShowPlayerDialogEx(playerid, DIALOG_SHOPHELPMENU4, DIALOG_STYLE_LIST, "Plane Shop Locater", "Los Santos Airport\nLas Venturas Airport", "Locate", "Cancel");
- }
- }
- if(dialogid == DIALOG_SHOPHELPMENU4)
- {
- if(response)
- {
- if(CheckPointCheck(playerid))
- return SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
- SetPVarInt(playerid, "ShopCheckpoint", 1);
- switch(listitem)
- {
- case 0: SetPlayerCheckpoint(playerid, 1891.9105, -2279.6174, 13.5469, 5.0);
- case 1: SetPlayerCheckpoint(playerid, 1632.0836, 1551.7365, 10.8061, 5.0);
- }
- }
- }
- if(dialogid == DIALOG_SHOPHELPMENU2)
- {
- if(response)
- {
- ShowPlayerDialogEx(playerid, DIALOG_SHOPHELPMENU7, DIALOG_STYLE_LIST, "Car Shop Locater", "Los Santos\nSan Fierro\nLas Venturas", "Locate", "Cancel");
- }
- }
- if(dialogid == DIALOG_SHOPHELPMENU7)
- {
- if(response)
- {
- if(CheckPointCheck(playerid))
- return SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
- SetPVarInt(playerid, "ShopCheckpoint", 1);
- switch(listitem)
- {
- case 0: SetPlayerCheckpoint(playerid, 2280.5720, -2325.2490, 13.5469, 5.0);
- case 1: SetPlayerCheckpoint(playerid, -1731.1923, 127.4794, 3.2976, 5.0);
- case 2: SetPlayerCheckpoint(playerid, 1663.9569, 1628.5106, 10.8203, 5.0);
- }
- }
- }
- if(dialogid == DIALOG_RENTACAR)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[20][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- new
- szQuery[215];
- AmountSold[20]++;
- AmountMade[20] += ShopItems[20][sItemPrice];
- //ShopItems[20][sSold]++;
- //ShopItems[20][sMade] += ShopItems[20][sItemPrice];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold20` = '%d', `AmountMade20` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[20], AmountMade[20]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- if(IsPlayerInRangeOfPoint(playerid, 4, 1102.8999, -1440.1669, 15.7969))
- {
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "INSERT INTO `rentedcars` (`sqlid`, `modelid`, `posx`, `posy`, `posz`, `posa`, `spawned`, `hours`) VALUES ('%d', '%d', '%f', '%f', '%f', '%f', '1', '180')", GetPlayerSQLId(playerid), GetPVarInt(playerid, "VehicleID"), 1060.4927,-1474.9323,13.1905,345.2816);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- SetPVarInt(playerid, "RentedVehicle", CreateVehicle(GetPVarInt(playerid, "VehicleID"), 1060.4927, -1474.9323, 13.1905, 345.2816, random(128), random(128), 2000000));
- }
- else if(IsPlayerInRangeOfPoint(playerid, 4, 1796.0620, -1588.5571, 13.4951))
- {
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "INSERT INTO `rentedcars` (`sqlid`, `modelid`, `posx`, `posy`, `posz`, `posa`, `spawned`, `hours`) VALUES ('%d', '%d', '%f', '%f', '%f', '%f', '1', '180')", GetPlayerSQLId(playerid), GetPVarInt(playerid, "VehicleID"), 1787.6924, -1605.8617,13.1750, 76.7439);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- SetPVarInt(playerid, "RentedVehicle", CreateVehicle(GetPVarInt(playerid, "VehicleID"), 1787.6924, -1605.8617, 13.1750, 76.7439, random(128), random(128), 2000000));
- }
- GivePlayerCredits(playerid, -ShopItems[20][sItemPrice], 1);
- printf("Price20: %d", ShopItems[20][sItemPrice]);
- IsPlayerEntering{playerid} = true;
- PutPlayerInVehicle(playerid, GetPVarInt(playerid, "RentedVehicle"), 0);
- format(szQuery, sizeof(szQuery), "[RentaCar] [User: %s(%i)] [IP: %s] [Model: %d] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), GetPVarInt(playerid, "VehicleID"), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[20][sItemPrice]));
- Log("logs/credits.log", szQuery), print(szQuery);
- format(szQuery, sizeof(szQuery), "[Rent a Car] You have rented a %s for %s credits, the vehicle will last 3 hours.", VehicleName[GetPVarInt(playerid, "VehicleID") - 400], number_format(ShopItems[20][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, szQuery);
- SendClientMessageEx(playerid, COLOR_CYAN, "Commands Available: /park, /stoprentacar, /trackcar");
- SetPVarInt(playerid, "RentedHours", 180);
- VehicleFuel[GetPVarInt(playerid, "RentedVehicle")] = 100;
- }
- DeletePVar(playerid, "VehicleID");
- }
- if(dialogid == DIALOG_CARSHOP)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[5][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- else if(!vehicleCountCheck(playerid))
- return ShowPlayerDialogEx(playerid, 0, DIALOG_STYLE_MSGBOX, "Error", "You can't have any more vehicles, you own too many!", "OK", "");
- else if(!vehicleSpawnCountCheck(playerid))
- return ShowPlayerDialogEx(playerid, 0, DIALOG_STYLE_MSGBOX, "Error", "You have too many vehicles spawned, you must store one first.", "OK", "");
- else
- {
- if(GetPVarType(playerid, "BoatShop"))
- {
- new createdcar;
- if(IsPlayerInRangeOfPoint(playerid, 4, -2214.1636, 2422.4763, 2.4961))
- {
- createdcar = CreatePlayerVehicle(playerid, GetPlayerFreeVehicleId(playerid), GetPVarInt(playerid, "VehicleID"), -2218.4795, 2424.9880, -0.3707, 314.4837, 0, 0, 2000000, 0, 0);
- }
- else if(IsPlayerInRangeOfPoint(playerid, 4, -2975.8950, 505.1325, 2.4297))
- {
- createdcar = CreatePlayerVehicle(playerid, GetPlayerFreeVehicleId(playerid), GetPVarInt(playerid, "VehicleID"), -2975.4841, 509.6216, -0.4241, 89.7179, 0, 0, 2000000, 0, 0);
- }
- else if(IsPlayerInRangeOfPoint(playerid, 4, 723.1553, -1494.4547, 1.9343))
- {
- createdcar = CreatePlayerVehicle(playerid, GetPlayerFreeVehicleId(playerid), GetPVarInt(playerid, "VehicleID"), 723.4292, -1505.4899, -0.4145, 180.4212, 0, 0, 2000000, 0, 0);
- }
- else if(IsPlayerInRangeOfPoint(playerid, 4, 2974.7520, -1462.9265, 2.8184))
- {
- createdcar = CreatePlayerVehicle(playerid, GetPlayerFreeVehicleId(playerid), GetPVarInt(playerid, "VehicleID"), 2996.4255, -1467.3026, 2.8184, 0, 0, 0, 2000000, 0, 0);
- DeletePVar(playerid, "ShopTP");
- }
- GivePlayerCredits(playerid, -ShopItems[5][sItemPrice], 1);
- printf("Price5: %d", ShopItems[5][sItemPrice]);
- IsPlayerEntering{playerid} = true;
- SetPlayerVirtualWorld(playerid, 0);
- PutPlayerInVehicle(playerid, createdcar, 0);
- AmountSold[5]++;
- AmountMade[5] += ShopItems[5][sItemPrice];
- //ShopItems[5][sSold]++;
- //ShopItems[5][sMade] += ShopItems[5][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold5` = '%d', `AmountMade5` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[5], AmountMade[5]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- new Float: arr_fPlayerPos[4];
- GetPlayerPos(playerid, arr_fPlayerPos[0], arr_fPlayerPos[1], arr_fPlayerPos[2]);
- GetPlayerFacingAngle(playerid, arr_fPlayerPos[3]);
- format(string, sizeof(string), "[CAR %i] [User: %s(%i)] [IP: %s] [Credits: %s] [Vehicle: %s] [Price: %s]", AmountSold[5], GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), VehicleName[GetPVarInt(playerid, "VehicleID") - 400], number_format(ShopItems[5][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- format(string, sizeof(string), "[Car Shop] You have purchased a %s for %s credits.", VehicleName[GetPVarInt(playerid, "VehicleID") - 400], number_format(ShopItems[5][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- DeletePVar(playerid, "BoatShop");
- }
- else
- {
- GivePlayerCredits(playerid, -ShopItems[5][sItemPrice], 1);
- printf("Price5: %d", ShopItems[5][sItemPrice]);
- AmountSold[5]++;
- AmountMade[5] += ShopItems[5][sItemPrice];
- //ShopItems[5][sSold]++;
- //ShopItems[5][sMade] += ShopItems[5][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold5` = '%d', `AmountMade5` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[5], AmountMade[5]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- new Float: arr_fPlayerPos[4], createdcar;
- GetPlayerPos(playerid, arr_fPlayerPos[0], arr_fPlayerPos[1], arr_fPlayerPos[2]);
- GetPlayerFacingAngle(playerid, arr_fPlayerPos[3]);
- if(IsPlayerInDynamicArea(playerid, NGGShop))
- {
- arr_fPlayerPos[0] = 2923.3220;
- arr_fPlayerPos[1] = -1276.6011;
- arr_fPlayerPos[2] = 10.9809;
- arr_fPlayerPos[3] = 11.4626;
- if(IsAPlane(GetPVarInt(playerid, "VehicleID"), 1))
- {
- arr_fPlayerPos[0] = 1937.1254;
- arr_fPlayerPos[1] = -2494.1057;
- arr_fPlayerPos[2] = 14.4581;
- arr_fPlayerPos[3] = 90.2559;
- }
- DeletePVar(playerid, "ShopTP");
- }
- createdcar = CreatePlayerVehicle(playerid, GetPlayerFreeVehicleId(playerid), GetPVarInt(playerid, "VehicleID"), arr_fPlayerPos[0], arr_fPlayerPos[1], arr_fPlayerPos[2], arr_fPlayerPos[3], 0, 0, 2000000, 0, 0);
- format(string, sizeof(string), "[CAR %i] [User: %s(%i)] [IP: %s] [Credits: %s] [Vehicle: %s] [Price: %s]", AmountSold[5], GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), VehicleName[GetPVarInt(playerid, "VehicleID") - 400], number_format(ShopItems[5][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- IsPlayerEntering{playerid} = true;
- SetPlayerVirtualWorld(playerid, 0);
- PutPlayerInVehicle(playerid, createdcar, 0);
- format(string, sizeof(string), "[Car Shop] You have purchased a %s for %s credits.", VehicleName[GetPVarInt(playerid, "VehicleID") - 400], number_format(ShopItems[5][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- }
- }
- }
- DeletePVar(playerid, "VehicleID");
- }
- if(dialogid == DIALOG_CARSHOP2)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCarVoucher] == 0)
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have a restricted vehicle voucher. ");
- else if(!vehicleCountCheck(playerid))
- return ShowPlayerDialogEx(playerid, 0, DIALOG_STYLE_MSGBOX, "Error", "You can't have any more vehicles, you own too many!", "OK", "");
- else if(!vehicleSpawnCountCheck(playerid))
- return ShowPlayerDialogEx(playerid, 0, DIALOG_STYLE_MSGBOX, "Error", "You have too many vehicles spawned, you must store one first.", "OK", "");
- else
- {
- PlayerInfo[playerid][pCarVoucher]--;
- new Float: arr_fPlayerPos[4], createdcar;
- GetPlayerPos(playerid, arr_fPlayerPos[0], arr_fPlayerPos[1], arr_fPlayerPos[2]);
- GetPlayerFacingAngle(playerid, arr_fPlayerPos[3]);
- createdcar = CreatePlayerVehicle(playerid, GetPlayerFreeVehicleId(playerid), GetPVarInt(playerid, "VehicleID"), arr_fPlayerPos[0], arr_fPlayerPos[1], arr_fPlayerPos[2], arr_fPlayerPos[3], 0, 0, 2000000, 0, 0);
- format(string, sizeof(string), "[CAR %i] [User: %s(%i)] [IP: %s] [Credits: %s] [Vehicle: %s] [Price: %s]", AmountSold[5], GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), VehicleName[GetPVarInt(playerid, "VehicleID") - 400], number_format(ShopItems[5][sItemPrice]));
- Log("logs/carvoucher.log", string), print(string);
- IsPlayerEntering{playerid} = true;
- SetPlayerVirtualWorld(playerid, 0);
- PutPlayerInVehicle(playerid, createdcar, 0);
- format(string, sizeof(string), "[Car Shop] You have purchased a %s for 1 restricted car voucher.", VehicleName[GetPVarInt(playerid, "VehicleID") - 400]);
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- }
- }
- DeletePVar(playerid, "VehicleID");
- }
- if(dialogid == DIALOG_EDITSHOPBUSINESS)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: // Add Business
- {
- for (new i; i < sizeof(BusinessSales); i++)
- {
- if(BusinessSales[i][bAvailable] == 0)
- {
- SetPVarInt(playerid, "EditingSale", i);
- break;
- }
- }
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS2, DIALOG_STYLE_INPUT, "Adding Business [1/4]","Enter the business ID you wish to sell.", "Next", "Cancel");
- }
- case 1: // Edit Business
- {
- new Count, szDialog[500];
- for (new i; i < sizeof(BusinessSales); i++)
- {
- if(BusinessSales[i][bAvailable] == 1 || BusinessSales[i][bAvailable] == 3)
- {
- format(szDialog, sizeof(szDialog), "%s\n(%d) %s | Type: %d | Credits: %s", szDialog, BusinessSales[i][bBusinessID], BusinessSales[i][bText],BusinessSales[i][bType], number_format(BusinessSales[i][bPrice]));
- Selected[playerid][Count] = i;
- Count++;
- }
- }
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS8, DIALOG_STYLE_LIST, "Select business to edit.", szDialog, "Select", "Exit");
- }
- case 2: // View Businesses Sold
- {
- new Count, szDialog[500];
- for (new i; i < sizeof(BusinessSales); i++)
- {
- if(BusinessSales[i][bAvailable] == 2)
- {
- format(szDialog, sizeof(szDialog), "%s\n(Business ID: %d)%s | (Credits: %s) | Purchaser: %d", szDialog, BusinessSales[i][bBusinessID], BusinessSales[i][bText], number_format(BusinessSales[i][bPrice]), BusinessSales[i][bPurchased]);
- Selected[playerid][Count] = i;
- Count++;
- }
- }
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS7, DIALOG_STYLE_LIST, "Businesses Purchased", szDialog, "Reset", "Exit");
- }
- }
- }
- }
- if(dialogid == DIALOG_EDITSHOPBUSINESS8)
- {
- if(response)
- {
- new szDialog[128];
- SetPVarInt(playerid, "BusinessList", listitem);
- format(szDialog, sizeof(szDialog), "Business ID: %d\nText: %s\nType: %d\nCredits: %s\nAvailable: %d", BusinessSales[Selected[playerid][listitem]][bBusinessID], BusinessSales[Selected[playerid][listitem]][bText],BusinessSales[Selected[playerid][listitem]][bType],
- number_format(BusinessSales[Selected[playerid][listitem]][bPrice]), BusinessSales[Selected[playerid][listitem]][bAvailable]);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS9, DIALOG_STYLE_LIST, "Select business to edit.", szDialog, "Reset", "Exit");
- }
- }
- if(dialogid == DIALOG_EDITSHOPBUSINESS9)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: // Business ID
- {
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS10, DIALOG_STYLE_INPUT, "Editing Business","Enter the business ID you wish to sell.", "Submit", "Back");
- }
- case 1: // Text
- {
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS11, DIALOG_STYLE_INPUT, "Editing Business","Enter the business description.", "Submit", "Back");
- }
- case 2: // Type
- {
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS12, DIALOG_STYLE_INPUT, "Editing Business","Enter the type of the business. (1-3)", "Submit", "Back");
- }
- case 3: // Credits
- {
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS13, DIALOG_STYLE_INPUT, "Editing Business","Enter the amount of credits needed to purchase the business.", "Submit", "Back");
- }
- case 4: // Available
- {
- if(BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bAvailable] == 1)
- {
- BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bAvailable] = 3;
- SendClientMessageEx(playerid, COLOR_CYAN, "That business is now unavailable for purchase.");
- }
- else
- {
- BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bAvailable] = 1;
- SendClientMessageEx(playerid, COLOR_CYAN, "That business is now available for purchase.");
- }
- new szDialog[128];
- format(szDialog, sizeof(szDialog), "Business ID: %d\nText: %s\nType: %d\nCredits: %s\nAvailable: %d", BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bBusinessID], BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bText],BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bType],
- number_format(BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bPrice]), BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bAvailable]);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS9, DIALOG_STYLE_LIST, "Select business to edit.", szDialog, "Select", "Exit");
- }
- }
- }
- else
- {
- SaveBusinessSale(Selected[playerid][GetPVarInt(playerid, "BusinessList")]);
- DeletePVar(playerid, "BusinessList");
- }
- }
- if(dialogid == DIALOG_EDITSHOPBUSINESS13)
- {
- if(response)
- {
- new BusinessID;
- if (sscanf(inputtext, "d", BusinessID))
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS13, DIALOG_STYLE_INPUT, "Editing Business","Enter the amount of credits needed to purchase the business.", "Submit", "Back");
- if(BusinessID < 0)
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS13, DIALOG_STYLE_INPUT, "Editing Business","Enter the amount of credits needed to purchase the business.", "Submit", "Back");
- new szDialog[128];
- BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bPrice] = BusinessID;
- format(szDialog, sizeof(szDialog), "Business ID: %d\nText: %s\nType: %d\nCredits: %s\nAvailable: %d", BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bBusinessID], BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bText],BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bType],
- number_format(BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bPrice]), BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bAvailable]);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS9, DIALOG_STYLE_LIST, "Select business to edit.", szDialog, "Select", "Exit");
- }
- else
- {
- new szDialog[128];
- format(szDialog, sizeof(szDialog), "Business ID: %d\nText: %s\nType: %d\nCredits: %s\nAvailable: %d", BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bBusinessID], BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bText],BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bType],
- number_format(BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bPrice]), BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bAvailable]);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS9, DIALOG_STYLE_LIST, "Select business to edit.", szDialog, "Select", "Exit");
- }
- }
- if(dialogid == DIALOG_EDITSHOPBUSINESS12)
- {
- if(response)
- {
- new BusinessID;
- if (sscanf(inputtext, "d", BusinessID))
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS12, DIALOG_STYLE_INPUT, "Editing Business","Enter the type of the business. (1-3)", "Submit", "Back");
- if(BusinessID < 1 || BusinessID > 3)
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS12, DIALOG_STYLE_INPUT, "Editing Business","Enter the type of the business. (1-3)", "Submit", "Back");
- new szDialog[128];
- BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bType] = BusinessID;
- format(szDialog, sizeof(szDialog), "Business ID: %d\nText: %s\nType: %d\nCredits: %s\nAvailable: %d", BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bBusinessID], BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bText],BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bType],
- number_format(BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bPrice]), BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bAvailable]);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS9, DIALOG_STYLE_LIST, "Select business to edit.", szDialog, "Select", "Exit");
- }
- else
- {
- new szDialog[128];
- format(szDialog, sizeof(szDialog), "Business ID: %d\nText: %s\nType: %d\nCredits: %s\nAvailable: %d", BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bBusinessID], BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bText],BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bType],
- number_format(BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bPrice]), BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bAvailable]);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS9, DIALOG_STYLE_LIST, "Select business to edit.", szDialog, "Select", "Exit");
- }
- }
- if(dialogid == DIALOG_EDITSHOPBUSINESS11)
- {
- if(response)
- {
- if(isnull(inputtext))
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS11, DIALOG_STYLE_INPUT, "Editing Business","Enter the business description.", "Submit", "Back");
- if(strlen(inputtext) > 128)
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS11, DIALOG_STYLE_INPUT, "Editing Business","Enter the business description.", "Submit", "Back");
- new szDialog[128];
- strcpy(BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bText], inputtext, 128);
- format(szDialog, sizeof(szDialog), "Business ID: %d\nText: %s\nType: %d\nCredits: %s\nAvailable: %d", BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bBusinessID], BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bText],BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bType],
- number_format(BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bPrice]), BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bAvailable]);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS9, DIALOG_STYLE_LIST, "Select business to edit.", szDialog, "Select", "Exit");
- }
- else
- {
- new szDialog[128];
- format(szDialog, sizeof(szDialog), "Business ID: %d\nText: %s\nType: %d\nCredits: %s\nAvailable: %d", BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bBusinessID], BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bText],BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bType],
- number_format(BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bPrice]), BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bAvailable]);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS9, DIALOG_STYLE_LIST, "Select business to edit.", szDialog, "Select", "Exit");
- }
- }
- if(dialogid == DIALOG_EDITSHOPBUSINESS10)
- {
- if(response)
- {
- new BusinessID;
- if (sscanf(inputtext, "d", BusinessID))
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS10, DIALOG_STYLE_INPUT, "Editing Business","Enter the business ID you wish to sell.", "Submit", "Back");
- if(!IsValidBusinessID(BusinessID))
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS10, DIALOG_STYLE_INPUT, "Editing Business","Enter the business ID you wish to sell.", "Submit", "Back");
- new szDialog[128];
- BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bBusinessID] = BusinessID;
- format(szDialog, sizeof(szDialog), "Business ID: %d\nText: %s\nType: %d\nCredits: %s\nAvailable: %d", BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bBusinessID], BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bText],BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bType],
- number_format(BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bPrice]), BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bAvailable]);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS9, DIALOG_STYLE_LIST, "Select business to edit.", szDialog, "Select", "Exit");
- }
- else
- {
- new szDialog[128];
- format(szDialog, sizeof(szDialog), "Business ID: %d\nText: %s\nType: %d\nCredits: %s\nAvailable: %d", BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bBusinessID], BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bText],BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bType],
- number_format(BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bPrice]), BusinessSales[Selected[playerid][GetPVarInt(playerid, "BusinessList")]][bAvailable]);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS9, DIALOG_STYLE_LIST, "Select business to edit.", szDialog, "Select", "Exit");
- }
- }
- if(dialogid == DIALOG_EDITSHOPBUSINESS7)
- {
- if(response)
- {
- if(BusinessSales[Selected[playerid][listitem]][bAvailable] == 2) {
- strcpy(BusinessSales[Selected[playerid][listitem]][bText], "None", 128);
- BusinessSales[Selected[playerid][listitem]][bBusinessID] = -1;
- BusinessSales[Selected[playerid][listitem]][bType] = 0;
- BusinessSales[Selected[playerid][listitem]][bAvailable] = 0;
- BusinessSales[Selected[playerid][listitem]][bPrice] = 0;
- SendClientMessageEx(playerid, COLOR_CYAN, "You have reset the business sale.");
- }
- }
- }
- if(dialogid == DIALOG_EDITSHOPBUSINESS2)
- {
- if(response)
- {
- new BusinessID;
- if (sscanf(inputtext, "d", BusinessID))
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS2, DIALOG_STYLE_INPUT, "Adding Business [1/4]","Enter the business ID you wish to sell.", "Next", "Cancel");
- if(!IsValidBusinessID(BusinessID))
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS2, DIALOG_STYLE_INPUT, "Adding Business [1/4]","Enter the business ID you wish to sell.", "Next", "Cancel");
- for (new i; i < sizeof(BusinessSales); i++)
- {
- if(BusinessSales[i][bBusinessID] == BusinessID)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "That business ID is already in use.");
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS2, DIALOG_STYLE_INPUT, "Adding Business [1/4]","Enter the business ID you wish to sell.", "Next", "Cancel");
- }
- }
- BusinessSales[GetPVarInt(playerid, "EditingSale")][bBusinessID] = BusinessID;
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS3, DIALOG_STYLE_INPUT, "Adding Business [2/4]", "Enter a description for the business.", "Next", "Cancel");
- }
- else
- {
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS, DIALOG_STYLE_LIST, "Edit Business Shop", "Add Business\nEdit Business\nView Businesses Sold", "Select", "Exit");
- }
- }
- if(dialogid == DIALOG_EDITSHOPBUSINESS3)
- {
- if(response)
- {
- if(isnull(inputtext))
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS3, DIALOG_STYLE_INPUT, "Adding Business [2/4]", "Enter a description for the business.", "Next", "Cancel");
- if(strlen(inputtext) > 128)
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS3, DIALOG_STYLE_INPUT, "Adding Business [2/4]", "Enter a description for the business.", "Next", "Cancel");
- strcpy(BusinessSales[GetPVarInt(playerid, "EditingSale")][bText], inputtext, 128);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS4, DIALOG_STYLE_INPUT, "Adding Business [3/4]", "Enter the business type (1-3).", "Next", "Cancel");
- }
- else
- {
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS, DIALOG_STYLE_LIST, "Edit Business Shop", "Add Business\nEdit Business\nView Businesses Sold", "Select", "Exit");
- }
- }
- if(dialogid == DIALOG_EDITSHOPBUSINESS4)
- {
- if(response)
- {
- new BusinessID;
- if (sscanf(inputtext, "d", BusinessID))
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS4, DIALOG_STYLE_INPUT, "Adding Business [3/4]", "Enter the business type (1-3).", "Next", "Cancel");
- if(BusinessID < 1 || BusinessID > 3)
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS4, DIALOG_STYLE_INPUT, "Adding Business [3/4]", "Enter the business type (1-3).", "Next", "Cancel");
- BusinessSales[GetPVarInt(playerid, "EditingSale")][bType] = BusinessID;
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS5, DIALOG_STYLE_INPUT, "Adding Business [4/4]", "Enter the amount of credits needed to purchase this business.", "Next", "Cancel");
- }
- else
- {
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS, DIALOG_STYLE_LIST, "Edit Business Shop", "Add Business\nEdit Business\nView Businesses Sold", "Select", "Exit");
- }
- }
- if(dialogid == DIALOG_EDITSHOPBUSINESS5)
- {
- if(response)
- {
- new BusinessID;
- if (sscanf(inputtext, "d", BusinessID))
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS5, DIALOG_STYLE_INPUT, "Adding Business [4/4]", "Enter the amount of credits needed to purchase this business.", "Next", "Cancel");
- if(BusinessID < 0)
- return ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS5, DIALOG_STYLE_INPUT, "Adding Business [4/4]", "Enter the amount of credits needed to purchase this business.", "Next", "Cancel");
- BusinessSales[GetPVarInt(playerid, "EditingSale")][bPrice] = BusinessID;
- format(string, sizeof(string), "Business ID: %d\nBusiness Description: %s\nBusiness Type: %d\nBusiness Price: %d", BusinessSales[GetPVarInt(playerid, "EditingSale")][bBusinessID], BusinessSales[GetPVarInt(playerid, "EditingSale")][bText], BusinessSales[GetPVarInt(playerid, "EditingSale")][bType], BusinessSales[GetPVarInt(playerid, "EditingSale")][bPrice]);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS6, DIALOG_STYLE_MSGBOX, "Finalize Business Sale", string, "Submit Business", "Cancel");
- }
- else
- {
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS, DIALOG_STYLE_LIST, "Edit Business Shop", "Add Business\nEdit Business\nView Businesses Sold", "Select", "Exit");
- }
- }
- if(dialogid == DIALOG_EDITSHOPBUSINESS6)
- {
- if(response)
- {
- format(string, sizeof(string), "[EDITBUSINESSSHOP] [User: %s(%i)] [IP: %s] [BusinessID: %d] [Description: %s] [Type: %d] [Price: %d]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), BusinessSales[GetPVarInt(playerid, "EditingSale")][bBusinessID], BusinessSales[GetPVarInt(playerid, "EditingSale")][bText], BusinessSales[GetPVarInt(playerid, "EditingSale")][bType], BusinessSales[GetPVarInt(playerid, "EditingSale")][bPrice]);
- Log("logs/editshop.log", string), print(string);
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS, DIALOG_STYLE_LIST, "Edit Business Shop", "Add Business\nEdit Business\nView Businesses Sold", "Select", "Exit");
- SendClientMessageEx(playerid, COLOR_CYAN, "You have successfully submitted a business sale.");
- BusinessSales[GetPVarInt(playerid, "EditingSale")][bAvailable] = 1;
- SaveBusinessSale(GetPVarInt(playerid, "EditingSale"));
- DeletePVar(playerid, "EditingSale");
- }
- else
- {
- ShowPlayerDialogEx(playerid, DIALOG_EDITSHOPBUSINESS, DIALOG_STYLE_LIST, "Edit Business Shop", "Add Business\nEdit Business\nView Businesses Sold", "Select", "Exit");
- }
- }
- if(dialogid == DIALOG_SHOPBUSINESS)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- new szDialog[500], Count;
- for (new i; i < sizeof(BusinessSales); i++)
- {
- if(BusinessSales[i][bAvailable] == 1)
- {
- format(szDialog, sizeof(szDialog), "%s\n%s (Credits: %s)", szDialog, BusinessSales[i][bText], number_format(BusinessSales[i][bPrice]));
- Selected[playerid][Count] = i;
- Count++;
- }
- }
- if(Count != 0)
- ShowPlayerDialogEx(playerid, DIALOG_SHOPBUSINESS2, DIALOG_STYLE_LIST, "Businesses Shop", szDialog, "More Info", "Exit");
- else
- SendClientMessageEx(playerid, COLOR_GREY, "No businesses are currently available.");
- }
- case 1:
- {
- if(PlayerInfo[playerid][pBusiness] == INVALID_BUSINESS_ID || PlayerInfo[playerid][pBusinessRank] < 5)
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't currently own a business.");
- if(Businesses[PlayerInfo[playerid][pBusiness]][bGrade] == 0)
- return SendClientMessageEx(playerid, COLOR_GREY, "An error has occured please contact the Director of Customer Relations.");
- ShowPlayerDialogEx(playerid, DIALOG_SHOPBUSINESS4, DIALOG_STYLE_LIST, "Select how many months you wish to renew for.", "1 Month\n2 Months\n3 Months\n4 Months\n5 Months\n6 Months\n7 Months\n8 Months\n9 Months\n10 Months\n11 Months\n1 Year", "Select", "Cancel");
- }
- }
- }
- }
- if(dialogid == DIALOG_SHOPBUSINESS4)
- {
- if(response)
- {
- new Prices;
- SetPVarInt(playerid, "BusinessMonths", listitem+1);
- switch (Businesses[PlayerInfo[playerid][pBusiness]][bGrade])
- {
- case 1: Prices = ShopItems[11][sItemPrice];
- case 2: Prices = ShopItems[12][sItemPrice];
- case 3: Prices = ShopItems[13][sItemPrice];
- }
- SetPVarInt(playerid, "BusinessPrice", (listitem+1)*Prices);
- format(string, sizeof(string),"Business Renew\nGrade: %d\nExpires: %d Month\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", Businesses[PlayerInfo[playerid][pBusiness]][bGrade],listitem+1, number_format(PlayerInfo[playerid][pCredits]), number_format(GetPVarInt(playerid, "BusinessPrice")), number_format(PlayerInfo[playerid][pCredits]-GetPVarInt(playerid, "BusinessPrice")));
- ShowPlayerDialogEx(playerid, DIALOG_SHOPBUSINESS5, DIALOG_STYLE_MSGBOX, "Purchase Business Renew", string, "Purchase", "Cancel");
- }
- }
- if(dialogid == DIALOG_SHOPBUSINESS5)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pBusiness] == INVALID_BUSINESS_ID || PlayerInfo[playerid][pBusinessRank] < 5)
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't currently own a business.");
- new Prices;
- Prices = GetPVarInt(playerid, "BusinessPrice");
- if(PlayerInfo[playerid][pCredits] < Prices)
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- if(!GetPVarType(playerid, "BusinessMonths"))
- return SendClientMessageEx(playerid, COLOR_GREY, "An error has occurred please try again.");
- new szQuery[128];
- switch (Businesses[PlayerInfo[playerid][pBusiness]][bGrade])
- {
- case 1:
- {
- AmountSold[11]++;
- AmountMade[11] += Prices;
- //ShopItems[11][sSold]++;
- //ShopItems[11][sMade] += Prices;
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold11` = '%d', `AmountMade11` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[11], AmountMade[11]);
- }
- case 2:
- {
- AmountSold[12]++;
- AmountMade[12] += Prices;
- //ShopItems[12][sSold]++;
- //ShopItems[12][sMade] += Prices;
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold12` = '%d', `AmountMade12` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[12], AmountMade[12]);
- }
- case 3:
- {
- AmountSold[13]++;
- AmountMade[13] += Prices;
- //ShopItems[13][sSold]++;
- //ShopItems[13][sMade] += Prices;
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold13` = '%d', `AmountMade13` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[13], AmountMade[13]);
- }
- }
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- new Months = GetPVarInt(playerid, "BusinessMonths");
- GivePlayerCredits(playerid, -Prices, 1);
- new stamp = Businesses[PlayerInfo[playerid][pBusiness]][bMonths];
- if(stamp-gettime() < 0)
- {
- Businesses[PlayerInfo[playerid][pBusiness]][bMonths] = (2592000*Months)+gettime()+259200;
- }
- else Businesses[PlayerInfo[playerid][pBusiness]][bMonths] = ((2592000*Months)+gettime()+259200)+stamp-gettime();
- format(string, sizeof(string), "[Business Renewal(%i)] [Months: %d] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s] -- %d | %d",PlayerInfo[playerid][pBusiness], Months, GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(Prices), stamp, Businesses[PlayerInfo[playerid][pBusiness]][bMonths]);
- Log("logs/credits.log", string), print(string);
- format(string, sizeof(string), "You have successfully payed %s credits to renew your business for %d months.", number_format(Prices), Months);
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- }
- DeletePVar(playerid, "BusinessMonths");
- }
- if(dialogid == DIALOG_SHOPBUSINESS2)
- {
- if(response)
- {
- format(string, sizeof(string),"Business: %s\nType: %d\nExpires: 1 Month\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", BusinessSales[Selected[playerid][listitem]][bText], BusinessSales[Selected[playerid][listitem]][bType], number_format(PlayerInfo[playerid][pCredits]), number_format(BusinessSales[Selected[playerid][listitem]][bPrice]), number_format(PlayerInfo[playerid][pCredits]-BusinessSales[Selected[playerid][listitem]][bPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_SHOPBUSINESS3, DIALOG_STYLE_MSGBOX, "Purchase Business", string, "Purchase", "Cancel");
- SetPVarInt(playerid, "BusinessSaleID", BusinessSales[Selected[playerid][listitem]][bBusinessID]), SetPVarInt(playerid, "BusinessSale", Selected[playerid][listitem]);
- }
- }
- if(dialogid == DIALOG_SHOPBUSINESS3)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCredits] < BusinessSales[GetPVarInt(playerid, "BusinessSale")][bPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- if (PlayerInfo[playerid][pBusiness] != INVALID_BUSINESS_ID)
- return SendClientMessageEx(playerid, COLOR_GREY, "You already own a business.");
- if(BusinessSales[GetPVarInt(playerid, "BusinessSale")][bAvailable] != 1)
- return SendClientMessageEx(playerid, COLOR_GREY, "This business is not for sale anymore.");
- if (!IsValidBusinessID(GetPVarInt(playerid, "BusinessSaleID")))
- return SendClientMessageEx(playerid, COLOR_GRAD2, "An error has occurred.");
- BusinessSales[GetPVarInt(playerid, "BusinessSale")][bAvailable] = 2;
- GivePlayerCredits(playerid, -BusinessSales[GetPVarInt(playerid, "BusinessSale")][bPrice], 1);
- BusinessSales[GetPVarInt(playerid, "BusinessSale")][bPurchased] = GetPlayerSQLId(playerid);
- Businesses[GetPVarInt(playerid, "BusinessSaleID")][bOwner] = GetPlayerSQLId(playerid);
- strcpy(Businesses[GetPVarInt(playerid, "BusinessSaleID")][bOwnerName], GetPlayerNameEx(playerid), MAX_PLAYER_NAME);
- PlayerInfo[playerid][pBusiness] = GetPVarInt(playerid, "BusinessSaleID");
- PlayerInfo[playerid][pBusinessRank] = 5;
- Businesses[GetPVarInt(playerid, "BusinessSaleID")][bMonths] = (2592000*1)+gettime()+259200;
- format(string, sizeof(string), "You have purchased business %s (1 Month) for %s credits.", BusinessSales[GetPVarInt(playerid, "BusinessSale")][bText], number_format(BusinessSales[GetPVarInt(playerid, "BusinessSale")][bPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_WHITE, "Type /help to review the business help section!");
- SaveBusiness(GetPVarInt(playerid, "BusinessSaleID"));
- OnPlayerStatsUpdate(playerid);
- RefreshBusinessPickup(GetPVarInt(playerid, "BusinessSaleID"));
- format(string,sizeof(string),"%s(%d) (IP: %s) has bought business ID %d for %d.", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), GetPVarInt(playerid, "BusinessSale"), BusinessSales[GetPVarInt(playerid, "BusinessSale")][bPrice]);
- Log("logs/business.log", string);
- SaveBusinessSale(GetPVarInt(playerid, "BusinessSale"));
- format(string, sizeof(string), "[Business %i] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]",GetPVarInt(playerid, "BusinessSale"), GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(BusinessSales[GetPVarInt(playerid, "BusinessSale")][bPrice]));
- Log("logs/credits.log", string), print(string);
- for(new i = 0; i < MAX_BUSINESSSALES; i++) {
- Selected[playerid][i] = 0;
- }
- }
- DeletePVar(playerid, "BusinessSaleID");
- DeletePVar(playerid, "BusinessSale");
- }
- if(dialogid == DIALOG_HOUSESHOP)
- {
- if(response)
- {
- new szDialog[180];
- switch(listitem)
- {
- case 0: // Purchase House
- {
- format(szDialog, sizeof(szDialog),"*You must contact a senior admin to have this issued.\n\n\nItem: House\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[14][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[14][sItemPrice]));
- ShowPlayerDialogEx( playerid, DIALOG_HOUSESHOP2, DIALOG_STYLE_MSGBOX, "House Shop", szDialog, "Purchase", "Cancel" );
- }
- case 1: // House Interior Change
- {
- format(szDialog, sizeof(szDialog),"*You must contact a senior admin to have this issued.\n\n\nItem: House Interior Change\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[15][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[15][sItemPrice]));
- ShowPlayerDialogEx( playerid, DIALOG_HOUSESHOP3, DIALOG_STYLE_MSGBOX, "House Shop", szDialog, "Purchase", "Cancel" );
- }
- case 2: // House Move
- {
- format(szDialog, sizeof(szDialog),"*You must contact a senior admin to have this issued.\n\n\nItem: House Move\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[16][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[16][sItemPrice]));
- ShowPlayerDialogEx( playerid, DIALOG_HOUSESHOP4, DIALOG_STYLE_MSGBOX, "House Shop", szDialog, "Purchase", "Cancel" );
- }
- case 3: // Small Garage
- {
- format(szDialog, sizeof(szDialog),"*You must contact a senior admin to have this issued.\n\n\nItem: Garage - Small\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[24][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[24][sItemPrice]));
- ShowPlayerDialogEx( playerid, DIALOG_HOUSESHOP5, DIALOG_STYLE_MSGBOX, "House Shop", szDialog, "Purchase", "Cancel" );
- }
- case 4: // Medium Garage
- {
- format(szDialog, sizeof(szDialog),"*You must contact a senior admin to have this issued.\n\n\nItem: Garage - Medium\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[25][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[25][sItemPrice]));
- ShowPlayerDialogEx( playerid, DIALOG_HOUSESHOP6, DIALOG_STYLE_MSGBOX, "House Shop", szDialog, "Purchase", "Cancel" );
- }
- case 5: // Large Garage
- {
- format(szDialog, sizeof(szDialog),"*You must contact a senior admin to have this issued.\n\n\nItem: Garage - Large\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[26][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[26][sItemPrice]));
- ShowPlayerDialogEx( playerid, DIALOG_HOUSESHOP7, DIALOG_STYLE_MSGBOX, "House Shop", szDialog, "Purchase", "Cancel" );
- }
- case 6: // Large Garage
- {
- format(szDialog, sizeof(szDialog),"*You must contact a senior admin to have this issued.\n\n\nItem: Garage - Extra Large\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[27][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[27][sItemPrice]));
- ShowPlayerDialogEx( playerid, DIALOG_HOUSESHOP8, DIALOG_STYLE_MSGBOX, "House Shop", szDialog, "Purchase", "Cancel" );
- }
- }
- }
- }
- if(dialogid == DIALOG_HOUSESHOP2)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[14][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[14][sItemPrice], 1);
- printf("Price14: %d", ShopItems[14][sItemPrice]);
- AmountSold[14]++;
- AmountMade[14] += ShopItems[14][sItemPrice];
- //ShopItems[14][sSold]++;
- //ShopItems[14][sMade] += ShopItems[14][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold14` = '%d', `AmountMade14` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[14], AmountMade[14]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- AddFlag(playerid, INVALID_PLAYER_ID, "Purchased House (Credits)");
- SendReportToQue(playerid, "House (Credits)", 2, 2);
- format(string, sizeof(string), "You have purchased a house for %s credits.", number_format(ShopItems[14][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_CYAN, "Contact a senior admin to have the house issued.");
- format(string, sizeof(string), "[House] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[14][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- }
- if(dialogid == DIALOG_HOUSESHOP3)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[15][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[15][sItemPrice], 1);
- printf("Price15: %d", ShopItems[15][sItemPrice]);
- AmountSold[15]++;
- AmountMade[15] += ShopItems[15][sItemPrice];
- //ShopItems[15][sSold]++;
- //ShopItems[15][sMade] += ShopItems[15][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold15` = '%d', `AmountMade15` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[15], AmountMade[15]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- AddFlag(playerid, INVALID_PLAYER_ID, "Purchased House Interior Change (Credits)");
- SendReportToQue(playerid, "House Interior Change (Credits)", 2, 2);
- format(string, sizeof(string), "You have purchased a house interior change for %s credits.", number_format(ShopItems[15][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_CYAN, "Contact a senior admin to have the house interior change issued.");
- format(string, sizeof(string), "[House Interior Change] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[15][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- }
- if(dialogid == DIALOG_HOUSESHOP4)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[16][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[16][sItemPrice], 1);
- printf("Price16: %d", ShopItems[16][sItemPrice]);
- AmountSold[16]++;
- AmountMade[16] += ShopItems[16][sItemPrice];
- //ShopItems[16][sSold]++;
- //ShopItems[16][sMade] += ShopItems[16][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold16` = '%d', `AmountMade16` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[16], AmountMade[16]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- AddFlag(playerid, INVALID_PLAYER_ID, "Purchased House Move (Credits)");
- SendReportToQue(playerid, "House Move (Credits)", 2, 2);
- format(string, sizeof(string), "You have purchased a house move for %s credits.", number_format(ShopItems[16][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_CYAN, "Contact a senior admin to have the house move issued.");
- format(string, sizeof(string), "[House Move] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[16][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- }
- if(dialogid == DIALOG_HOUSESHOP5)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[24][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[24][sItemPrice], 1);
- printf("Price24: %d", ShopItems[24][sItemPrice]);
- AmountSold[24]++;
- AmountMade[24] += ShopItems[24][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold24` = '%d', `AmountMade24` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[24], AmountMade[24]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- GarageVW++;
- g_mysql_SaveMOTD();
- format(szQuery, sizeof(szQuery), "Garage - Small (VW: %d)", GarageVW);
- AddFlag(playerid, INVALID_PLAYER_ID, szQuery);
- SendReportToQue(playerid, szQuery, 2, 2);
- format(string, sizeof(string), "You have purchased a small garage for %s credits.", number_format(ShopItems[24][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_CYAN, "Contact a senior admin to have the small garage issued.");
- format(string, sizeof(string), "[Garage - Small] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[24][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- }
- if(dialogid == DIALOG_HOUSESHOP6)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[25][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[25][sItemPrice], 1);
- printf("Price25: %d", ShopItems[25][sItemPrice]);
- AmountSold[25]++;
- AmountMade[25] += ShopItems[25][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold25` = '%d', `AmountMade25` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[25], AmountMade[25]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- GarageVW++;
- g_mysql_SaveMOTD();
- format(szQuery, sizeof(szQuery), "Garage - Medium (VW: %d)", GarageVW);
- AddFlag(playerid, INVALID_PLAYER_ID, szQuery);
- SendReportToQue(playerid, szQuery, 2, 2);
- format(string, sizeof(string), "You have purchased a medium garage for %s credits.", number_format(ShopItems[25][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_CYAN, "Contact a senior admin to have the medium garage issued.");
- format(string, sizeof(string), "[Garage - Medium] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[25][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- }
- if(dialogid == DIALOG_HOUSESHOP7)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[26][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[26][sItemPrice], 1);
- printf("Price26: %d", ShopItems[26][sItemPrice]);
- AmountSold[26]++;
- AmountMade[26] += ShopItems[26][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold26` = '%d', `AmountMade26` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[26], AmountMade[26]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- GarageVW++;
- g_mysql_SaveMOTD();
- format(szQuery, sizeof(szQuery), "Garage - Large (VW: %d)", GarageVW);
- AddFlag(playerid, INVALID_PLAYER_ID, szQuery);
- SendReportToQue(playerid, szQuery, 2, 2);
- format(string, sizeof(string), "You have purchased a large garage for %s credits.", number_format(ShopItems[26][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_CYAN, "Contact a senior admin to have the large garage issued.");
- format(string, sizeof(string), "[Garage - Large] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[26][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- }
- if(dialogid == DIALOG_HOUSESHOP8)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[27][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -ShopItems[27][sItemPrice], 1);
- printf("Price27: %d", ShopItems[27][sItemPrice]);
- AmountSold[27]++;
- AmountMade[27] += ShopItems[27][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold27` = '%d', `AmountMade27` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[27], AmountMade[27]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- GarageVW++;
- g_mysql_SaveMOTD();
- format(szQuery, sizeof(szQuery), "Garage - Extra Large (VW: %d)", GarageVW);
- AddFlag(playerid, INVALID_PLAYER_ID, szQuery);
- SendReportToQue(playerid, szQuery, 2, 2);
- format(string, sizeof(string), "You have purchased a extra large garage for %s credits.", number_format(ShopItems[27][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_CYAN, "Contact a senior admin to have the extra large garage issued.");
- format(string, sizeof(string), "[Garage - Extra Large] [User: %s(%i)] [IP: %s] [Credits: %s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[27][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- }
- if(dialogid == DIALOG_HEALTHCARE)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- new szDialog[160];
- format(szDialog, sizeof(szDialog), "When spawning from the hospital you will spawn with full health, and will be served a full meal.\n\nCost per hospital visit: {FFD700}%s{A9C4E4}", number_format(ShopItems[18][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_HEALTHCARE2, DIALOG_STYLE_MSGBOX, "Advanced Health Care" , szDialog, "Activate", "Exit");
- }
- case 1:
- {
- new szDialog[160];
- SetPVarInt(playerid, "HealthCare", 1);
- format(szDialog, sizeof(szDialog), "When spawning from the hospital you will spawn 80%% faster, with full health, and be served a full meal.\n\nCost per hospital visit: {FFD700}%s{A9C4E4}", number_format(ShopItems[19][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_HEALTHCARE2, DIALOG_STYLE_MSGBOX, "Super Advanced Health Care" , szDialog, "Activate", "Exit");
- }
- }
- }
- }
- if(dialogid == DIALOG_HEALTHCARE2)
- {
- if(response)
- {
- if(!GetPVarType(playerid, "HealthCare")) // Advanced
- {
- PlayerInfo[playerid][pHealthCare] = 1;
- SendClientMessageEx(playerid, COLOR_CYAN, "You have enabled Advanced Health Care, type /togglehealthcare to disable it.");
- }
- else // Super Advanced
- {
- PlayerInfo[playerid][pHealthCare] = 2;
- SendClientMessageEx(playerid, COLOR_CYAN, "You have enabled Super Advanced Health Care, type /togglehealthcare to disable it.");
- }
- }
- DeletePVar(playerid, "HealthCare");
- }
- if(dialogid == DIALOG_VIPSHOP && response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialogEx(playerid, DIALOG_VIPSHOP2, DIALOG_STYLE_LIST, "Select which VIP you want to purchase.", "Bronze\nSilver\nGold", "Select", "Cancel");
- }
- else
- {
- if(PlayerInfo[playerid][pGVip] == 0) {
- SendClientMessageEx(playerid, COLOR_GREY, "You have never purchased Gold VIP, so you can't renew it.");
- }
- else
- {
- ShowPlayerDialogEx(playerid, DIALOG_VIPSHOP3, DIALOG_STYLE_LIST, "Select how many months you wish to renew for.", "1 Month\n2 Months\n3 Months\n4 Months\n5 Months\n6 Months\n7 Months\n8 Months\n9 Months\n10 Months\n11 Months\n1 Year", "Select", "Cancel");
- }
- }
- }
- if(dialogid == DIALOG_VIPSHOP3 && response)
- {
- new Months = listitem+1;
- SetPVarInt(playerid, "VIPType", 3), SetPVarInt(playerid, "VIPPrice", ShopItems[1][sItemPrice]*Months), SetPVarInt(playerid, "VIPMonths", Months), SetPVarInt(playerid, "GoldRenewal", 1);
- format(string, sizeof(string),"Type: Gold VIP\nExpires: %d Month(s)\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", listitem+1, number_format(PlayerInfo[playerid][pCredits]), number_format(GetPVarInt(playerid, "VIPPrice")), number_format(PlayerInfo[playerid][pCredits]-GetPVarInt(playerid, "VIPPrice")));
- ShowPlayerDialogEx( playerid, DIALOG_PURCHASEVIP, DIALOG_STYLE_MSGBOX, "Gold VIP Renew", string, "Purchase", "Cancel" );
- }
- if(dialogid == DIALOG_VIPSHOP2 && response)
- {
- switch(listitem)
- {
- case 0:
- {
- new Message[520];
- Message = "Purple VIP name on the forums.\nVIP Forums Access\
- \nVIP Chat\nVIP Garage with access to all the most select cars on the map.\nVIP Lounge\nFirst Aid Station [HP Refills]\nGun Locker \nAbility to get Cannabis and Crack using the jobs without having to wait for refills at the Drug House.";
- strcat(Message, "\nPreferred Pricing on Cars from the Dealership [20% off]\n24/7 VIP Pricing [20% Off]\nFree ATM Use \nFree Checking \nInvites to VIP Only Parties\nMax Hourly Interest Increase: $100k per paycheck");
- ShowPlayerDialogEx(playerid, DIALOG_VIPBRONZE, DIALOG_STYLE_MSGBOX, "Bronze VIP Features" , Message, "Continue", "Cancel" );
- }
- case 1:
- {
- new Message[850];
- Message = "Purple VIP name on the forums. \n\
- VIP Forums Access \n\
- VIP Chat \n\
- VIP Garage with access to all the most select cars on the map. \n\
- VIP Lounge\n\
- First Aid Station [HP Refills] \n\
- Gun Locker \n\
- Ability to get Cannabis and Crack using the jobs without having to wait for refills at the Drug House. \n\
- Preferred Pricing on Cars from the Dealership [20% off] \n\
- 24/7 VIP Pricing [20% Off]";
- strcat(Message, "\nFree ATM Use \n\
- Free Checking \n\
- Invites to VIP Only Parties \n\
- Caller ID \n\
- Ability to have 2 jobs. \n\
- Ability to own 3 additional cars. \n\
- Unrestricted Access to All Skins \n\
- Increased Interest Rate \n\
- Ability to purchase negative phone numbers. \n\
- Ability to purchase one time spawns at the Gold VIP+ room. \n\
- Auto Reply Text Messages \n\
- Priority Advertisements cost $125,000 \n\
- Weekly VIP Buddy Invites* [ability to invite a friend to use VIP Bronze Features for 3 hours]");
- ShowPlayerDialogEx(playerid, DIALOG_VIPSILVER, DIALOG_STYLE_MSGBOX, "Silver VIP Features" , Message, "Continue", "Cancel" );
- }
- case 2:
- {
- new Message[1000];
- Message = "Purple VIP name on the forums. \n\
- VIP Forums Access \n\
- Gold VIP Tag on TS. \n\
- VIP Chat \n\
- VIP Garage with access to all the most select cars on the map. \n\
- VIP Lounge\n\
- First Aid Station [HP Refills] \n\
- Gun Locker \n\
- Ability to get Cannabis and Crack using the jobs without having to wait for refills at the Drug House. \n\
- Preferred Pricing on Cars from the Dealership [20% off] \n\
- Full Health and Hunger after death \n\
- 24/7 VIP Pricing [20% Off]";
- strcat(Message, "\nFree ATM Use \n\
- Free Checking \n\
- Invites to VIP Only Parties \n\
- Caller ID \n\
- Ability to have 3 jobs. \n\
- Ability to own 3 additional cars. \n\
- Unrestricted Access to All Skins \n\
- Increased Interest Rate \n\
- Ability to purchase negative phone numbers. \n\
- Priority Advertisements cost $100,000 \n\
- 10 percent discount on NameChanges \n\
- Auto Reply Text Messages \n\
- Daily VIP Buddy Invites* [ability to invite a friend to use VIP Bronze Features for 3 hours]");
- strcat(Message, "\nx2 Paycheck on Birthday \n\
- One random Gift on Birthday \n\
- 5 Percent discount on House/Gate/Door Moves \n\
- WAR option at Paintball");
- ShowPlayerDialogEx(playerid, DIALOG_VIPGOLD, DIALOG_STYLE_MSGBOX, "Gold VIP Features" , Message, "Continue", "Cancel" );
- }
- }
- }
- if(dialogid == DIALOG_VIPBRONZE && response)
- {
- ShowPlayerDialogEx(playerid, DIALOG_VIPBRONZE2, DIALOG_STYLE_LIST, "Select how many months you wish to renew for.", "1 Month\n2 Months\n3 Months\n4 Months\n5 Months\n6 Months\n7 Months\n8 Months\n9 Months\n10 Months\n11 Months\n1 Year", "Select", "Cancel");
- }
- if(dialogid == DIALOG_VIPBRONZE2 && response)
- {
- new Months = listitem+1;
- SetPVarInt(playerid, "VIPType", 1), SetPVarInt(playerid, "VIPPrice", ShopItems[3][sItemPrice]*Months), SetPVarInt(playerid, "VIPMonths", Months);
- format(string, sizeof(string),"Type: Bronze VIP\nExpires: %d Month(s)\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", listitem+1, number_format(PlayerInfo[playerid][pCredits]), number_format(GetPVarInt(playerid, "VIPPrice")), number_format(PlayerInfo[playerid][pCredits]-GetPVarInt(playerid, "VIPPrice")));
- ShowPlayerDialogEx( playerid, DIALOG_PURCHASEVIP, DIALOG_STYLE_MSGBOX, "Bronze VIP", string, "Purchase", "Cancel" );
- }
- if(dialogid == DIALOG_VIPSILVER && response)
- {
- ShowPlayerDialogEx(playerid, DIALOG_VIPSILVER2, DIALOG_STYLE_LIST, "Select how many months you wish to renew for.", "1 Month\n2 Months\n3 Months\n4 Months\n5 Months\n6 Months\n7 Months\n8 Months\n9 Months\n10 Months\n11 Months\n1 Year", "Select", "Cancel");
- }
- if(dialogid == DIALOG_VIPSILVER2 && response)
- {
- new Months = listitem+1;
- SetPVarInt(playerid, "VIPType", 2), SetPVarInt(playerid, "VIPPrice", ShopItems[2][sItemPrice]*Months), SetPVarInt(playerid, "VIPMonths", Months);
- format(string, sizeof(string),"Type: Silver VIP\nExpires: %d Month(s)\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", listitem+1, number_format(PlayerInfo[playerid][pCredits]), number_format(GetPVarInt(playerid, "VIPPrice")), number_format(PlayerInfo[playerid][pCredits]-GetPVarInt(playerid, "VIPPrice")));
- ShowPlayerDialogEx( playerid, DIALOG_PURCHASEVIP, DIALOG_STYLE_MSGBOX, "Silver VIP", string, "Purchase", "Cancel" );
- }
- if(dialogid == DIALOG_VIPGOLD && response)
- {
- SetPVarInt(playerid, "VIPMonths", 1), SetPVarInt(playerid, "VIPType", 3), SetPVarInt(playerid, "VIPPrice", ShopItems[0][sItemPrice]);
- format(string, sizeof(string),"Type: Gold VIP\nExpires: 1 Month\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(GetPVarInt(playerid, "VIPPrice")), number_format(PlayerInfo[playerid][pCredits]-GetPVarInt(playerid, "VIPPrice")));
- ShowPlayerDialogEx( playerid, DIALOG_PURCHASEVIP, DIALOG_STYLE_MSGBOX, "Gold VIP", string, "Purchase", "Cancel" );
- }
- if(dialogid == DIALOG_PURCHASEVIP)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCredits] < GetPVarInt(playerid, "VIPPrice"))
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- if(PlayerInfo[playerid][pDonateRank] != 0)
- return SendClientMessageEx(playerid, COLOR_GREY, "You already have VIP, please wait for it to expire.");
- if(GetPVarType(playerid, "VIPType") != 1)
- return SendClientMessageEx(playerid, COLOR_GREY, "An error has occured, please try again.");
- PlayerInfo[playerid][pDonateRank] = GetPVarInt(playerid, "VIPType");
- PlayerInfo[playerid][pTempVIP] = 0;
- PlayerInfo[playerid][pBuddyInvited] = 0;
- PlayerInfo[playerid][pVIPSellable] = 0;
- if(PlayerInfo[playerid][pVIPM] == 0)
- {
- PlayerInfo[playerid][pVIPM] = VIPM;
- VIPM++;
- }
- if(GetPVarType(playerid, "VIPMonths"))
- {
- PlayerInfo[playerid][pVIPExpire] = (2592000*GetPVarInt(playerid, "VIPMonths"))+gettime();
- }
- else
- {
- PlayerInfo[playerid][pVIPExpire] = 2592000+gettime();
- }
- GivePlayerCredits(playerid, -GetPVarInt(playerid, "VIPPrice"), 1);
- if(GetPVarInt(playerid, "VIPType") == 3)
- PlayerInfo[playerid][pGVip] = 1;
- new VIPType[7];
- new szQuery[128];
- if(GetPVarType(playerid, "GoldRenewal"))
- {
- AmountSold[1]++;
- AmountMade[1] += GetPVarInt(playerid, "VIPPrice");
- VIPType = "Gold";
- //ShopItems[1][sMade] += GetPVarInt(playerid, "VIPPrice");
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold1` = '%d', `AmountMade1` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[1], AmountMade[1]);
- DeletePVar(playerid, "GoldRenewal");
- }
- else
- {
- switch(GetPVarInt(playerid, "VIPType")) {
- case 1:
- {
- VIPType = "Bronze";
- AmountSold[3]++;
- AmountMade[3] += GetPVarInt(playerid, "VIPPrice");
- //ShopItems[3][sSold]++;
- //ShopItems[3][sMade] += GetPVarInt(playerid, "VIPPrice");
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold3` = '%d', `AmountMade3` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[3], AmountMade[3]);
- }
- case 2:
- {
- VIPType = "Silver";
- AmountSold[2]++;
- AmountMade[2] += GetPVarInt(playerid, "VIPPrice");
- //ShopItems[2][sSold]++;
- //ShopItems[2][sMade] += GetPVarInt(playerid, "VIPPrice");
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold2` = '%d', `AmountMade2` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[2], AmountMade[2]);
- }
- case 3:
- {
- VIPType = "Gold";
- AmountSold[0]++;
- AmountMade[0] += GetPVarInt(playerid, "VIPPrice");
- //ShopItems[0][sSold]++;
- //ShopItems[0][sMade] += GetPVarInt(playerid, "VIPPrice");
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold0` = '%d', `AmountMade0` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[0], AmountMade[0]);
- }
- }
- }
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- format(string, sizeof(string), "You have purchased %s VIP (%d Month(s)) for %s credits.", VIPType,GetPVarInt(playerid, "VIPMonths"), number_format(GetPVarInt(playerid, "VIPPrice")));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- format(string, sizeof(string), "[VIP %i] [User: %s(%i)] [IP: %s] [Credits: %s] [VIP: %s(%d)] [Price: %s]", PlayerInfo[playerid][pVIPM], GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), VIPType,GetPVarInt(playerid, "VIPMonths"), number_format(GetPVarInt(playerid, "VIPPrice")));
- Log("logs/credits.log", string), Log("logs/setvip.log", string), print(string);
- }
- DeletePVar(playerid, "VIPPrice");
- DeletePVar(playerid, "VIPMonths");
- DeletePVar(playerid, "VIPType");
- }
- if(dialogid == DIALOG_SHOPGIFTRESET)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[17][sItemPrice])
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- PlayerInfo[playerid][pGiftTime] = 0;
- GivePlayerCredits(playerid, -ShopItems[17][sItemPrice], 1);
- printf("Price18: %d", ShopItems[17][sItemPrice]);
- format(string, sizeof(string), "You have purchased gift timer reset for %s credits.", number_format(ShopItems[17][sItemPrice]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- AmountSold[17]++;
- AmountMade[17] += ShopItems[17][sItemPrice];
- //ShopItems[17][sSold]++;
- //ShopItems[17][sMade] += ShopItems[17][sItemPrice];
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold17` = '%d', `AmountMade17` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[17], AmountMade[17]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- format(string, sizeof(string), "[GIFTTIMERRESET] [User: %s(%i)] [IP: %s] [Credits: %s] [Gift Timer Reset] [Price: %s]",GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[17][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- }
- }
- if(dialogid == DIALOG_SHOPTOTRESET)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCredits] < 20)
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- PlayerInfo[playerid][pTrickortreat] = 0;
- GivePlayerCredits(playerid, -20, 1);
- format(string, sizeof(string), "You have purchased a Holiday timer reset for %s credits.", number_format(20));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- format(string, sizeof(string), "[GIFTTIMERRESET] [User: %s(%i)] [IP: %s] [Credits: %s] [Special Holiday Timer Reset] [Price: %s]",GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(20));
- Log("logs/zombiecure.log", string), print(string);
- }
- }
- if(dialogid == DIALOG_HALLOWEENSHOP)
- {
- if(response)
- {
- if(listitem == 0)
- {
- format(string, sizeof(string),"Item: Limited Edition Straw Hat\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(150), number_format(PlayerInfo[playerid][pCredits]-150));
- ShowPlayerDialogEx( playerid, DIALOG_HALLOWEENSHOP1, DIALOG_STYLE_MSGBOX, "Thanksgiving Shop", string, "Purchase", "Exit" );
- }
- else
- {
- format(string, sizeof(string),"Item: Limited Edition Cluckin Bell Hat\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(150), number_format(PlayerInfo[playerid][pCredits]-150));
- ShowPlayerDialogEx( playerid, DIALOG_HALLOWEENSHOP2, DIALOG_STYLE_MSGBOX, "Thanksgiving Shop", string, "Purchase", "Exit" );
- }
- }
- }
- if(dialogid == DIALOG_HALLOWEENSHOP1)
- {
- if(response)
- {
- if(PumpkinStock <= 0)
- return SendClientMessageEx(playerid, COLOR_GREY, "This limited item has sold out!");
- if(PlayerInfo[playerid][pCredits] < 150)
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -150, 1);
- PumpkinStock--;
- format(string, sizeof(string), "You have purchased the Straw Hat toy for %s credits.", number_format(150));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- g_mysql_SaveAccount(playerid);
- g_mysql_SaveMOTD();
- format(string, sizeof(string), "[TOYSALE] [User: %s(%i)] [IP: %s] [Credits: %s] [Straw Hat] [Price: %s]",GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(150));
- Log("logs/zombiecure.log", string), print(string);
- new icount = GetPlayerToySlots(playerid);
- for(new v = 0; v < icount; v++)
- {
- if(PlayerToyInfo[playerid][v][ptModelID] == 0)
- {
- PlayerToyInfo[playerid][v][ptModelID] = 19553;
- PlayerToyInfo[playerid][v][ptBone] = 6;
- PlayerToyInfo[playerid][v][ptPosX] = 0.0;
- PlayerToyInfo[playerid][v][ptPosY] = 0.0;
- PlayerToyInfo[playerid][v][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][v][ptRotX] = 0.0;
- PlayerToyInfo[playerid][v][ptRotY] = 0.0;
- PlayerToyInfo[playerid][v][ptRotZ] = 0.0;
- PlayerToyInfo[playerid][v][ptScaleX] = 1.0;
- PlayerToyInfo[playerid][v][ptScaleY] = 1.0;
- PlayerToyInfo[playerid][v][ptScaleZ] = 1.0;
- PlayerToyInfo[playerid][v][ptTradable] = 1;
- g_mysql_NewToy(playerid, v);
- return 1;
- }
- }
- for(new i = 0; i < MAX_PLAYERTOYS; i++)
- {
- if(PlayerToyInfo[playerid][i][ptModelID] == 0)
- {
- PlayerToyInfo[playerid][i][ptModelID] = 19553;
- PlayerToyInfo[playerid][i][ptBone] = 6;
- PlayerToyInfo[playerid][i][ptPosX] = 0.0;
- PlayerToyInfo[playerid][i][ptPosY] = 0.0;
- PlayerToyInfo[playerid][i][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][i][ptRotX] = 0.0;
- PlayerToyInfo[playerid][i][ptRotY] = 0.0;
- PlayerToyInfo[playerid][i][ptRotZ] = 0.0;
- PlayerToyInfo[playerid][i][ptScaleX] = 1.0;
- PlayerToyInfo[playerid][i][ptScaleY] = 1.0;
- PlayerToyInfo[playerid][i][ptScaleZ] = 1.0;
- PlayerToyInfo[playerid][i][ptTradable] = 1;
- PlayerToyInfo[playerid][i][ptSpecial] = 1;
- g_mysql_NewToy(playerid, i);
- SendClientMessageEx(playerid, COLOR_GRAD1, "Due to you not having any available slots, we've temporarily gave you an additional slot to use/sell/trade your toy.");
- SendClientMessageEx(playerid, COLOR_RED, "Note: Please take note that after selling the toy, the temporarily additional toy slot will be removed.");
- break;
- }
- }
- }
- }
- if(dialogid == DIALOG_HALLOWEENSHOP2)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pCredits] < 150)
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- GivePlayerCredits(playerid, -150, 1);
- format(string, sizeof(string), "You have purchased the Cluckin Bell Hat toy for %s credits.", number_format(150));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- g_mysql_SaveAccount(playerid);
- g_mysql_SaveMOTD();
- format(string, sizeof(string), "[TOYSALE] [User: %s(%i)] [IP: %s] [Credits: %s] [Cluckin Bell Hat] [Price: %s]",GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), number_format(60));
- Log("logs/zombiecure.log", string), print(string);
- new icount = GetPlayerToySlots(playerid);
- for(new v = 0; v < icount; v++)
- {
- if(PlayerToyInfo[playerid][v][ptModelID] == 0)
- {
- PlayerToyInfo[playerid][v][ptModelID] = 19137;
- PlayerToyInfo[playerid][v][ptBone] = 5;
- PlayerToyInfo[playerid][v][ptPosX] = 0.0;
- PlayerToyInfo[playerid][v][ptPosY] = 0.0;
- PlayerToyInfo[playerid][v][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][v][ptRotX] = 0.0;
- PlayerToyInfo[playerid][v][ptRotY] = 0.0;
- PlayerToyInfo[playerid][v][ptRotZ] = 0.0;
- PlayerToyInfo[playerid][v][ptScaleX] = 1.0;
- PlayerToyInfo[playerid][v][ptScaleY] = 1.0;
- PlayerToyInfo[playerid][v][ptScaleZ] = 1.0;
- PlayerToyInfo[playerid][v][ptTradable] = 1;
- g_mysql_NewToy(playerid, v);
- return 1;
- }
- }
- for(new i = 0; i < MAX_PLAYERTOYS; i++)
- {
- if(PlayerToyInfo[playerid][i][ptModelID] == 0)
- {
- PlayerToyInfo[playerid][i][ptModelID] = 19137;
- PlayerToyInfo[playerid][i][ptBone] = 5;
- PlayerToyInfo[playerid][i][ptPosX] = 0.0;
- PlayerToyInfo[playerid][i][ptPosY] = 0.0;
- PlayerToyInfo[playerid][i][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][i][ptRotX] = 0.0;
- PlayerToyInfo[playerid][i][ptRotY] = 0.0;
- PlayerToyInfo[playerid][i][ptRotZ] = 0.0;
- PlayerToyInfo[playerid][i][ptScaleX] = 1.0;
- PlayerToyInfo[playerid][i][ptScaleY] = 1.0;
- PlayerToyInfo[playerid][i][ptScaleZ] = 1.0;
- PlayerToyInfo[playerid][i][ptTradable] = 1;
- PlayerToyInfo[playerid][i][ptSpecial] = 1;
- g_mysql_NewToy(playerid, i);
- SendClientMessageEx(playerid, COLOR_GRAD1, "Due to you not having any available slots, we've temporarily gave you an additional slot to use/sell/trade your toy.");
- SendClientMessageEx(playerid, COLOR_RED, "Note: Please take note that after selling the toy, the temporarily additional toy slot will be removed.");
- break;
- }
- }
- }
- }
- if(dialogid == DIALOG_SHOPNEON && response)
- {
- switch(listitem)
- {
- case 0: SetPVarInt(playerid, "ToyID", 18647);
- case 1: SetPVarInt(playerid, "ToyID", 18648);
- case 2: SetPVarInt(playerid, "ToyID", 18649);
- case 3: SetPVarInt(playerid, "ToyID", 18650);
- case 4: SetPVarInt(playerid, "ToyID", 18651);
- case 5: SetPVarInt(playerid, "ToyID", 18652);
- }
- new stringg[512], icount = GetPlayerToySlots(playerid);
- for(new z;z<icount;z++)
- {
- new name[24];
- format(name, sizeof(name), "None");
- for(new i;i<sizeof(HoldingObjectsAll);i++)
- {
- if(HoldingObjectsAll[i][holdingmodelid] == PlayerToyInfo[playerid][z][ptModelID])
- {
- format(name, sizeof(name), "%s", HoldingObjectsAll[i][holdingmodelname]);
- }
- }
- format(stringg, sizeof(stringg), "%s(%d) %s (Bone: %s)\n", stringg, z, name, HoldingBones[PlayerToyInfo[playerid][z][ptBone]]);
- }
- ShowPlayerDialogEx(playerid, DIALOG_SHOPBUYTOYS, DIALOG_STYLE_LIST, "Select a Slot", stringg, "Select", "Cancel");
- }
- if(dialogid == DIALOG_SHOPBUYTOYS && response)
- {
- new name[24];
- for(new i;i<sizeof(HoldingObjectsShop);i++)
- {
- if(HoldingObjectsShop[i][holdingmodelid] == GetPVarInt(playerid, "ToyID"))
- {
- format(name, sizeof(name), "%s", HoldingObjectsShop[i][holdingmodelname]);
- }
- }
- format(string, sizeof(string), "Item: %s\n\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", name, number_format(PlayerInfo[playerid][pCredits]),number_format(ShopItems[4][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[4][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_SHOPBUYTOYS2, DIALOG_STYLE_MSGBOX, "Toy Shop", string, "Purchase", "Cancel");
- SetPVarInt(playerid, "ToySlot", listitem);
- }
- if((dialogid == DIALOG_SHOPBUYTOYS2) && response)
- {
- if(PlayerInfo[playerid][pCredits] < ShopItems[4][sItemPrice])
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits for that item. Purchase some credits at shop.ng-gaming.net");
- }
- else
- {
- if(!toyCountCheck(playerid)) return SendClientMessageEx(playerid, COLOR_GRAD1, "You do not have enough toy slots, you may purchase more via /toys");
- if(PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptModelID] != 0) return SendClientMessageEx(playerid, COLOR_YELLOW, "* You already have something in that slot. Delete it with /toys");
- new name[24];
- for(new i;i<sizeof(HoldingObjectsShop);i++)
- {
- if(HoldingObjectsShop[i][holdingmodelid] == GetPVarInt(playerid, "ToyID"))
- {
- format(name, sizeof(name), "%s", HoldingObjectsShop[i][holdingmodelname]);
- }
- }
- GivePlayerCredits(playerid, -ShopItems[4][sItemPrice], 1);
- printf("Price4: %d", ShopItems[4][sItemPrice]);
- AmountSold[4]++;
- AmountMade[4] += ShopItems[4][sItemPrice];
- //ShopItems[4][sSold]++;
- //ShopItems[4][sMade] += ShopItems[4][sItemPrice];
- new szQuery[1024];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSold4` = '%d', `AmountMade4` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[4], AmountMade[4]);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- format(string, sizeof(string), "[TOY %i] [User: %s(%i)] [IP: %s] [Credits: %s] [Toy: %s] [Price: %s]", AmountSold[4], GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), name, number_format(ShopItems[4][sItemPrice]));
- Log("logs/credits.log", string), print(string);
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptModelID] = GetPVarInt(playerid, "ToyID");
- new modelid = GetPVarInt(playerid, "ToyID");
- if((modelid >= 19006 && modelid <= 19035) || (modelid >= 19138 && modelid <= 19140))
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.9;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.35;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else if(modelid >= 18891 && modelid <= 18910)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.15;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 90.0;
- }
- else if(modelid >= 18926 && modelid <= 18935)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.1;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else if(modelid >= 18911 && modelid <= 18920)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.1;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.035;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 90.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 90.0;
- }
- else if(modelid == 19078 || modelid == 19078)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 16;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 180.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else if((modelid >= 18641 && modelid <= 18644) || (modelid >= 19080 && modelid <= 19084) || modelid == 18890)
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 6;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- else
- {
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptBone] = 2;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptPosZ] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotX] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotY] = 0.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptRotZ] = 0.0;
- }
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptScaleX] = 1.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptScaleY] = 1.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptScaleZ] = 1.0;
- PlayerToyInfo[playerid][GetPVarInt(playerid, "ToySlot")][ptTradable] = 1;
- g_mysql_NewToy(playerid, GetPVarInt(playerid, "ToySlot"));
- format(string, sizeof(string), "You have purchased %s for %s credits. (Slot: %d)", name, number_format(ShopItems[4][sItemPrice]), GetPVarInt(playerid, "ToySlot"));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_WHITE, "HINT: Use /toys to wear/edit this");
- DeletePVar(playerid, "ToyID"), DeletePVar(playerid, "ToySlot");
- }
- }
- if(dialogid == DIALOG_SELLCREDITS)
- {
- if(response)
- {
- if(GetPVarInt(GetPVarInt(playerid, "CreditsSeller"), "CreditsSeller") != playerid)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "The other player has disconnected please try again.");
- DeletePVar(playerid, "CreditsOffer");
- DeletePVar(playerid, "CreditsAmount");
- DeletePVar(playerid, "CreditsSeller");
- DeletePVar(playerid, "CreditsFirstAmount");
- return 1;
- }
- if(PlayerInfo[GetPVarInt(playerid, "CreditsSeller")][pCredits] < GetPVarInt(playerid, "CreditsAmount"))
- {
- SendClientMessageEx(playerid, COLOR_GREY, "The seller didn't have enough credits.");
- SendClientMessageEx(GetPVarInt(playerid, "CreditsSeller"), COLOR_GREY, "You don't have enough credits.");
- DeletePVar(playerid, "CreditsOffer");
- DeletePVar(playerid, "CreditsAmount");
- DeletePVar(playerid, "CreditsSeller");
- DeletePVar(playerid, "CreditsFirstAmount");
- return 1;
- }
- if(GetPlayerCash(playerid) < GetPVarInt(playerid, "CreditsOffer"))
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough money to accept the offer.");
- SendClientMessageEx(GetPVarInt(playerid, "CreditsSeller"), COLOR_GREY, "That player does not have enough money to accept your offer.");
- DeletePVar(playerid, "CreditsOffer");
- DeletePVar(playerid, "CreditsAmount");
- DeletePVar(playerid, "CreditsSeller");
- DeletePVar(playerid, "CreditsFirstAmount");
- return 1;
- }
- new szMessage[156];
- GivePlayerCash(playerid, -GetPVarInt(playerid, "CreditsOffer"));
- GivePlayerCash(GetPVarInt(playerid, "CreditsSeller"), GetPVarInt(playerid, "CreditsOffer"));
- GivePlayerCredits(playerid, GetPVarInt(playerid, "CreditsAmount"), 0);
- GivePlayerCredits(GetPVarInt(playerid, "CreditsSeller"), -GetPVarInt(playerid, "CreditsFirstAmount"), 0);
- AmountSold[21]++;
- AmountMade[21] += GetPVarInt(playerid, "CreditsFirstAmount")-GetPVarInt(playerid, "CreditsAmount");
- //ShopItems[21][sSold]++;
- //ShopItems[21][sMade] += GetPVarInt(playerid, "CreditsFirstAmount")-GetPVarInt(playerid, "CreditsAmount");
- mysql_format(MainPipeline, szMessage, sizeof(szMessage), "UPDATE `sales` SET `TotalSold21` = '%d', `AmountMade21` = '%d' WHERE `Month` > NOW() - INTERVAL 1 MONTH", AmountSold[21], AmountMade[21]);
- mysql_tquery(MainPipeline, szMessage, "OnQueryFinish", "i", SENDDATA_THREAD);
- print(szMessage);
- format(szMessage, sizeof(szMessage), "You have accepted the offer of %s credits for $%s from %s.", number_format(GetPVarInt(playerid, "CreditsAmount")), number_format(GetPVarInt(playerid, "CreditsOffer")), GetPlayerNameEx(GetPVarInt(playerid, "CreditsSeller")));
- SendClientMessageEx(playerid, COLOR_CYAN, szMessage);
- format(szMessage, sizeof(szMessage), "%s has accepted your offer of %s credits for $%s.", GetPlayerNameEx(playerid), number_format(GetPVarInt(playerid, "CreditsAmount")), number_format(GetPVarInt(playerid, "CreditsOffer")));
- SendClientMessageEx(GetPVarInt(playerid, "CreditsSeller"), COLOR_CYAN, szMessage);
- format(szMessage, sizeof(szMessage), "[S %s(%d)][IP %s][B %s(%d)][IP %s][C %s][P $%s]", GetPlayerNameEx(GetPVarInt(playerid, "CreditsSeller")),GetPlayerSQLId(GetPVarInt(playerid, "CreditsSeller")), GetPlayerIpEx(GetPVarInt(playerid, "CreditsSeller")),
- GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(GetPVarInt(playerid, "CreditsAmount")), number_format(GetPVarInt(playerid, "CreditsOffer")));
- Log("logs/sellcredits.log", szMessage), print(szMessage);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You have declined the credits offer.");
- SendClientMessageEx(GetPVarInt(playerid, "CreditsSeller"), COLOR_GREY, "Your credits offer has been declined.");
- }
- DeletePVar(playerid, "CreditsOffer");
- DeletePVar(playerid, "CreditsAmount");
- DeletePVar(playerid, "CreditsSeller");
- DeletePVar(playerid, "CreditsFirstAmount");
- }
- if(dialogid == DIALOG_TACKLED)
- {
- if(response) // complying
- {
- SetPVarInt(playerid, "TackledResisting", 1);
- }
- else // resisting
- {
- SetPVarInt(playerid, "TackledResisting", 2);
- format(string, sizeof(string), "** %s struggles with %s, attempting to escape.", GetPlayerNameEx(playerid), GetPlayerNameEx(GetPVarInt(playerid, "IsTackled")));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- }
- if(dialogid == DIALOG_RIMMOD)
- {
- if(response)
- {
- new szRims[24];
- switch(listitem)
- {
- case 0: SetPVarInt(playerid, "RimMod", 1025), szRims = "Offroad";
- case 1: SetPVarInt(playerid, "RimMod", 1073), szRims = "Shadow";
- case 2: SetPVarInt(playerid, "RimMod", 1074), szRims = "Mega";
- case 3: SetPVarInt(playerid, "RimMod", 1075), szRims = "Rimshine";
- case 4: SetPVarInt(playerid, "RimMod", 1076), szRims = "Wires";
- case 5: SetPVarInt(playerid, "RimMod", 1077), szRims = "Classic";
- case 6: SetPVarInt(playerid, "RimMod", 1078), szRims = "Twist";
- case 7: SetPVarInt(playerid, "RimMod", 1079), szRims = "Cutter";
- case 8: SetPVarInt(playerid, "RimMod", 1080), szRims = "Switch";
- case 9: SetPVarInt(playerid, "RimMod", 1081), szRims = "Grove";
- case 10: SetPVarInt(playerid, "RimMod", 1082), szRims = "Import";
- case 11: SetPVarInt(playerid, "RimMod", 1083), szRims = "Dollar";
- case 12: SetPVarInt(playerid, "RimMod", 1084), szRims = "Trance";
- case 13: SetPVarInt(playerid, "RimMod", 1085), szRims = "Atomic";
- case 14: SetPVarInt(playerid, "RimMod", 1096), szRims = "Ahab";
- case 15: SetPVarInt(playerid, "RimMod", 1097), szRims = "Virtual";
- case 16: SetPVarInt(playerid, "RimMod", 1098), szRims = "Access";
- }
- new szMessage[128];
- format(szMessage, 128, "You are about to place %s rims on this vehicle.", szRims);
- ShowPlayerDialogEx(playerid, DIALOG_RIMMOD2, DIALOG_STYLE_MSGBOX, "Confirm Rims", szMessage, "Confirm", "Deny");
- }
- }
- if(dialogid == DIALOG_RIMMOD2)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pRimMod] == 0)
- return SendClientMessageEx(playerid, COLOR_GREY, "You don't have any rim modification kits.");
- if(IsRestrictedVehicle(GetVehicleModel(GetPlayerVehicleID(playerid)))) return SendClientMessageEx(playerid, COLOR_GREY, "This vehicle cannot have rims applied to it");
- if(InvalidModCheck(GetVehicleModel(GetPlayerVehicleID(playerid)), 1025))
- {
- for(new d = 0 ; d < MAX_PLAYERVEHICLES; d++)
- {
- if(IsPlayerInVehicle(playerid, PlayerVehicleInfo[playerid][d][pvId]))
- {
- new szLog[128];
- format(szLog, sizeof(szLog), "%s(%d) has modded his vehicle with rims %d", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPVarInt(playerid, "RimMod"));
- Log("logs/rimkit.log", szLog);
- SendClientMessageEx(playerid, COLOR_GREEN, "You have successfully installed rims.");
- PlayerInfo[playerid][pRimMod]--;
- AddVehicleComponent(GetPlayerVehicleID(playerid), GetPVarInt(playerid, "RimMod"));
- DeletePVar(playerid, "RimMod");
- UpdatePlayerVehicleMods(playerid, d);
- return 1;
- }
- }
- SendClientMessageEx(playerid, COLOR_GREY, "You need to be in your vehicle.");
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "That vehicle can't be modded with rims.");
- }
- }
- }
- if(dialogid == DIALOG_PVIPVOUCHER)
- {
- if(response)
- {
- PlayerInfo[playerid][pPVIPVoucher]--;
- PlayerInfo[playerid][pTotalCredits] = ShopItems[21][sItemPrice];
- PlayerInfo[playerid][pDonateRank] = 4;
- PlayerInfo[playerid][pVIPExpire] = gettime()+2592000*1;
- PlayerInfo[playerid][pTempVIP] = 0;
- PlayerInfo[playerid][pBuddyInvited] = 0;
- PlayerInfo[playerid][pVIPSellable] = 1;
- LoadPlayerDisabledVehicles(playerid);
- if(PlayerInfo[playerid][pVIPM] == 0)
- {
- PlayerInfo[playerid][pVIPM] = VIPM;
- VIPM++;
- }
- format(string, sizeof(string), "%s(%d) (IP: %s) has used a 1 month PVIP Voucher.", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid));
- Log("logs/credits.log", string);
- format(string, sizeof(string), "AdmCmd: %s's VIP level to Platinum (4) by the server (1 Month)(voucher).", GetPlayerNameEx(playerid));
- ABroadCast(COLOR_LIGHTRED, string, 2);
- format(string, sizeof(string), "AdmCmd: %s's(%d) VIP level to Platinum (4) by the server (1 Month)(voucher).", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid));
- Log("logs/setvip.log", string), Log("logs/vouchers.log", string);
- format(string, sizeof(string), "You have been issued your Platinum VIP and have %d PVIP Voucher(s) left.", PlayerInfo[playerid][pPVIPVoucher]);
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- SendClientMessageEx(playerid, COLOR_CYAN, "** Your 1 month PVIP Voucher will expire in 1 Month.");
- PlayerInfo[playerid][pArmsSkill] = 1200;
- new szQuery[128];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `accounts` SET `TotalCredits`=%d WHERE `id` = %d", PlayerInfo[playerid][pTotalCredits], GetPlayerSQLId(playerid));
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "ii", SENDDATA_THREAD, playerid);
- }
- }
- if(dialogid == GIVETOY)
- {
- if(response)
- {
- new giveplayerid = GetPVarInt(playerid, "giveplayeridtoy"),
- toyid = GetPVarInt(playerid, "toyid"),
- stringg[128];
- if(!toyCountCheck(giveplayerid)) return SendClientMessageEx(playerid, COLOR_YELLOW, "* This player cannot hold anymore toys!");
- if(PlayerToyInfo[giveplayerid][listitem][ptModelID] != 0) return SendClientMessageEx(playerid, COLOR_YELLOW, "* This player already has something in that specified slot!");
- PlayerToyInfo[giveplayerid][listitem][ptModelID] = toyid;
- PlayerToyInfo[giveplayerid][listitem][ptBone] = 1;
- PlayerToyInfo[giveplayerid][listitem][ptTradable] = 1;
- PlayerToyInfo[giveplayerid][listitem][ptSpecial] = 0;
- format(stringg, sizeof(stringg), "You have given %s object %d", GetPlayerNameEx(giveplayerid), toyid);
- SendClientMessageEx(playerid, COLOR_YELLOW, stringg);
- SendClientMessageEx(giveplayerid, COLOR_WHITE, "You have received a new toy from an administrator!");
- format(stringg, sizeof(stringg), "%s has given %s(%d) object %d", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), toyid);
- Log("logs/toys.log", stringg);
- DeletePVar(playerid, "giveplayeridtoy");
- DeletePVar(playerid, "toyid");
- new v = listitem; // lazy
- g_mysql_NewToy(giveplayerid, v);
- }
- }
- if(dialogid == PBFORCE)
- {
- new giveplayerid = GetPVarInt(playerid, "tempPBP");
- DeletePVar(playerid, "tempPSP");
- if(response)
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(GetPVarType(giveplayerid, "IsInArena"))
- {
- LeavePaintballArena(giveplayerid, GetPVarInt(giveplayerid, "IsInArena"));
- format(string, sizeof(string), "You have forced %s out of paintball. You may now teleport this player.", GetPlayerNameEx(giveplayerid));
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "You have been forced out of paintball by %s.", GetPlayerNameEx(playerid));
- SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "This user is not in an active paintball match.");
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "This user has logged off.");
- }
- }
- }
- else
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%s will remain in the paintball match.", GetPlayerNameEx(giveplayerid));
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "This user has logged off.");
- }
- }
- }
- }
- if(dialogid == DISPLAY_STATS)
- {
- new targetid = GetPVarInt(playerid, "ShowStats");
- if(IsPlayerConnected(targetid))
- {
- if(response)
- {
- new resultline[1024], header[64], pvtstring[256], adminstring[128], advisorstring[128];
- if (PlayerInfo[playerid][pAdmin] >= 2)
- {
- format(pvtstring, sizeof(pvtstring), "House: %d\nHouse 2: %d\nHouse 3: %d\nRenting: %d\nInt: %d\nVW: %d\nReal VW: %d\nJail: %d sec\nWJail: %d sec\nVIPM: %i\nGVIP: %i\nReward Hours: %.2f\n", PlayerInfo[targetid][pPhousekey], PlayerInfo[targetid][pPhousekey2], PlayerInfo[targetid][pPhousekey3], PlayerInfo[targetid][pRenting],
- GetPlayerInterior(targetid), PlayerInfo[targetid][pVW], GetPlayerVirtualWorld(targetid), PlayerInfo[targetid][pJailTime], PlayerInfo[targetid][pBeingSentenced], PlayerInfo[targetid][pVIPM], PlayerInfo[targetid][pGVip], PlayerInfo[targetid][pRewardHours]);
- }
- if(PlayerInfo[playerid][pAdmin] >= 4 && PlayerInfo[targetid][pAdmin] >= 2) format(adminstring, sizeof(adminstring), "Accepted Reports: %s\nTrashed Reports: %s\n", number_format(PlayerInfo[targetid][pAcceptReport]), number_format(PlayerInfo[targetid][pTrashReport]));
- if((PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pPR] >= 1 || PlayerInfo[playerid][pASM] >= 1) && PlayerInfo[targetid][pHelper] >= 2) format(advisorstring, sizeof(advisorstring), "Hours on Duty: %s\nAccepted Help Requests: %s\n", number_format(PlayerInfo[targetid][pDutyHours]), number_format(PlayerInfo[targetid][pAcceptedHelp]));
- format(header, sizeof(header), "Showing Statistics of %s", GetPlayerNameEx(targetid));
- format(resultline, sizeof(resultline),"{FFFFFF}Wanted Level: %d\n\
- Crimes: %s\n\
- Arrests: %s\n\
- Referrals: %s\n\
- Warnings: %s\n\
- Weapon Restriction: %s hour(s)\n\
- Gang Warnings: %s\n\
- Newbie Chat Mutes: %s\n\
- Advertisement Mutes: %s\n\
- Report Mutes: %s\n\
- %s\
- %s\
- %s",
- PlayerInfo[targetid][pWantedLevel],
- number_format(PlayerInfo[targetid][pCrimes]),
- number_format(PlayerInfo[targetid][pArrested]),
- number_format(PlayerInfo[targetid][pRefers]),
- number_format(PlayerInfo[targetid][pWarns]),
- number_format(PlayerInfo[targetid][pWRestricted]),
- number_format(PlayerInfo[targetid][pGangWarn]),
- number_format(PlayerInfo[targetid][pNMuteTotal]),
- number_format(PlayerInfo[targetid][pADMuteTotal]),
- number_format(PlayerInfo[targetid][pRMutedTotal]),
- pvtstring,
- advisorstring,
- adminstring);
- ShowPlayerDialogEx(playerid, DISPLAY_STATS2, DIALOG_STYLE_MSGBOX, header, resultline, "First Page", "Close");
- }
- else DeletePVar(playerid, "ShowStats");
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "The player you were checking has logged out.");
- DeletePVar(playerid, "ShowStats");
- return 1;
- }
- }
- if(dialogid == DISPLAY_STATS2)
- {
- new targetid = GetPVarInt(playerid, "ShowStats");
- if(IsPlayerConnected(targetid))
- {
- if(response)
- {
- ShowStats(playerid, targetid);
- }
- else DeletePVar(playerid, "ShowStats");
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "The player you were checking has logged out.");
- DeletePVar(playerid, "ShowStats");
- return 1;
- }
- }
- #if defined event_chancegambler
- if(dialogid == DIALOG_ROLL)
- {
- if(response)
- {
- if(FIFEnabled == 1)
- {
- new iNumber = Random(1, 11);
- if(iNumber > 4)
- {
- new szMessage[128];
- format(szMessage, sizeof(szMessage), "You have rolled %d and doubled your chances!", iNumber);
- SendClientMessageEx(playerid, COLOR_CYAN, szMessage);
- format(szMessage, sizeof(szMessage), "* %s has rolled %d and doubled his chances!", GetPlayerNameEx(playerid), iNumber);
- ProxDetector(30.0, playerid, szMessage, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- FIFInfo[playerid][FIFChances] *= 2;
- format(szMessage, sizeof(szMessage), "%s (IP:%s) has doubled their chances. (Chances: %d)", GetPlayerNameEx(playerid), GetPlayerIpEx(playerid), FIFInfo[playerid][FIFChances]);
- Log("logs/gamblechances.log", szMessage);
- }
- else
- {
- new szMessage[128];
- format(szMessage, sizeof(szMessage), "* %s has rolled %d and lost it all!", GetPlayerNameEx(playerid), iNumber);
- ProxDetector(30.0, playerid, szMessage, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- format(szMessage, sizeof(szMessage), "You have rolled %d and lost it all!", iNumber);
- SendClientMessageEx(playerid, COLOR_CYAN, szMessage);
- FIFInfo[playerid][FIFChances] = 0;
- format(szMessage, sizeof(szMessage), "%s (IP:%s) has lost it all. (Chances: %d)", GetPlayerNameEx(playerid), GetPlayerIpEx(playerid), FIFInfo[playerid][FIFChances]);
- Log("logs/gamblechances.log", szMessage);
- }
- }
- }
- }
- if(dialogid == DIALOG_HUNGERGAMES)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pHungerVoucher] == 0) return SendClientMessageEx(playerid, COLOR_GRAD1, "You do not have any Hunger Games Vouchers.");
- SendClientMessageEx(playerid, COLOR_CYAN, "You have used a Hunger Games Voucher and will have 100 HP instead of 50 for the event and will receive a free MP5.");
- PlayerInfo[playerid][pHungerVoucher]--;
- SetPVarInt(playerid, "HungerVoucher", 1);
- }
- }
- #endif
- if(dialogid == DIALOG_NRNCONFIRM)
- {
- if(response)
- {
- new playersz[5];
- GetPVarString(playerid, "nrn", playersz, 5);
- DeletePVar(playerid, "nrn");
- cmd_nrn(playerid, playersz);
- }
- else
- {
- DeletePVar(playerid, "nrn");
- }
- }
- if(dialogid == DIALOG_CONFIRMADP)
- {
- if(response)
- {
- new advert[256], reportid = GetPVarInt(playerid, "ReporterID");
- new szString[128], shared;
- GetPVarString(reportid, "PriorityAdText", advert, 128);
- if(isnull(advert) || !IsPlayerConnected(reportid))
- {
- DeletePVar(playerid, "ReporterID");
- DeletePVar(reportid, "PriorityAdText");
- DeletePVar(reportid, "RequestingAdP");
- DeletePVar(reportid, "AdvertVoucher");
- return SendClientMessageEx(playerid, -1, "There was a issue with the advertisement, the ad was empty and/or the player logged out.");
- }
- // Do not comment this out! This is needed to re-format the ad with the proper format - Nathan
- format(advert, sizeof(advert), "Advertisement: %s - contact: %s (%d)", advert, GetPlayerNameEx(reportid), PlayerInfo[reportid][pPnumber]);
- SendClientMessageEx(reportid, -1, "Your Priority Advertisement has been approved & published.");
- if(GetPVarInt(reportid, "AdvertVoucher") > 0)
- {
- SendClientMessageEx(reportid, COLOR_CYAN, "You have used 1 Priority Advertisement.");
- PlayerInfo[reportid][pAdvertVoucher]--;
- }
- else if(PlayerInfo[reportid][pFreeAdsLeft] > 0 && PlayerInfo[reportid][pDonateRank] >= 4)
- {
- PlayerInfo[reportid][pFreeAdsLeft]--;
- format(szString, sizeof(szString), "Platinum VIP: You have used a free advertisement, you have %d left for today.", PlayerInfo[reportid][pFreeAdsLeft]);
- SendClientMessageEx(reportid, COLOR_YELLOW, szString);
- }
- else if(PlayerInfo[reportid][pDonateRank] == 2)
- {
- GivePlayerCash(reportid, -125000);
- shared = 125000 / 3;
- SendClientMessageEx(reportid, COLOR_YELLOW, "VIP Discount: You have paid $125,000 for being Silver VIP.");
- }
- else if(PlayerInfo[reportid][pDonateRank] == 3)
- {
- GivePlayerCash(reportid, -100000);
- shared = 100000 / 3;
- SendClientMessageEx(reportid, COLOR_YELLOW, "VIP Discount: You have paid $100,000 for being Gold VIP.");
- }
- else if(PlayerInfo[reportid][pDonateRank] >= 4)
- {
- GivePlayerCash(reportid, -50000);
- shared = 50000 / 3;
- SendClientMessageEx(reportid, COLOR_YELLOW, "VIP Discount: You have paid $50,000 for being Platinum VIP.");
- }
- else
- {
- GivePlayerCash(reportid, -150000);
- shared = 150000 / 3;
- }
- iAdverTimer = gettime()+30;
- if(shared > 0)
- {
- for(new x; x < MAX_GROUPS; x++)
- {
- if(arrGroupData[x][g_iGroupType] == GROUP_TYPE_NEWS)
- {
- arrGroupData[x][g_iBudget] += shared;
- }
- }
- }
- foreach(new i: Player)
- {
- if(!gNews[i] && InsideMainMenu{i} != 1 && InsideTut{i} != 1 && ActiveChatbox[i] != 0) SendClientMessage(i, TEAM_GROVE_COLOR, advert);
- }
- format(advert, sizeof(advert), "%s -- (SQLID: %d) | Accepted by: %s -- (SQLID: %d)", advert, GetPlayerSQLId(reportid), GetPlayerNameEx(playerid), GetPlayerSQLId(playerid));
- Log("logs/pads.log", advert);
- /*if(Homes[reportid] > 0 && AdvertType[reportid] == 1 && !PlayerInfo[playerid][pShopNotice])
- {
- PlayerTextDrawSetString(reportid, MicroNotice[reportid], ShopMsg[6]);
- PlayerTextDrawShow(reportid, MicroNotice[reportid]);
- SetTimerEx("HidePlayerTextDraw", 10000, false, "ii", reportid, _:MicroNotice[reportid]);
- }*/
- DeletePVar(reportid, "PriorityAdText");
- DeletePVar(playerid, "ReporterID");
- DeletePVar(reportid, "RequestingAdP");
- DeletePVar(reportid, "AdvertVoucher");
- }
- else
- {
- SendClientMessageEx(GetPVarInt(playerid, "ReporterID"), -1, "Your priority advertisement has been denied.");
- szAdvert[GetPVarInt(playerid, "ReporterID")][0] = 0;
- DeletePVar(GetPVarInt(playerid, "ReporterID"), "PriorityAdText");
- DeletePVar(GetPVarInt(playerid, "ReporterID"), "AdvertVoucher");
- DeletePVar(GetPVarInt(playerid, "ReporterID"), "RequestingAdP");
- DeletePVar(playerid, "ReporterID");
- }
- }
- if(dialogid == DIALOG_GIFTBOX_INFO)
- {
- if(response)
- {
- return ShowPlayerDynamicGiftBox(playerid);
- }
- }
- if(dialogid == DIALOG_GIFTBOX_VIEW)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pAdmin] < 99999 && PlayerInfo[playerid][pShopTech] < 3) return SendClientMessageEx(playerid, COLOR_GRAD1, "You're not authorized to use this command!");
- switch(listitem)
- {
- case 1:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgMoney][0], dgVar[dgMoney][1], dgVar[dgMoney][2], GetDynamicGiftBoxType(dgVar[dgMoney][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Money", string, "Back", "");
- }
- case 2:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgRimKit][0], dgVar[dgRimKit][1], dgVar[dgRimKit][2], GetDynamicGiftBoxType(dgVar[dgRimKit][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Rimkit", string, "Back", "");
- }
- case 3:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgFirework][0], dgVar[dgFirework][1], dgVar[dgFirework][2], GetDynamicGiftBoxType(dgVar[dgFirework][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Firework", string, "Back", "");
- }
- case 4:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgGVIP][0], dgVar[dgGVIP][1], dgVar[dgGVIP][2], GetDynamicGiftBoxType(dgVar[dgGVIP][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - 7 Day GVIP", string, "Back", "");
- }
- case 5:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgGVIPEx][0], dgVar[dgGVIPEx][1], dgVar[dgGVIPEx][2], GetDynamicGiftBoxType(dgVar[dgGVIPEx][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - 1 Month GVIP", string, "Back", "");
- }
- case 6:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgSVIP][0], dgVar[dgSVIP][1], dgVar[dgSVIP][2], GetDynamicGiftBoxType(dgVar[dgSVIP][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - 7 Day SVIP", string, "Back", "");
- }
- case 7:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgSVIPEx][0], dgVar[dgSVIPEx][1], dgVar[dgSVIPEx][2], GetDynamicGiftBoxType(dgVar[dgSVIPEx][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - 1 Month SVIP", string, "Back", "");
- }
- case 8:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgCarSlot][0], dgVar[dgCarSlot][1], dgVar[dgCarSlot][2], GetDynamicGiftBoxType(dgVar[dgCarSlot][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Car Slot", string, "Back", "");
- }
- case 9:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgToySlot][0], dgVar[dgToySlot][1], dgVar[dgToySlot][2], GetDynamicGiftBoxType(dgVar[dgToySlot][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Toy Slot", string, "Back", "");
- }
- case 10:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgArmor][0], dgVar[dgArmor][1], dgVar[dgArmor][2], GetDynamicGiftBoxType(dgVar[dgArmor][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Armor", string, "Back", "");
- }
- case 11:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgFirstaid][0], dgVar[dgFirstaid][1], dgVar[dgFirstaid][2], GetDynamicGiftBoxType(dgVar[dgFirstaid][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Firstaid", string, "Back", "");
- }
- case 12:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgDDFlag][0], dgVar[dgDDFlag][1], dgVar[dgDDFlag][2], GetDynamicGiftBoxType(dgVar[dgDDFlag][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Dynamic Door Flag", string, "Back", "");
- }
- case 13:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgGateFlag][0], dgVar[dgGateFlag][1], dgVar[dgGateFlag][2], GetDynamicGiftBoxType(dgVar[dgGateFlag][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Dynamic Gate Flag", string, "Back", "");
- }
- case 14:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgCredits][0], dgVar[dgCredits][1], dgVar[dgCredits][2], GetDynamicGiftBoxType(dgVar[dgCredits][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Credits", string, "Back", "");
- }
- case 15:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgPriorityAd][0], dgVar[dgPriorityAd][1], dgVar[dgPriorityAd][2], GetDynamicGiftBoxType(dgVar[dgPriorityAd][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Priority Advertisement", string, "Back", "");
- }
- case 16:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgHealthNArmor][0], dgVar[dgHealthNArmor][1], dgVar[dgHealthNArmor][2], GetDynamicGiftBoxType(dgVar[dgHealthNArmor][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Health & Armor", string, "Back", "");
- }
- case 17:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgGiftReset][0], dgVar[dgGiftReset][1], dgVar[dgGiftReset][2], GetDynamicGiftBoxType(dgVar[dgGiftReset][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Gift Reset", string, "Back", "");
- }
- case 18:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgMaterial][0], dgVar[dgMaterial][1], dgVar[dgMaterial][2], GetDynamicGiftBoxType(dgVar[dgMaterial][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Material", string, "Back", "");
- }
- case 19:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgWarning][0], dgVar[dgWarning][1], dgVar[dgWarning][2], GetDynamicGiftBoxType(dgVar[dgWarning][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Warning", string, "Back", "");
- }
- case 20:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgPot][0], dgVar[dgPot][1], dgVar[dgPot][2], GetDynamicGiftBoxType(dgVar[dgPot][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Cannabis", string, "Back", "");
- }
- case 21:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgCrack][0], dgVar[dgCrack][1], dgVar[dgCrack][2], GetDynamicGiftBoxType(dgVar[dgCrack][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Crack", string, "Back", "");
- }
- case 22:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgPaintballToken][0], dgVar[dgPaintballToken][1], dgVar[dgPaintballToken][2], GetDynamicGiftBoxType(dgVar[dgPaintballToken][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Paintball Token", string, "Back", "");
- }
- case 23:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgVIPToken][0], dgVar[dgVIPToken][1], dgVar[dgVIPToken][2], GetDynamicGiftBoxType(dgVar[dgVIPToken][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - VIP Token", string, "Back", "");
- }
- case 24:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgRespectPoint][0], dgVar[dgRespectPoint][1], dgVar[dgRespectPoint][2], GetDynamicGiftBoxType(dgVar[dgRespectPoint][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Respect Point", string, "Back", "");
- }
- case 25:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgCarVoucher][0], dgVar[dgCarVoucher][1], dgVar[dgCarVoucher][2], GetDynamicGiftBoxType(dgVar[dgCarVoucher][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Car Voucher", string, "Back", "");
- }
- case 26:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgBuddyInvite][0], dgVar[dgBuddyInvite][1], dgVar[dgBuddyInvite][2], GetDynamicGiftBoxType(dgVar[dgBuddyInvite][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Buddy Invite", string, "Back", "");
- }
- case 27:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgLaser][0], dgVar[dgLaser][1], dgVar[dgLaser][2], GetDynamicGiftBoxType(dgVar[dgLaser][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Laser", string, "Back", "");
- }
- case 28:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nToy ID: %d\nGift Type: %s", dgVar[dgCustomToy][0], dgVar[dgCustomToy][1], dgVar[dgCustomToy][2], GetDynamicGiftBoxType(dgVar[dgCustomToy][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Custom Toy", string, "Back", "");
- }
- case 29:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgAdmuteReset][0], dgVar[dgAdmuteReset][1], dgVar[dgAdmuteReset][2], GetDynamicGiftBoxType(dgVar[dgAdmuteReset][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Advertisement Mute Reset", string, "Back", "");
- }
- case 30:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgNewbieMuteReset][0], dgVar[dgNewbieMuteReset][1], dgVar[dgNewbieMuteReset][2], GetDynamicGiftBoxType(dgVar[dgNewbieMuteReset][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Newbie Mute Reset", string, "Back", "");
- }
- case 31:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgRestrictedCarVoucher][0], dgVar[dgRestrictedCarVoucher][1], dgVar[dgRestrictedCarVoucher][2], GetDynamicGiftBoxType(dgVar[dgRestrictedCarVoucher][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - Restricted Car Voucher", string, "Back", "");
- }
- case 32:
- {
- format(string, sizeof(string), "Enabled: %d\nStock: %d\nGift Quantity: %d\nGift Type: %s", dgVar[dgPlatinumVIPVoucher][0], dgVar[dgPlatinumVIPVoucher][1], dgVar[dgPlatinumVIPVoucher][2], GetDynamicGiftBoxType(dgVar[dgPlatinumVIPVoucher][3]));
- ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_INFO, DIALOG_STYLE_MSGBOX, "Dynamic Giftbox - 1 month PVIP Voucher", string, "Back", "");
- }
- default: return true;
- }
- }
- }
- if(dialogid == DIALOG_VIPSPAWN)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- SetPVarInt(playerid, "VIPSpawn", 1);
- SendClientMessageEx(playerid, COLOR_CYAN, "You have used your free spawn at the Gold VIP+ room, you will be spawned at Los Santos VIP in 60 seconds.");
- }
- case 1:
- {
- SetPVarInt(playerid, "VIPSpawn", 2);
- SendClientMessageEx(playerid, COLOR_CYAN, "You have used your free spawn at the Gold VIP+ room, you will be spawned at San Fierro VIP in 60 seconds.");
- }
- case 2:
- {
- SetPVarInt(playerid, "VIPSpawn", 3);
- SendClientMessageEx(playerid, COLOR_CYAN, "You have used your free spawn at the Gold VIP+ room, you will be spawned at Las Ventures VIP in 60 seconds.");
- }
- case 3:
- {
- SetPVarInt(playerid, "VIPSpawn", 4);
- SendClientMessageEx(playerid, COLOR_GREY, "You have not used your free spawn at the Gold VIP+ room this time.");
- }
- }
- SetPlayerSpawn(playerid);
- }
- else
- {
- SetPVarInt(playerid, "VIPSpawn", 4);
- SendClientMessageEx(playerid, COLOR_GREY, "You have not used your free spawn at Gold VIP+ room this time.");
- SetPlayerSpawn(playerid);
- }
- }
- if(dialogid == DIALOG_NONRPACTION)
- {
- if(response)
- {
- ResetPlayerWeaponsEx(GetPVarInt(playerid, "PendingAction4"));
- PlayerInfo[GetPVarInt(playerid, "PendingAction4")][pAccountRestricted] = 1;
- SendClientMessageEx(playerid, COLOR_RED, "You have restricted this player account.");
- PlayerTextDrawShow(GetPVarInt(playerid, "PendingAction4"), AccountRestriction[GetPVarInt(playerid, "PendingAction4")]);
- PlayerTextDrawShow(GetPVarInt(playerid, "PendingAction4"), AccountRestrictionEx[GetPVarInt(playerid, "PendingAction4")]);
- format(string, sizeof(string), "%s has restricted %s(%d) account", GetPlayerNameEx(playerid), GetPlayerNameEx(GetPVarInt(playerid, "PendingAction4")), GetPlayerSQLId(GetPVarInt(playerid, "PendingAction4")));
- Log("logs/restrictaccount.log", string);
- return DeletePVar(playerid, "PendingAction4");
- }
- else
- {
- DeletePVar(playerid, "PendingAction4");
- return SendClientMessageEx(playerid, COLOR_GRAD1, "You have decided to not restrict this player account.");
- }
- }
- if(dialogid == DIALOG_VIPJOB)
- {
- if(response && PlayerInfo[playerid][pDonateRank] >= 4 && PlayerInfo[playerid][pVIPJob] > 0)
- {
- switch(listitem)
- {
- case 0:
- {
- if(PlayerInfo[playerid][pDetSkill] >= 400)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Your skill level of this job is already the highest one.");
- return 1;
- }
- PlayerInfo[playerid][pDetSkill] = 400;
- SendClientMessageEx(playerid, COLOR_YELLOW, "Your Detective skill level has been set to 5.");
- }
- case 1:
- {
- if(PlayerInfo[playerid][pLawSkill] >= 400)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Your skill level of this job is already the highest one.");
- return 1;
- }
- PlayerInfo[playerid][pLawSkill] = 400;
- SendClientMessageEx(playerid, COLOR_YELLOW, "Your Lawyer skill level has been set to 5.");
- }
- case 2:
- {
- if(PlayerInfo[playerid][pSexSkill] >= 400)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Your skill level of this job is already the highest one.");
- return 1;
- }
- PlayerInfo[playerid][pSexSkill] = 400;
- SendClientMessageEx(playerid, COLOR_YELLOW, "Your Whore skill level has been set to 5.");
- }
- case 3:
- {
- return 1;
- }
- case 4:
- {
- if(PlayerInfo[playerid][pDrugSmuggler] >= 200)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Your skill level of this job is already the highest one.");
- return 1;
- }
- PlayerInfo[playerid][pDrugSmuggler] = 200;
- SendClientMessageEx(playerid, COLOR_YELLOW, "Your Drugs Smuggling skill level has been set to 5.");
- }
- case 5:
- {
- if(PlayerInfo[playerid][pArmsSkill] >= 1200)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Your skill level of this job is already the highest one.");
- return 1;
- }
- PlayerInfo[playerid][pArmsSkill] = 1200;
- SendClientMessageEx(playerid, COLOR_YELLOW, "Your Arms Dealer skill level has been set to 5.");
- }
- case 6:
- {
- if(PlayerInfo[playerid][pMechSkill] >= 400)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Your skill level of this job is already the highest one.");
- return 1;
- }
- PlayerInfo[playerid][pMechSkill] = 400;
- SendClientMessageEx(playerid, COLOR_YELLOW, "Your Car Mechanic skill level has been set to 5.");
- }
- case 7:
- {
- if(PlayerInfo[playerid][pBoxSkill] >= 400)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Your skill level of this job is already the highest one.");
- return 1;
- }
- PlayerInfo[playerid][pBoxSkill] = 400;
- SendClientMessageEx(playerid, COLOR_YELLOW, "Your Boxer skill level has been set to 5.");
- }
- case 8:
- {
- if(PlayerInfo[playerid][pFishSkill] >= 400)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Your skill level of this job is already the highest one.");
- return 1;
- }
- PlayerInfo[playerid][pFishSkill] = 400;
- SendClientMessageEx(playerid, COLOR_YELLOW, "Your Fishing skill level has been set to 5.");
- }
- case 9:
- {
- if(PlayerInfo[playerid][pTruckSkill] >= 401)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Your skill level of this job is already the highest one.");
- return 1;
- }
- PlayerInfo[playerid][pTruckSkill] = 401;
- SendClientMessageEx(playerid, COLOR_YELLOW, "Your Shipment Contractor skill level has been set to 5.");
- }
- /* case 10:
- {
- if(PlayerInfo[playerid][pTreasureSkill] >= 600)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Your skill level of this job is already the highest one.");
- return 1;
- }
- PlayerInfo[playerid][pTreasureSkill] = 600;
- SendClientMessageEx(playerid, COLOR_YELLOW, "Your Treasure Hunter skill level has been set to 5.");
- } */
- case 10:
- {
- if(PlayerInfo[playerid][pCarLockPickSkill] >= 350)
- return SendClientMessageEx(playerid, COLOR_GREY, "Your skill level of this job is already the highest one.");
- PlayerInfo[playerid][pCarLockPickSkill] = 350;
- SendClientMessageEx(playerid, COLOR_YELLOW, "Your Lock Picking skill level has been set to 5.");
- }
- }
- PlayerInfo[playerid][pVIPJob] = 0;
- OnPlayerStatsUpdate(playerid);
- }
- }
- if(dialogid == DIALOG_WDREPORT)
- {
- if(!response || strlen(inputtext) < 30)
- {
- format(string, sizeof(string), "Please write a brief report on what you watched %s do.\n * 30 characters min", GetPlayerNameEx(GetPVarInt(playerid, "SpectatingWatch")));
- return ShowPlayerDialogEx(playerid, DIALOG_WDREPORT, DIALOG_STYLE_INPUT, "Incident Report", string, "Submit", "");
- }
- new szQuery[256];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "INSERT INTO `watchdog_reports` (reporter, report, reported, type, time) VALUES ('%d', '%e', '%d', '%d', UNIX_TIMESTAMP())", GetPlayerSQLId(playerid), inputtext, GetPlayerSQLId(GetPVarInt(playerid, "SpectatingWatch")), GetPVarInt(playerid, "WDReport"));
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "ii", SENDDATA_THREAD, playerid);
- SendClientMessageEx(playerid, COLOR_GRAD4, inputtext);
- SendClientMessageEx(playerid, COLOR_GRAD1, "Incident Report successfully submitted.");
- }
- if(dialogid == DIALOG_DGRAUTORESET)
- {
- if(!response && GetPVarType(playerid, "dgInputSel")) return cmd_dgedit(playerid, "autoreset");
- if(response)
- {
- if(listitem == 0)
- {
- SetPVarInt(playerid, "dgInputSel", 1);
- return ShowPlayerDialogEx(playerid, DIALOG_DGRAUTORESET, DIALOG_STYLE_INPUT, "Dynamic Giftbox Auto Reset - Timer", "Please enter a interval in minutes of when you want the giftbox to be automatically reset.", "Submit", "Close");
- }
- if(listitem == 1)
- {
- SetPVarInt(playerid, "dgInputSel", 2);
- return ShowPlayerDialogEx(playerid, DIALOG_DGRAUTORESET, DIALOG_STYLE_INPUT, "Dynamic Giftbox Auto Reset - Amount", "Please enter a amount to be added to empty items when the giftbox is automatically reset.", "Submit", "Close");
- }
- if(listitem == 2)
- {
- if(dgTimer != -1)
- {
- KillTimer(dgTimer);
- dgTimer = -1;
- SendClientMessage(playerid, -1, "You have successfully disabled the auto reset feature.");
- }
- else
- {
- if(!dynamicgift) return SendClientMessageEx(playerid, -1, "Giftbox has not been placed!");
- if(IsDynamicGiftBoxEnabled == false) return SendClientMessageEx(playerid, -1, "Dynamic Giftbox is currently disabled! /togdynamicgift to enable.");
- if(dgTimerTime <= 0 || dgAmount <= 0) return SendClientMessageEx(playerid, -1, "Invalid Settings!");
- dgTimer = SetTimer("DG_AutoReset", dgTimerTime*60000, true);
- format(string, sizeof(string), "You have enabled the auto reset feature. Settings: Timer: %d minute(s) | Amount: %d", dgTimerTime, dgAmount);
- SendClientMessageEx(playerid, -1, string);
- }
- }
- if(GetPVarInt(playerid, "dgInputSel") == 1)
- {
- new _time;
- if(sscanf(inputtext, "d", _time) || _time <= 0) return ShowPlayerDialogEx(playerid, DIALOG_DGRAUTORESET, DIALOG_STYLE_INPUT, "Dynamic Giftbox Auto Reset - Timer", "Please enter a interval in minutes of when you want the giftbox to be automatically reset.", "Submit", "Close");
- dgTimerTime = _time;
- format(string, sizeof(string), "You have set the auto reset timer to: %d minute(s).", dgTimerTime);
- SendClientMessageEx(playerid, -1, string);
- }
- if(GetPVarInt(playerid, "dgInputSel") == 2)
- {
- new _amount;
- if(sscanf(inputtext, "d", _amount) || _amount <= 0) return ShowPlayerDialogEx(playerid, DIALOG_DGRAUTORESET, DIALOG_STYLE_INPUT, "Dynamic Giftbox Auto Reset - Amount", "Please enter a amount to be added to empty items when the giftbox is automatically reset.", "Submit", "Close");
- dgAmount = _amount;
- format(string, sizeof(string), "You have set the auto reset amount to: %d.", dgAmount);
- SendClientMessageEx(playerid, -1, string);
- }
- return cmd_dgedit(playerid, "autoreset");
- }
- }
- if(dialogid == DIALOG_MARRIAGE)
- {
- if(response)
- {
- SetPVarInt(playerid, "marriagelastname", 1);
- SendClientMessageEx(playerid, -1, "You have chosen to keep your last name.");
- }
- else
- {
- SetPVarInt(playerid, "marriagelastname", 2);
- SendClientMessageEx(playerid, -1, "You have chosen to take your spouse's last name.");
- }
- }
- if(dialogid == FLAG_TRANSFER)
- {
- if(response)
- {
- GetPVarString(playerid, "FlagText", string, sizeof(string));
- DeleteFlag(GetPVarInt(playerid, "Flag_Transfer_ID"), playerid);
- format(string, sizeof(string), "%s [Transfered from: %s]", string, GetPlayerNameEx(GetPVarInt(playerid, "Flag_Transfer_From")));
- AddFlag(GetPVarInt(playerid, "Flag_Transfer_To"), playerid, string);
- format(string, sizeof(string), "You have successfully transferred FlagID: %d To: %s From: %s", GetPVarInt(playerid, "Flag_Transfer_ID"), GetPlayerNameEx(GetPVarInt(playerid, "Flag_Transfer_To")), GetPlayerNameEx(GetPVarInt(playerid, "Flag_Transfer_From")));
- SendClientMessageEx(playerid, -1, string);
- format(string, sizeof(string), "[TRANSFER] %s has transferred FlagID: %d To: %s(%d) From: %s(%d)", GetPlayerNameEx(playerid), GetPVarInt(playerid, "Flag_Transfer_ID"), GetPlayerNameEx(GetPVarInt(playerid, "Flag_Transfer_To")), GetPlayerSQLId(GetPVarInt(playerid, "Flag_Transfer_To")), GetPlayerNameEx(GetPVarInt(playerid, "Flag_Transfer_From")), GetPlayerSQLId(GetPVarInt(playerid, "Flag_Transfer_From")));
- Log("logs/flags.log", string);
- DeletePVar(playerid, "Flag_Transfer_ID");
- DeletePVar(playerid, "Flag_Transfer_To");
- DeletePVar(playerid, "Flag_Transfer_From");
- DeletePVar(playerid, "FlagText");
- }
- else
- {
- DeletePVar(playerid, "Flag_Transfer_ID");
- DeletePVar(playerid, "Flag_Transfer_To");
- DeletePVar(playerid, "Flag_Transfer_From");
- DeletePVar(playerid, "FlagText");
- SendClientMessageEx(playerid, -1, "You have cancelled yourself from transferring the flag!");
- }
- }
- if(dialogid == DIALOG_SETEXAMINE)
- {
- if(response)
- {
- if(isnull(inputtext)) return ShowPlayerDialogEx(playerid, DIALOG_SETEXAMINE, DIALOG_STYLE_INPUT, "Examine Description", "Please enter a description of yourself.\nExample: appears to be a white male, 6' 3 ..etc", "Set", "Cancel");
- format(PlayerInfo[playerid][pExamineDesc], 128, "%s", inputtext);
- }
- else
- {
- SendClientMessageEx(playerid, -1, "You have cancelled yourself from setting your examine description.");
- }
- }
- if(dialogid == DIALOG_HOLSTER && response)
- {
- if(listitem == 0)
- {
- GameTextForPlayer(playerid, "holstering", 1000, 6);
- }
- else
- {
- GameTextForPlayer(playerid, "unholstering", 1000, 6);
- }
- SetTimerEx("UnholsterWeapon", 1000, false, "ii", playerid, listitem);
- }
- if(dialogid == DIALOG_MICROSHOP)
- {
- if(response)
- {
- new stringg[512];
- if(listitem == 0)
- {
- format(stringg, sizeof(stringg), "%s (Credits: {FFD700}%s{FFFFFF})\n%s (Credits: {FFD700}%s{FFFFFF})\nDouble EXP Tokens (Credits: {FFD700}%s{FFFFFF})", mItemName[0], number_format(MicroItems[0]), mItemName[1], number_format(MicroItems[1]), number_format(ShopItems[9][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MICROSHOP2, DIALOG_STYLE_LIST, "Microtransaction Shop - Job & Experience", stringg, "Select", "Exit");
- }
- if(listitem == 1)
- {
- format(stringg, sizeof(stringg), "%s (Credits: {FFD700}%s{FFFFFF})\n%s (Credits: {FFD700}%s{FFFFFF})", mItemName[2], number_format(MicroItems[2]), mItemName[3], number_format(MicroItems[3]));
- ShowPlayerDialogEx(playerid, DIALOG_MICROSHOP2, DIALOG_STYLE_LIST, "Microtransaction Shop - VIP", stringg, "Select", "Exit");
- }
- if(listitem == 2)
- {
- format(stringg, sizeof(stringg), "%s (Credits: {FFD700}%s{FFFFFF})", mItemName[4], number_format(MicroItems[4]));
- ShowPlayerDialogEx(playerid, DIALOG_MICROSHOP2, DIALOG_STYLE_LIST, "Microtransaction Shop - Food", stringg, "Select", "Exit");
- }
- if(listitem == 3)
- {
- format(szMiscArray, sizeof(szMiscArray), "%s (Credits: {FFD700}%s{FFFFFF})\nHouse Move (Credits: {FFD700}%s{FFFFFF})\nHouse Interior Change (Credits: {FFD700}%s{FFFFFF})",
- mItemName[6], number_format(MicroItems[6]), number_format(ShopItems[16][sItemPrice]), number_format(ShopItems[15][sItemPrice]));
- format(szMiscArray, sizeof(szMiscArray), "%s\nFurniture Slots - Bronze Pack (25 slots) (Credits: {FFD700}%s{FFFFFF})\nFurniture Slots - Silver Pack (40 slots) (Credits: {FFD700}%s{FFFFFF})\n\
- Furniture Slots - Gold Pack (50 slots) (Credits: {FFD700}%s{FFFFFF})", szMiscArray, number_format(ShopItems[41][sItemPrice]), number_format(ShopItems[42][sItemPrice]), number_format(ShopItems[43][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MICROSHOP2, DIALOG_STYLE_LIST, "Microtransaction Shop - House", szMiscArray, "Select", "Exit");
- }
- if(listitem == 4)
- {
- format(stringg, sizeof(stringg), "%s (Credits: {FFD700}%s{FFFFFF})\n%s (Credits: {FFD700}%s{FFFFFF})\n%s (Credits: {FFD700}%s{FFFFFF})\nDeluxe Car Alarm (Credits: {FFD700}%s{FFFFFF})\nAdditional Vehicle Slots (Credits: {FFD700}%s{FFFFFF})",
- mItemName[7], number_format(MicroItems[7]), mItemName[8], number_format(MicroItems[8]), mItemName[9], number_format(MicroItems[9]), number_format(ShopItems[39][sItemPrice]), number_format(ShopItems[23][sItemPrice]));
- ShowPlayerDialogEx(playerid, DIALOG_MICROSHOP2, DIALOG_STYLE_LIST, "Microtransaction Shop - Vehicle", stringg, "Select", "Exit");
- }
- if(listitem == 5)
- {
- format(stringg, sizeof(stringg), "%s (Credits: {FFD700}%s{FFFFFF})\n%s (Credits: {FFD700}%s{FFFFFF})\n%s (Credits: {FFD700}%s{FFFFFF})\n%s (Credits: {FFD700}%s{FFFFFF})\
- \nFireworks x5 (Credits: {FFD700}%s{FFFFFF})\n100 Paintball Tokens (Credits: {FFD700}%s{FFFFFF})\nAdditional Toy Slots (Credits: {FFD700}%s{FFFFFF})\n%s (Credits: {FFD700}%s{FFFFFF})\n%s (Credits: {FFD700}%s{FFFFFF})",
- mItemName[10], number_format(MicroItems[10]), mItemName[12], number_format(MicroItems[12]), mItemName[13], number_format(MicroItems[13]), mItemName[5], number_format(MicroItems[5]), number_format(ShopItems[10][sItemPrice]),
- number_format(ShopItems[8][sItemPrice]), number_format(ShopItems[28][sItemPrice]), mItemName[14], number_format(MicroItems[14]), mItemName[15], number_format(MicroItems[15])/*, mItemName[11], number_format(MicroItems[11])*/);
- ShowPlayerDialogEx(playerid, DIALOG_MICROSHOP2, DIALOG_STYLE_LIST, "Microtransaction Shop - Miscellaneous", stringg, "Select", "Exit");
- }
- if(listitem == 6)
- {
- if(prezombie || zombieevent)
- {
- format(stringg, sizeof(stringg), "%s (Credits: {FFD700}%s{FFFFFF})\n%s (Credits: {FFD700}%s{FFFFFF})\n%s (Credits: {FFD700}%s{FFFFFF})\n%s (Credits: {FFD700}%s{FFFFFF})",
- mItemName[16], number_format(MicroItems[16]), mItemName[17], number_format(MicroItems[17]), mItemName[18], number_format(MicroItems[18]), mItemName[19], number_format(MicroItems[19]));
- ShowPlayerDialogEx(playerid, DIALOG_MICROSHOP2, DIALOG_STYLE_LIST, "Microtransaction Shop - Events", stringg, "Select", "Exit");
- }
- if(!strlen(stringg)) ShowPlayerDialogEx(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Microtransaction Shop - Events", "Nothing available to purchase at this time!", "Okay", "");
- }
- SetPVarInt(playerid, "m_listitem", listitem+1);
- }
- }
- if(dialogid == DIALOG_MICROSHOP2)
- {
- if(!response) return cmd_microshop(playerid, "");
- if(response)
- {
- new item;
- switch(GetPVarInt(playerid, "m_listitem")-1)
- {
- case 0://Job & Experience
- {
- if(listitem == 0) item = 0;
- if(listitem == 1) item = 1;
- if(listitem == 2) item = 100;//EXP Token
- }
- case 1://VIP
- {
- if(listitem == 0) item = 2;
- if(listitem == 1) item = 3;
- }
- case 2://Food
- {
- if(listitem == 0) item = 4;
- }
- case 3://House
- {
- if(listitem == 0) item = 6;
- if(listitem == 1) item = 101;//House Move
- if(listitem == 2) item = 102;//House Interior Change
- if(listitem == 3) item = 108;//Furniture Bronze Pack
- if(listitem == 4) item = 109;//Furniture Silver Pack
- if(listitem == 5) item = 110;//Furniture Gold Pack
- }
- case 4://Vehicle
- {
- if(listitem == 0) item = 7;
- if(listitem == 1) item = 8;
- if(listitem == 2) item = 9;
- if(listitem == 3) item = 103;//Deluxe Car Alarm
- if(listitem == 4) item = 104;//Additional Vehicle Slot
- }
- case 5://Misc
- {
- if(listitem == 0) item = 10;
- if(listitem == 1) item = 12;
- if(listitem == 2) item = 13;
- if(listitem == 3) item = 5;
- if(listitem == 4) item = 105;//Fireworks x5
- if(listitem == 5) item = 106;//100 Paintball Tokens
- if(listitem == 6) item = 107;//Additional Toy Slot
- if(listitem == 7) item = 14;
- if(listitem == 8) item = 15;
- //if(listitem == 9) item = 11; //Phone Change (TODO)
- }
- case 6://Event
- {
- if(listitem == 0) item = 16;
- if(listitem == 1) item = 17;
- if(listitem == 2) item = 18;
- if(listitem == 3) item = 19;
- }
- }
- if(item == 100)//EXP Token
- {
- SetPVarInt(playerid, "MiscShop", 4);
- format(string, sizeof(string), "Item: Double EXP Token\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[9][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[9][sItemPrice]));
- return ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Micro Shop", string, "Purchase", "Cancel");
- }
- if(item == 101)//House Move
- {
- format(string, sizeof(string),"Item: House Move\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[16][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[16][sItemPrice]));
- return ShowPlayerDialogEx(playerid, DIALOG_HOUSESHOP4, DIALOG_STYLE_MSGBOX, "Micro Shop", string, "Purchase", "Cancel");
- }
- if(item == 102)//House Interior Change
- {
- format(string, sizeof(string),"Item: House Interior Change\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[15][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[15][sItemPrice]));
- return ShowPlayerDialogEx(playerid, DIALOG_HOUSESHOP3, DIALOG_STYLE_MSGBOX, "Micro Shop", string, "Purchase", "Cancel");
- }
- if(item == 103)//Deluxe Car Alarm
- {
- SetPVarInt(playerid, "MiscShop", 18);
- format(string, sizeof(string), "Item: Deluxe Car Alarm\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[39][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[39][sItemPrice]));
- return ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Micro Shop", string, "Purchase", "Cancel");
- }
- if(item == 104)//Additional Vehicle Slot
- {
- SetPVarInt(playerid, "MiscShop", 7);
- format(string, sizeof(string), "Item: Additional Vehicle Slot\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[23][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[23][sItemPrice]));
- return ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Micro Shop", string, "Purchase", "Cancel");
- }
- if(item == 105)//Fireworks x5
- {
- SetPVarInt(playerid, "MiscShop", 5);
- format(string, sizeof(string), "Item: Fireworks x5\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[10][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[10][sItemPrice]));
- return ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Micro Shop", string, "Purchase", "Cancel");
- }
- if(item == 106)//100 Paintball Tokens
- {
- SetPVarInt(playerid, "MiscShop", 3);
- format(string, sizeof(string), "Item: 100 Paintball Tokens\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[8][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[8][sItemPrice]));
- return ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Micro Shop", string, "Purchase", "Cancel");
- }
- if(item == 107)//Additional Toy Slot
- {
- SetPVarInt(playerid, "MiscShop", 8);
- format(string, sizeof(string), "Additional Toy Slot\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[28][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[28][sItemPrice]));
- return ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Micro Shop", string, "Purchase", "Cancel");
- }
- if(item == 108)//Furniture Bronze
- {
- SetPVarInt(playerid, "MiscShop", 19);
- format(string, sizeof(string), "Furniture Pack - Bronze (25 slots)\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[41][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[41][sItemPrice]));
- return ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Micro Shop", string, "Purchase", "Cancel");
- }
- if(item == 109)//Furniture Silver
- {
- SetPVarInt(playerid, "MiscShop", 20);
- format(string, sizeof(string), "Furniture Pack - Silver (40 slots)\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[42][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[42][sItemPrice]));
- return ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Micro Shop", string, "Purchase", "Cancel");
- }
- if(item == 110)//Furniture Gold
- {
- SetPVarInt(playerid, "MiscShop", 21);
- format(string, sizeof(string), "Furniture Pack - Bronze (50 slots)\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[43][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[43][sItemPrice]));
- return ShowPlayerDialogEx(playerid, DIALOG_MISCSHOP2, DIALOG_STYLE_MSGBOX, "Micro Shop", string, "Purchase", "Cancel");
- }
- SetPVarInt(playerid, "m_Item", item);
- if(item == 0)//Change a Job
- {
- if(gettime() < PlayerInfo[playerid][mCooldown][item])
- {
- format(string, sizeof(string), "You have purchased this item 3 times in the past 24 hours, please wait %s to purchase it again.", ConvertTimeS(PlayerInfo[playerid][mCooldown][item]-gettime()));
- SendClientMessageEx(playerid, COLOR_GRAD2, string);
- return cmd_microshop(playerid, "");
- }
- PlayerInfo[playerid][mCooldown][item] = 0;
- return ShowPlayerDialogEx(playerid, 7484, DIALOG_STYLE_LIST, "Micro Shop: Job Center", "Detective\nLawyer\nWhore\nDrugs Dealer\nBodyguard\nMechanic\nArms Dealer\nBoxer\nDrugs Smuggler\nTaxi Driver\nCraftsman\nBartender\nShipment Contractor\nPizza Boy", "Proceed", "Cancel");
- }
- if(item == 1)//Job Boost
- {
- if(PlayerInfo[playerid][mPurchaseCount][item])
- {
- format(string, sizeof(string), "You currently have a active job boost, please wait for it to expire in %d minute(s) to purchase again.", PlayerInfo[playerid][mCooldown][item]);
- SendClientMessageEx(playerid, COLOR_GRAD2, string);
- return cmd_microshop(playerid, "");
- }
- return ShowPlayerDialogEx(playerid, 7484, DIALOG_STYLE_LIST, "Micro Shop: Job Boost", "Detective\nLawyer\nWhore\nDrugs Dealer\nMechanic\nArms Dealer\nBoxer\nShipment Contractor", "Proceed", "Cancel");
- }
- if(item == 2)//Buddy Invites Reset
- {
- if(PlayerInfo[playerid][pDonateRank] < 2) return SendClientMessageEx(playerid, COLOR_GRAD2, "You must be Silver VIP+ to purchase this item.");
- if(PlayerInfo[playerid][pBuddyInvites]) return SendClientMessageEx(playerid, COLOR_GRAD2, "You currently have Buddy Invites available, please use them before purchasing this item.");
- if(gettime() < PlayerInfo[playerid][mCooldown][item])
- {
- format(string, sizeof(string), "You have purchased this item in the past 24 hours, please wait %s to purchase it again.", ConvertTimeS(PlayerInfo[playerid][mCooldown][item]-gettime()));
- SendClientMessageEx(playerid, COLOR_GRAD2, string);
- return cmd_microshop(playerid, "");
- }
- PlayerInfo[playerid][mCooldown][item] = 0;
- }
- if(item == 3)//Buddy Invite Extension
- {
- if(!PlayerInfo[playerid][pBuddyInvited]) return SendClientMessageEx(playerid, COLOR_GRAD2, "You must be on a Buddy Invite to purchase this item.");
- if(gettime() < PlayerInfo[playerid][mCooldown][item])
- {
- format(string, sizeof(string), "You have purchased this item 3 times in the past 24 hours, please wait %s to purchase it again.", ConvertTimeS(PlayerInfo[playerid][mCooldown][item]-gettime()));
- SendClientMessageEx(playerid, COLOR_GRAD2, string);
- return cmd_microshop(playerid, "");
- }
- PlayerInfo[playerid][mCooldown][item] = 0;
- }
- if(item == 4)//Energy Bars
- {
- if(1 <= PlayerInfo[playerid][mInventory][4] <= 4)
- {
- format(string, sizeof(string), "You currently have %d energy bars on hand, they are sold in bulks of 4 which is also the max on hand.", PlayerInfo[playerid][mInventory][4]);
- SendClientMessageEx(playerid, COLOR_GRAD2, string);
- if(!PlayerInfo[playerid][pBackpack]) SendClientMessageEx(playerid, COLOR_GRAD2, "If you would like to be able to hold more, purchase a backpack via /miscshop");
- else SendClientMessageEx(playerid, COLOR_GRAD2, "As you have a backpack you can store your on hand energy bars and try again.");
- return 1;
- }
- }
- if(item == 6 && PlayerInfo[playerid][mInventory][item]) return SendClientMessageEx(playerid, COLOR_GRAD2, "You currently have a House Sale Sign in your inventory, please use it before purchasing another."); //House Sale Sign
- if(item == 10)//Priority Ads
- {
- if(gettime() < PlayerInfo[playerid][mCooldown][item])
- {
- format(string, sizeof(string), "You have purchased this item 2 times in the past 24 hours, please wait %s to purchase it again.", ConvertTimeS(PlayerInfo[playerid][mCooldown][item]-gettime()));
- SendClientMessageEx(playerid, COLOR_GRAD2, string);
- return cmd_microshop(playerid, "");
- }
- PlayerInfo[playerid][mCooldown][item] = 0;
- }
- if(item == 12)//Quick Bank Access
- {
- if(PlayerInfo[playerid][mPurchaseCount][item])
- {
- format(string, sizeof(string), "You currently have a active Quick Bank Access, please wait for it to expire in %d minute(s) to purchase again.", PlayerInfo[playerid][mCooldown][item]);
- SendClientMessageEx(playerid, COLOR_GRAD2, string);
- return cmd_microshop(playerid, "");
- }
- }
- if(item == 13)//Restricted Skin
- {
- if(gettime() < PlayerInfo[playerid][mCooldown][item])
- {
- format(string, sizeof(string), "You have purchased this item 3 times in the past 24 hours, please wait %s to purchase it again.", ConvertTimeS(PlayerInfo[playerid][mCooldown][item]-gettime()));
- SendClientMessageEx(playerid, COLOR_GRAD2, string);
- return cmd_microshop(playerid, "");
- }
- PlayerInfo[playerid][mCooldown][item] = 0;
- }
- format(string, sizeof(string), "Item: %s\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", mItemName[item], number_format(PlayerInfo[playerid][pCredits]), number_format(MicroItems[item]), number_format(PlayerInfo[playerid][pCredits]-MicroItems[item]));
- ShowPlayerDialogEx(playerid, DIALOG_MICROSHOP3, DIALOG_STYLE_MSGBOX, "Micro Shop", string, "Purchase", "Cancel");
- }
- }
- if(dialogid == DIALOG_MICROSHOP3)
- {
- if(!response) return cmd_microshop(playerid, "");
- if(response)
- {
- new item = GetPVarInt(playerid, "m_Item");
- if(PlayerInfo[playerid][pCredits] < MicroItems[item]) return SendClientMessageEx(playerid, COLOR_GREY, "You don't have enough credits to purchase this item. Visit shop.ng-gaming.net to purchase credits.");
- AmountSoldMicro[item]++;
- AmountMadeMicro[item] += MicroItems[item];
- new asString[128], amString[128];
- for(new m; m < MAX_MICROITEMS; m++)
- {
- format(asString, sizeof(asString), "%s%d", asString, AmountSoldMicro[m]);
- format(amString, sizeof(amString), "%s%d", amString, AmountMadeMicro[m]);
- if(m != MAX_MICROITEMS-1) strcat(asString, "|"), strcat(amString, "|");
- }
- new szQuery[512];
- mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `sales` SET `TotalSoldMicro` = '%s', `AmountMadeMicro` = '%s' WHERE `Month` > NOW() - INTERVAL 1 MONTH", asString, amString);
- mysql_tquery(MainPipeline, szQuery, "OnQueryFinish", "i", SENDDATA_THREAD);
- GivePlayerCredits(playerid, -MicroItems[item], 1);
- printf("MicroPrice%d: %d", item, MicroItems[item]);
- format(string, sizeof(string), "[MICROSHOP] [User: %s(%i)] [IP: %s] [Credits: %s] [%s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), number_format(PlayerInfo[playerid][pCredits]), mItemName[item], number_format(MicroItems[item]));
- Log("logs/micro.log", string), print(string);
- format(string, sizeof(string), "You have purchased \"%s\" for %s credits.", mItemName[item], number_format(MicroItems[item]));
- SendClientMessageEx(playerid, COLOR_CYAN, string);
- if(item == 0)//Change a Job
- {
- if(GetPVarInt(playerid, "m_Response") == 0) PlayerInfo[playerid][pJob] = GetPVarInt(playerid, "jobSelection"), SendClientMessageEx(playerid, COLOR_YELLOW, "You have changed your first job!");
- if(GetPVarInt(playerid, "m_Response") == 1) PlayerInfo[playerid][pJob2] = GetPVarInt(playerid, "jobSelection"), SendClientMessageEx(playerid, COLOR_YELLOW, "You have changed your second job!");
- if(GetPVarInt(playerid, "m_Response") == 2) PlayerInfo[playerid][pJob3] = GetPVarInt(playerid, "jobSelection"), SendClientMessageEx(playerid, COLOR_YELLOW, "You have changed your third job!");
- PlayerInfo[playerid][mInventory][item]++;
- if(++PlayerInfo[playerid][mPurchaseCount][item] == 3) PlayerInfo[playerid][mCooldown][item] = gettime()+86400, PlayerInfo[playerid][mPurchaseCount][item] = 0;
- }
- if(item == 1)//Job Boost
- {
- new skill;
- switch(GetPVarInt(playerid, "jobSelection"))
- { //Point to enum
- case 1: skill = pInfo:pDetSkill;
- case 2: skill = pInfo:pLawSkill;
- case 3: skill = pInfo:pSexSkill;
- case 4: skill = pInfo:pDrugsSkill;
- case 7: skill = pInfo:pMechSkill;
- case 9: skill = pInfo:pArmsSkill;
- case 12: skill = pInfo:pBoxSkill;
- case 20: skill = pInfo:pTruckSkill;
- }
- PlayerInfo[playerid][mBoost][0] = GetPVarInt(playerid, "jobSelection");
- PlayerInfo[playerid][mBoost][1] = PlayerInfo[playerid][pInfo:skill];
- PlayerInfo[playerid][pInfo:skill] = 401;
- PlayerInfo[playerid][mPurchaseCount][item] = 1;//Set Active
- PlayerInfo[playerid][mCooldown][item] = 120;//2 Hours
- format(string, sizeof(string), "[JOBBOOST] %s(%d) Job: %s (%d) Skill: %d (%d)", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetJobName(GetPVarInt(playerid, "jobSelection")), GetPVarInt(playerid, "jobSelection"), PlayerInfo[playerid][mBoost][1], GetJobLevel(playerid, GetPVarInt(playerid, "jobSelection")));
- Log("logs/micro.log", string);
- format(string, sizeof(string), "Job Boost for the %s job is now active and will expire in 60 minutes.", GetJobName(GetPVarInt(playerid, "jobSelection")));
- SendClientMessageEx(playerid, -1, string);
- }
- if(item == 2)//Buddy Invites Reset
- {
- PlayerInfo[playerid][pVIPInviteDay] = 0;
- PlayerInfo[playerid][pBuddyInvites] += 3;
- PlayerInfo[playerid][mCooldown][item] = gettime()+86400;
- }
- if(item == 3)//Buddy Invite Extension
- {
- PlayerInfo[playerid][pTempVIP] += 180;
- if(++PlayerInfo[playerid][mPurchaseCount][item] == 3) PlayerInfo[playerid][mCooldown][item] = gettime()+86400, PlayerInfo[playerid][mPurchaseCount][item] = 0;
- }
- if(item == 4)//Energy Bars
- {
- PlayerInfo[playerid][mInventory][item] += 4;
- SendClientMessageEx(playerid, -1, "To eat a energy bar type /eatbar");
- }
- if(item == 5)//Gift Reset Voucher
- {
- PlayerInfo[playerid][pGiftVoucher]++;
- SendClientMessageEx(playerid, -1, "Use /myvouchers to access your gift reset voucher.");
- }
- if(item == 6)//House Sale Sign
- {
- PlayerInfo[playerid][mInventory][item] = 1;
- SendClientMessageEx(playerid, -1, "To place down your sign type /placesign, To edit your sign type /editsign");
- }
- if(item == 7)//Fuel Canister
- {
- PlayerInfo[playerid][mInventory][item]++;
- SendClientMessageEx(playerid, -1, "To use a fuel can get near a vehicle and type /fuelcan");
- }
- if(item == 8)//Jump Start
- {
- PlayerInfo[playerid][mInventory][item]++;
- SendClientMessageEx(playerid, -1, "To jump start a vehicle type /jumpstart");
- }
- if(item == 9) //Restricted Car Colors
- {
- PlayerInfo[playerid][mInventory][item]++;
- SendClientMessageEx(playerid, -1, "To paint a vehicle a restricted car color type /rcarcolor");
- }
- if(item == 10)//Priority Ads
- {
- PlayerInfo[playerid][pAdvertVoucher] += 3;
- if(++PlayerInfo[playerid][mPurchaseCount][item] == 2) PlayerInfo[playerid][mCooldown][item] = gettime()+86400;
- SendClientMessageEx(playerid, -1, "3 Advertisement vouchers have been added to your account.");
- }
- if(item == 11)//Number Change
- {
- //TODO
- }
- if(item == 12)//Quick Bank Access
- {
- PlayerInfo[playerid][mPurchaseCount][item] = 1;
- PlayerInfo[playerid][mCooldown][item] = 15;
- SendClientMessageEx(playerid, -1, "You can now use /balance /withdraw /deposit /wiretransfer from anywhere for 15 minutes.");
- }
- if(item == 13)//Restricted Skin
- {
- PlayerInfo[playerid][mInventory][item]++;
- if(++PlayerInfo[playerid][mPurchaseCount][item] == 3) PlayerInfo[playerid][mCooldown][item] = gettime()+86400;
- SendClientMessageEx(playerid, -1, "Head over to a clothing store and select any restricted skin.");
- }
- if(item == 14) AddFlag(playerid, INVALID_PLAYER_ID, "Dynamic Door Move (Credits)"), SendReportToQue(playerid, "Dynamic Door Move (Credits)", 2, 2), SendClientMessageEx(playerid, COLOR_CYAN, "Contact a senior admin to have the Dynamic Door Move issued.");
- if(item == 15) AddFlag(playerid, INVALID_PLAYER_ID, "Dynamic Door Interior Change (Credits)"), SendReportToQue(playerid, "Dynamic Door Interior Change (Credits)", 2, 2), SendClientMessageEx(playerid, COLOR_CYAN, "Contact a senior admin to have the Dynamic Door Interior Change issued.");
- if(item == 16)
- {
- SendClientMessageEx(playerid, -1, "Type /zscrapmetal to boost the vehicle health by 500 HP!");
- PlayerInfo[playerid][mInventory][item]++;
- }
- if(item == 17)
- {
- SendClientMessageEx(playerid, -1, "Type /z50cal to use your .50 caliber ammo. Use the same command to toggle your .50 caliber ammo. This will only work for Rifles & Sniper Rifles");
- PlayerInfo[playerid][mInventory][item] += 15;
- }
- if(item == 18)
- {
- SendClientMessageEx(playerid, -1, "Type /zinject to use the antibiotic.");
- PlayerInfo[playerid][mPurchaseCount][item] += 3;
- }
- if(item == 19)
- {
- SendClientMessageEx(playerid, -1, "Type /zopenkit to open up the kit and see which variation of the Survivor kit you won.");
- PlayerInfo[playerid][mInventory][item]++;
- }
- DeletePVar(playerid, "m_listitem");
- DeletePVar(playerid, "m_Item");
- DeletePVar(playerid, "m_Response");
- }
- }
- if(dialogid == DIALOG_EDITMICROSHOP)
- {
- if(response)
- {
- if(!GetPVarType(playerid, "mEditingPrice"))
- {
- SetPVarInt(playerid, "mEditingPrice", listitem);
- format(string, sizeof(string), "You are currently editing the price of %s. The current credit cost is %s.", mItemName[listitem], number_format(MicroItems[listitem]));
- return ShowPlayerDialogEx(playerid, DIALOG_EDITMICROSHOP, DIALOG_STYLE_INPUT, "Editing Price", string, "Change", "Back");
- }
- else
- {
- if(!GetPVarType(playerid, "mEditingPriceValue"))
- {
- new price;
- if(sscanf(inputtext, "d", price) || price <= 0)
- {
- format(string, sizeof(string), "The price can't be below 1.\n\nYou are currently editing the price of %s. The current credit cost is %s.", mItemName[GetPVarInt(playerid, "mEditingPrice")], number_format(MicroItems[GetPVarInt(playerid, "mEditingPrice")]));
- return ShowPlayerDialogEx(playerid, DIALOG_EDITMICROSHOP, DIALOG_STYLE_INPUT, "Editing Price - Error", string, "Change", "Back");
- }
- else
- {
- SetPVarInt(playerid, "mEditingPriceValue", price);
- format(string,sizeof(string),"Are you sure you want to edit the cost of %s?\n\nOld Cost: %s\nNew Cost: %s", mItemName[GetPVarInt(playerid, "mEditingPrice")], number_format(MicroItems[GetPVarInt(playerid, "mEditingPrice")]), number_format(price));
- return ShowPlayerDialogEx(playerid, DIALOG_EDITMICROSHOP, DIALOG_STYLE_MSGBOX, "Confirmation", string, "Confirm", "Cancel");
- }
- }
- else
- {
- if(GetPVarInt(playerid, "mEditingPriceValue") == 0) SetPVarInt(playerid, "mEditingPriceValue", 999999);
- MicroItems[GetPVarInt(playerid, "mEditingPrice")] = GetPVarInt(playerid, "mEditingPriceValue");
- format(string, sizeof(string), "You have successfully edited the price of %s to %s.", mItemName[GetPVarInt(playerid, "mEditingPrice")], number_format(GetPVarInt(playerid, "mEditingPriceValue")));
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "[EDITMICROSHOPPRICES] [User: %s(%i)] [IP: %s] [%s] [Price: %s]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), mItemName[GetPVarInt(playerid, "mEditingPrice")], number_format(MicroItems[GetPVarInt(playerid, "mEditingPrice")]));
- Log("logs/editshop.log", string), print(string);
- g_mysql_SavePrices();
- DeletePVar(playerid, "mEditingPrice");
- DeletePVar(playerid, "mEditingPriceValue");
- }
- }
- }
- else
- {
- if(GetPVarType(playerid, "mEditingPriceValue")) SendClientMessageEx(playerid, COLOR_GREY, "You have canceled the price change.");
- DeletePVar(playerid, "mEditingPrice");
- DeletePVar(playerid, "mEditingPriceValue");
- }
- }
- if(dialogid == DIALOG_WEPVEHSALE)
- {
- if(response)
- {
- new alarmstring[9], lockstring[11], worklockstring[10];
- new giveplayerid = GetPVarInt(playerid, "WepVehSalePlayer");
- new price = GetPVarInt(playerid, "WepVehSalePrice");
- new d = GetPVarInt(playerid, "WepVehSaleVehicle");
- new fine = GetPVarInt(playerid, "WepVehSaleFine");
- SetPVarInt(playerid, "LastTransaction", gettime());
- VehicleOffer[giveplayerid] = playerid;
- VehicleId[giveplayerid] = d;
- VehiclePrice[giveplayerid] = price;
- switch(PlayerVehicleInfo[playerid][d][pvAlarm]) {
- case 1: alarmstring = "Standard";
- case 2: alarmstring = "Deluxe";
- default: alarmstring = "no";
- }
- switch(PlayerVehicleInfo[playerid][d][pvLock]) {
- case 2: lockstring = "Electronic";
- case 3: lockstring = "Industrial";
- default: lockstring = "no";
- }
- if(PlayerVehicleInfo[playerid][d][pvLocksLeft] < 1) worklockstring = "(Broken)";
- format(string, sizeof(string), "* [WEPVEHICLE] You offered %s to buy this %s with %s Alarm & %s%s Lock for $%s with a %s fine.", GetPlayerNameEx(giveplayerid), GetVehicleName(PlayerVehicleInfo[playerid][d][pvId]), alarmstring, worklockstring, lockstring, number_format(price), number_format(fine));
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* [WEPVEHICLE] %s has offered you their %s (VID: %d) with %s Alarm & %s%s Lock for $%s, (type /accept car) to buy.", GetPlayerNameEx(playerid), GetVehicleName(PlayerVehicleInfo[playerid][d][pvId]), PlayerVehicleInfo[playerid][d][pvId], alarmstring, worklockstring, lockstring, number_format(price));
- SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
- DeletePVar(playerid, "confirmvehsell");
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You have canceled the weaponized vehicle sale. You will not be fined.");
- DeletePVar(playerid, "WepVehSalePlayer");
- DeletePVar(playerid, "WepVehSaleVehicle");
- DeletePVar(playerid, "WepVehSalePrice");
- DeletePVar(playerid, "WepVehSaleFine");
- }
- }
- if(dialogid == DIALOG_REPORT_HSIGN)
- {
- new Player = GetPVarInt(playerid, "hSignTextChange");
- if(!GetPVarType(Player, "hSignRequest")) return SendClientMessageEx(playerid, COLOR_GREY, "That person isn't requesting a namechange!");
- if(response)
- {
- new desc[64], escapeDesc[66];
- GetPVarString(Player, "hSignRequestText", desc, 64);
- mysql_escape_string(desc, escapeDesc);
- format(HouseInfo[GetPVarInt(Player, "hSignRequest")][hSignDesc], 64, "%s", escapeDesc);
- SaveHouse(GetPVarInt(Player, "hSignRequest"));
- SendClientMessageEx(Player, COLOR_YELLOW, "Your house sale sign text has been approved.");
- format(string, sizeof(string), " You have approved %s's house sale sign text change on House ID: %d", GetPlayerNameEx(Player), GetPVarInt(Player, "hSignRequest"));
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- format(string, sizeof(string), "%s changed House ID: %d sale sign text to \"%s\", owned by: %s(%d)", GetPlayerNameEx(playerid), GetPVarInt(Player, "hSignRequest"), desc, GetPlayerNameEx(Player), GetPlayerSQLId(Player));
- Log("logs/house.log", string);
- format(string, sizeof(string), "%s has approved %s's house sale sign text on House ID: %d", GetPlayerNameEx(playerid), GetPlayerNameEx(Player), GetPVarInt(Player, "hSignRequest"));
- ABroadCast(COLOR_YELLOW, string, 2);
- }
- else
- {
- SendClientMessageEx(Player, COLOR_YELLOW, "Your request to modify your house sale sign text has been denied.");
- format(string, sizeof(string), " You have denied %s's house sale sign text modification request.", GetPlayerNameEx(Player));
- SendClientMessageEx(playerid,COLOR_YELLOW,string);
- format(string, sizeof(string), "%s has denied %s's house sale sign text modification request", GetPlayerNameEx(playerid), GetPlayerNameEx(Player));
- ABroadCast(COLOR_YELLOW, string, 2);
- }
- DeletePVar(Player, "hSignRequest");
- DeletePVar(Player, "hSignTextChange");
- }
- if(dialogid == DIALOG_ENERGYBARS)
- {
- if(response)
- {
- if(!IsBackpackAvailable(playerid)) {
- DeletePVar(playerid, "BackpackOpen"), DeletePVar(playerid, "BackpackProt"), SendClientMessageEx(playerid, COLOR_GREY, "You cannot use your backpack at this moment.");
- return 1;
- }
- if(!GetPVarType(playerid, "bnwd"))
- {
- SetPVarInt(playerid, "bnwd", listitem);
- return ShowBackpackMenu(playerid, DIALOG_ENERGYBARS*2, "");
- }
- new str[148];
- if(GetPVarInt(playerid, "bnwd"))//Deposit
- {
- new amount, maxbars;
- switch(PlayerInfo[playerid][pBackpack])
- {
- case 1: maxbars = 8;
- case 2: maxbars = 12;
- case 3: maxbars = 16;
- }
- if(sscanf(inputtext, "d", amount)) return ShowBackpackMenu(playerid, DIALOG_ENERGYBARS*2, "{B20400}Wrong input{A9C4E4}");
- if(amount < 1) return ShowBackpackMenu(playerid, DIALOG_ENERGYBARS*2, "{B20400}Wrong input{A9C4E4}\nYou cannot put the amount less than 1");
- if(amount > maxbars-PlayerInfo[playerid][pBItems][11])
- {
- format(str, sizeof(str), "{B20400}Wrong input, you can only store %d Energy Bars{A9C4E4}\nEnergy Bars available left to store {FFF600}%d{A9C4E4}", maxbars, maxbars-PlayerInfo[playerid][pBItems][11]);
- return ShowBackpackMenu(playerid, DIALOG_ENERGYBARS*2, str);
- }
- if(PlayerInfo[playerid][mInventory][4] >= amount) PlayerInfo[playerid][mInventory][4] -= amount;
- else return ShowBackpackMenu(playerid, DIALOG_ENERGYBARS*2, "{B20400}Wrong input{A9C4E4}\nYou don't have that many Energy Bars");
- PlayerInfo[playerid][pBItems][11] += amount;
- format(string, sizeof(string), "You have deposited %d energy bars in your backpack.", amount);
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "[EBARS] %s(%d) (IP:%s) deposited %d energy bars (%d bars Total) [BACKPACK %d]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), amount, PlayerInfo[playerid][pBItems][11], PlayerInfo[playerid][pBackpack]);
- Log("logs/backpack.log", string);
- }
- else//Withdraw
- {
- new amount;
- if(sscanf(inputtext, "d", amount)) return ShowBackpackMenu(playerid, DIALOG_ENERGYBARS*2, "{B20400}Wrong input{A9C4E4}");
- if(amount < 1) return ShowBackpackMenu(playerid, DIALOG_ENERGYBARS*2, "{B20400}Wrong input{A9C4E4}\nYou cannot put the amount less than 1");
- if(amount > PlayerInfo[playerid][pBItems][11])
- {
- format(str, sizeof(str), "{B20400}Wrong input, you only have %d Energy Bars{A9C4E4}\nEnergy Bars trying to withdraw {FFF600}%d{A9C4E4}", PlayerInfo[playerid][pBItems][11], amount);
- return ShowBackpackMenu(playerid, DIALOG_ENERGYBARS*2, str);
- }
- PlayerInfo[playerid][pBItems][11] -= amount;
- PlayerInfo[playerid][mInventory][4] += amount;
- format(string, sizeof(string), "You have withdrawn %d energy bars from your backpack.", amount);
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "[EBARS] %s(%d) (IP:%s) withdrawn %d energy bars (%d bars Total) [BACKPACK %d]", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), GetPlayerIpEx(playerid), amount, PlayerInfo[playerid][pBItems][11], PlayerInfo[playerid][pBackpack]);
- Log("logs/backpack.log", string);
- }
- ShowBackpackMenu(playerid, DIALOG_ENERGYBARS, "- {02B0F5}Energy Bars");
- }
- else
- {
- if(GetPVarType(playerid, "bnwd")) ShowBackpackMenu(playerid, DIALOG_ENERGYBARS, "- {02B0F5}Energy Bars");
- else ShowBackpackMenu(playerid, DIALOG_OBACKPACK, "");
- }
- }
- if(dialogid == DIALOG_MANAGECREDITS)
- {
- if(!response) return 1;
- SetPVarInt(playerid, "ManageCreditsDiag", listitem);
- switch(listitem) {
- case 0: {
- if(SellClosed)
- ShowPlayerDialogEx(playerid, DIALOG_MANAGECREDITS2, DIALOG_STYLE_MSGBOX, "Sale of Credits", "Would you like ENABLE the selling of credits?", "Okay", "Cancel");
- else
- ShowPlayerDialogEx(playerid, DIALOG_MANAGECREDITS2, DIALOG_STYLE_MSGBOX, "Sale of Credits", "Would you like DISABLE the selling of credits?", "Okay", "Cancel");
- }
- case 1: {
- if(!freeweekend)
- ShowPlayerDialogEx(playerid, DIALOG_MANAGECREDITS2, DIALOG_STYLE_MSGBOX, "Sale of Credits", "Would you like ENABLE the free weekend?", "Okay", "Cancel");
- else
- ShowPlayerDialogEx(playerid, DIALOG_MANAGECREDITS2, DIALOG_STYLE_MSGBOX, "Sale of Credits", "Would you like DISABLE the free weekend?", "Okay", "Cancel");
- }
- case 2: {
- if(!nonvipcredits)
- ShowPlayerDialogEx(playerid, DIALOG_MANAGECREDITS2, DIALOG_STYLE_MSGBOX, "Sale of Credits", "Would you like ENABLE the selling of credits for NON-VIPs?", "Okay", "Cancel");
- else
- ShowPlayerDialogEx(playerid, DIALOG_MANAGECREDITS2, DIALOG_STYLE_MSGBOX, "Sale of Credits", "Would you like DISABLE the selling of credits for NON-VIPs?", "Okay", "Cancel");
- }
- }
- }
- if(dialogid == DIALOG_MANAGECREDITS2)
- {
- if(!response) return 1;
- switch(GetPVarInt(playerid, "ManageCreditsDiag")) {
- case 0: {
- if(!SellClosed) SellClosed = 1, SendClientMessageEx(playerid, COLOR_WHITE, "Selling of credits disabled.");
- else SellClosed = 0, SendClientMessageEx(playerid, COLOR_WHITE, "Selling of credits enabled.");
- }
- case 1: {
- if(!freeweekend) freeweekend = 1, SendClientMessageEx(playerid, COLOR_WHITE, "Free weekend enabled.");
- else freeweekend = 0, SendClientMessageEx(playerid, COLOR_WHITE, "Free weekend disabled.");
- }
- case 2: {
- if(!nonvipcredits) nonvipcredits = 1, SendClientMessageEx(playerid, COLOR_WHITE, "Selling of credits for Non-VIPs enabled.");
- else nonvipcredits = 0, SendClientMessageEx(playerid, COLOR_WHITE, "Selling of credits for Non-VIPs disabled.");
- }
- }
- }
- if(dialogid == DIALOG_MEDIC_LIST) {
- if(response) Medic_GetPatient(playerid, ListItemTrackId[playerid][listitem]);
- }
- return 0;
- }
|